fix crash in minimap; constrain shroud to edge; fix some render dumbness

This commit is contained in:
Chris Forbes
2010-01-27 18:23:27 +13:00
parent d9a1b4c807
commit 00bc886b01
4 changed files with 18 additions and 19 deletions

View File

@@ -34,6 +34,9 @@ namespace OpenRa.Graphics
sprite = new Sprite(sheet, rect, TextureChannel.Alpha);
mapOnlySprite = new Sprite(mapOnlySheet, rect, TextureChannel.Alpha);
playerColors = Util.MakeArray<Color>(8, b => Color.FromArgb(alpha, Chat.paletteColors[b]));
shroudColor = Color.FromArgb(alpha, Color.Black);
}
public static Rectangle MakeMinimapBounds(Map m)
@@ -75,12 +78,6 @@ namespace OpenRa.Graphics
public void Update()
{
if (terrainTypeColors == null)
{
playerColors = Util.MakeArray<Color>( 8, b => Color.FromArgb(alpha, Chat.paletteColors[b]) );
shroudColor = Color.FromArgb(alpha, Color.Black);
}
if (terrain == null)
terrain = RenderTerrainBitmap(world.Map, world.TileSet);