git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1199 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -19,9 +19,16 @@ namespace OpenRa.Game
|
||||
|
||||
Texture paletteTexture;
|
||||
|
||||
public HardwarePalette(GraphicsDevice device)
|
||||
public HardwarePalette(GraphicsDevice device, Map map)
|
||||
{
|
||||
this.device = device;
|
||||
|
||||
Palette pal = new Palette(File.OpenRead("../../../" + map.Theater + ".pal"));
|
||||
AddPalette(pal);
|
||||
|
||||
foreach (string remap in new string[] { "blue", "red", "orange", "teal", "salmon", "green", "gray" })
|
||||
AddPalette(new Palette(pal, new PaletteRemap(
|
||||
File.OpenRead("../../../" + remap + ".rem"))));
|
||||
}
|
||||
|
||||
void Resolve()
|
||||
@@ -44,7 +51,7 @@ namespace OpenRa.Game
|
||||
}
|
||||
}
|
||||
|
||||
public int AddPalette(Palette p)
|
||||
int AddPalette(Palette p)
|
||||
{
|
||||
for (int i = 0; i < 256; i++)
|
||||
bitmap.SetPixel(i, allocated, p.GetColor(i));
|
||||
|
||||
Reference in New Issue
Block a user