IPaletteModifier hooked up; no impls yet

This commit is contained in:
Chris Forbes
2009-12-23 20:56:04 +13:00
parent 449c07c518
commit ef01cacd9a
5 changed files with 24 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ namespace OpenRa.Game.Graphics
const int maxEntries = 16;
int allocated = 0;
public HardwarePalette(Renderer renderer, Map map, int rotate)
public HardwarePalette(Renderer renderer, Map map)
: base(renderer,new Size(256, maxEntries))
{
Palette pal = new Palette(FileSystem.Open(map.Theater + ".pal"));
@@ -19,10 +19,10 @@ namespace OpenRa.Game.Graphics
AddPalette(new Palette(pal, new PaletteRemap(Color.FromArgb(140, 0, 0, 0))));
using (var bitmapCopy = new Bitmap(bitmap))
for (int j = 0; j < maxEntries; j++)
for (int i = 0; i < 7; i++)
this[new Point(0x60 + i, j)] = bitmapCopy.GetPixel(0x60 + (rotate + i) % 7, j);
//using (var bitmapCopy = new Bitmap(bitmap))
// for (int j = 0; j < maxEntries; j++)
// for (int i = 0; i < 7; i++)
// this[new Point(0x60 + i, j)] = bitmapCopy.GetPixel(0x60 + (rotate + i) % 7, j);
}
int AddPalette(Palette p)