#28 minimap color for snow maps

This commit is contained in:
Chris Forbes
2010-01-17 11:24:41 +13:00
parent d1ecfacd55
commit fa421410fe

View File

@@ -34,16 +34,23 @@ namespace OpenRa.Graphics
Color[] terrainTypeColors;
Color[] playerColors;
Color shroudColor;
string theater;
public void InvalidateOre() { oreLayer = null; }
public void Update()
{
if (Rules.Map.Theater != theater)
{
terrainTypeColors = null;
theater = Rules.Map.Theater;
}
if (terrainTypeColors == null)
{
var pal = new Palette(FileSystem.Open(Rules.Map.Theater + ".pal"));
terrainTypeColors = new[] {
Color.FromArgb(alpha, pal.GetColor(0x1a)),
Color.FromArgb(alpha, pal.GetColor(theater.ToLowerInvariant() == "snow" ? 0xe3 :0x1a)),
Color.FromArgb(alpha, pal.GetColor(0x63)),
Color.FromArgb(alpha, pal.GetColor(0x2f)),
Color.FromArgb(alpha, pal.GetColor(0x1f)),