clean up whitespace in CncWaterPaletteRotation

This commit is contained in:
Chris Forbes
2011-09-24 20:48:20 +12:00
parent 589d201a16
commit b83fa764d4

View File

@@ -18,22 +18,20 @@ namespace OpenRA.Mods.Cnc
class CncWaterPaletteRotation : ITick, IPaletteModifier class CncWaterPaletteRotation : ITick, IPaletteModifier
{ {
float t = 0; float t = 0;
public void Tick(Actor self)
{ public void Tick(Actor self) { t += .25f; }
t += .25f;
}
public void AdjustPalette(Dictionary<string,Palette> palettes) public void AdjustPalette(Dictionary<string,Palette> palettes)
{ {
// Only modify the terrain palette // Only modify the terrain palette
var pal = palettes["terrain"]; var pal = palettes["terrain"];
var copy = (uint[])pal.Values.Clone(); var copy = (uint[])pal.Values.Clone();
var rotate = (int)t % 7; var rotate = (int)t % 7;
for (int i = 0; i < 7; i++) for (int i = 0; i < 7; i++)
pal.SetColor(0x20 + (rotate + i) % 7, copy[0x20 + i]); pal.SetColor(0x20 + (rotate + i) % 7, copy[0x20 + i]);
} }
} }
} }