move water & light palette manips into ra
This commit is contained in:
@@ -55,7 +55,6 @@ namespace OpenRA.FileFormats
|
||||
FieldLoader.LoadField(self,field,my[field].Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void LoadField( object self, string key, string value )
|
||||
{
|
||||
|
||||
@@ -223,7 +223,6 @@
|
||||
<Compile Include="Traits\Helicopter.cs" />
|
||||
<Compile Include="Traits\Modifiers\InvisibleToOthers.cs" />
|
||||
<Compile Include="Traits\ConstructionYard.cs" />
|
||||
<Compile Include="Traits\World\LightPaletteRotator.cs" />
|
||||
<Compile Include="Traits\LimitedAmmo.cs" />
|
||||
<Compile Include="Traits\World\PaletteFromFile.cs" />
|
||||
<Compile Include="Traits\World\PaletteFromRGBA.cs" />
|
||||
@@ -266,7 +265,6 @@
|
||||
<Compile Include="Traits\Unit.cs" />
|
||||
<Compile Include="Traits\World\SpawnMapActors.cs" />
|
||||
<Compile Include="Traits\World\UnitInfluence.cs" />
|
||||
<Compile Include="Traits\World\WaterPaletteRotation.cs" />
|
||||
<Compile Include="Traits\Modifiers\WithShadow.cs" />
|
||||
<Compile Include="Network\UnitOrders.cs" />
|
||||
<Compile Include="Traits\Util.cs" />
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class LightPaletteRotatorInfo : TraitInfo<LightPaletteRotator> { }
|
||||
class LightPaletteRotator : ITick, IPaletteModifier
|
||||
@@ -38,7 +39,7 @@ namespace OpenRA.Traits
|
||||
rotate = 18 - rotate;
|
||||
|
||||
using (var bitmapCopy = new Bitmap(b))
|
||||
for (int j = 0; j < 16; j++)
|
||||
for (int j = 0; j < b.Height; j++)
|
||||
b.SetPixel(0x67, j, b.GetPixel(230+rotate, j));
|
||||
}
|
||||
}
|
||||
@@ -74,6 +74,7 @@
|
||||
<Compile Include="HasUnitOnBuild.cs" />
|
||||
<Compile Include="Husk.cs" />
|
||||
<Compile Include="LeavesHusk.cs" />
|
||||
<Compile Include="LightPaletteRotator.cs" />
|
||||
<Compile Include="OreRefinery.cs" />
|
||||
<Compile Include="ChronoshiftPaletteEffect.cs" />
|
||||
<Compile Include="ChronoshiftPower.cs" />
|
||||
@@ -111,6 +112,7 @@
|
||||
<Compile Include="ThrowsParticles.cs" />
|
||||
<Compile Include="TraitsInterfaces.cs" />
|
||||
<Compile Include="DefaultShellmapScript.cs" />
|
||||
<Compile Include="WaterPaletteRotation.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class WaterPaletteRotationInfo : TraitInfo<WaterPaletteRotation> { }
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
var rotate = (int)t % 7;
|
||||
using (var bitmapCopy = new Bitmap(b))
|
||||
for (int j = 0; j < 16; j++)
|
||||
for (int j = 0; j < b.Height; j++)
|
||||
for (int i = 0; i < 7; i++)
|
||||
b.SetPixel(0x60 + (rotate + i) % 7, j, bitmapCopy.GetPixel(0x60 + i, j));
|
||||
}
|
||||
Reference in New Issue
Block a user