Rename MapGridType.Diamond to MapGridType.RectangularIsometric

This commit is contained in:
Pavel Penev
2015-10-01 01:00:29 +03:00
parent 0e417a3cf3
commit b16ebd480b
13 changed files with 38 additions and 40 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Graphics
{
public static Bitmap TerrainBitmap(TileSet tileset, Map map, bool actualSize = false)
{
var isDiamond = map.Grid.Type == MapGridType.Diamond;
var isRectangularIsometric = map.Grid.Type == MapGridType.RectangularIsometric;
var b = map.Bounds;
// Fudge the heightmap offset by adding as much extra as we need / can.
@@ -30,7 +30,7 @@ namespace OpenRA.Graphics
var height = b.Height + heightOffset;
var bitmapWidth = width;
if (isDiamond)
if (isRectangularIsometric)
bitmapWidth = 2 * bitmapWidth - 1;
if (!actualSize)
@@ -55,7 +55,7 @@ namespace OpenRA.Graphics
var type = tileset.GetTileInfo(mapTiles[uv]);
var leftColor = type != null ? type.LeftColor : Color.Black;
if (isDiamond)
if (isRectangularIsometric)
{
// Odd rows are shifted right by 1px
var dx = uv.V & 1;
@@ -81,7 +81,7 @@ namespace OpenRA.Graphics
static Bitmap AddStaticResources(TileSet tileset, Map map, Ruleset resourceRules, Bitmap terrainBitmap)
{
var terrain = new Bitmap(terrainBitmap);
var isDiamond = map.Grid.Type == MapGridType.Diamond;
var isRectangularIsometric = map.Grid.Type == MapGridType.RectangularIsometric;
var b = map.Bounds;
// Fudge the heightmap offset by adding as much extra as we need / can
@@ -113,7 +113,7 @@ namespace OpenRA.Graphics
continue;
var color = tileset[tileset.GetTerrainIndex(res)].Color.ToArgb();
if (isDiamond)
if (isRectangularIsometric)
{
// Odd rows are shifted right by 1px
var dx = uv.V & 1;