Introduce a new type for representing map coordinates.

To resolve the ambiguity introduced when the introduction of isometric maps meant that cell and map coordinates were no longer equivalent, a new type has been introduced so they can each be represented separately.
This commit is contained in:
RoosterDragon
2014-12-22 19:07:20 +00:00
parent 40c9d0a47d
commit 7cfece6dc0
21 changed files with 257 additions and 232 deletions

View File

@@ -84,10 +84,10 @@ namespace OpenRA.Mods.Common.Traits
foreach (var uv in wr.Viewport.VisibleCells.MapCoords)
{
var lr = Game.Renderer.WorldLineRenderer;
var pos = wr.World.Map.CenterOfCell(Map.MapToCell(wr.World.Map.TileShape, uv));
var pos = wr.World.Map.CenterOfCell(uv.ToCPos(wr.World.Map));
var height = (int)wr.World.Map.MapHeight.Value[uv.X, uv.Y];
var tile = wr.World.Map.MapTiles.Value[uv.X, uv.Y];
var height = (int)wr.World.Map.MapHeight.Value[uv];
var tile = wr.World.Map.MapTiles.Value[uv];
TerrainTileInfo tileInfo = null;