Support rectangular tiles.

This commit is contained in:
Paul Chote
2013-12-28 19:04:30 +13:00
parent 1e792fa58b
commit 0143e8bfb8
10 changed files with 31 additions and 23 deletions

View File

@@ -36,8 +36,9 @@ namespace OpenRA.Traits
public ScreenMap(World world, ScreenMapInfo info)
{
this.info = info;
cols = world.Map.MapSize.X * Game.CellSize / info.BinSize + 1;
rows = world.Map.MapSize.Y * Game.CellSize / info.BinSize + 1;
var ts = Game.modData.Manifest.TileSize;
cols = world.Map.MapSize.X * ts.Width / info.BinSize + 1;
rows = world.Map.MapSize.Y * ts.Height / info.BinSize + 1;
frozen = new Cache<Player, Dictionary<FrozenActor, Rectangle>[]>(InitializeFrozenActors);
actors = new Dictionary<Actor, Rectangle>[rows * cols];