Minimap sanity; part 1: rewrite the core radar logic

This commit is contained in:
Paul Chote
2010-07-21 23:44:23 +12:00
parent 58aed632a1
commit 78aff37fe4
4 changed files with 113 additions and 160 deletions

View File

@@ -44,15 +44,21 @@ namespace OpenRA
}
public bool IsExplored(int2 xy) { return IsExplored(xy.X, xy.Y); }
bool IsExplored(int x, int y)
public bool IsExplored(int x, int y)
{
if (disabled)
return true;
return shroud.exploredCells[x,y];
}
public bool DisplayOnRadar(int x, int y) { return IsExplored(x, y); }
public bool IsVisible(int2 xy) { return IsVisible(xy.X, xy.Y); }
public bool IsVisible(int x, int y)
{
if (disabled)
return true;
return shroud.visibleCells[x,y] != 0;
}
static readonly byte[][] SpecialShroudTiles =
{
new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },