Fix graphic corruptions by returning the max palette number to 16

This commit is contained in:
Paul Chote
2010-02-04 22:37:17 +13:00
parent 302af4edce
commit 6c99b33364
7 changed files with 30 additions and 17 deletions

View File

@@ -34,9 +34,9 @@ namespace OpenRa.Graphics
for( int i = map.XOffset ; i < map.XOffset + map.Width; i++ )
{
Sprite tile = tileMapping[map.MapTiles[i, j]];
//var bar = Game.world.WorldRenderer;
var foo = wr.GetPaletteIndex("terrain");
Util.FastCreateQuad(vertices, indices, Game.CellSize * new float2(i, j), tile, foo, nv, ni, tile.size);
// TODO: The zero below should explicitly refer to the terrain palette, but this code is called
// before the palettes are created
Util.FastCreateQuad(vertices, indices, Game.CellSize * new float2(i, j), tile, 0, nv, ni, tile.size);
nv += 4;
ni += 6;
}