Add a mechanism to add palettes via traits

This commit is contained in:
Paul Chote
2010-02-03 21:49:37 +13:00
parent e44c46200d
commit 1e01911b46
6 changed files with 50 additions and 9 deletions

View File

@@ -33,12 +33,10 @@ namespace OpenRa.Graphics
AddPalette(new Palette(pal, new SingleColorRemap(Color.FromArgb(128, 255, 255, 255)))); // Highlight
AddPalette(new Palette(pal, new ShroudPaletteRemap())); // Shroud
AddPalette(pal); // Chrome (it's like gold, but we're not going to hax it in palettemods)
Palette palTerrain = new Palette(FileSystem.Open("temperat_ra.pal"));
AddPalette(palTerrain); // Terrain
}
int AddPalette(Palette p)
public int AddPalette(Palette p)
{
for (int i = 0; i < 256; i++)
this[new Point(i, allocated)] = p.GetColor(i);