diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 10:31:46 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 10:31:46 +0000 |
commit | 798f5a860876ac3f61e6ecc989e3086caac480bd (patch) | |
tree | 0681790969f7719b7b9731f871f483f51618237b | |
parent | a8c4efcff49b3377b9bdd748b33dbad2094f9eaa (diff) | |
download | openttd-798f5a860876ac3f61e6ecc989e3086caac480bd.tar.xz |
(svn r23102) -Codechange: remove the remaining pointless multiplications by TILE_HEIGHT
-rw-r--r-- | src/clear_cmd.cpp | 2 | ||||
-rw-r--r-- | src/dock_gui.cpp | 4 | ||||
-rw-r--r-- | src/elrail.cpp | 2 | ||||
-rw-r--r-- | src/industry_cmd.cpp | 2 | ||||
-rw-r--r-- | src/misc_gui.cpp | 2 | ||||
-rw-r--r-- | src/newgrf_canal.cpp | 2 | ||||
-rw-r--r-- | src/rail_cmd.cpp | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index 5f0b32aed..c173d196e 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -231,7 +231,7 @@ static void TileLoop_Clear(TileIndex tile) /* If the tile is at any edge flood it to prevent maps without water. */ if (_settings_game.construction.freeform_edges && DistanceFromEdge(tile) == 1) { uint z; - Slope slope = GetTilePixelSlope(tile, &z); + Slope slope = GetTileSlope(tile, &z); if (z == 0 && slope == SLOPE_FLAT) { DoFloodTile(tile); MarkTileDirtyByTile(tile); diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 31ee24338..d1a76ed12 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -60,7 +60,7 @@ void CcBuildCanal(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = NULL) { uint z; - DiagDirection dir = GetInclinedSlopeDirection(GetTilePixelSlope(tile_from, &z)); + DiagDirection dir = GetInclinedSlopeDirection(GetTileSlope(tile_from, &z)); /* If the direction isn't right, just return the next tile so the command * complains about the wrong slope instead of the ends not matching up. @@ -79,7 +79,7 @@ static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = N if (length > max_length) break; - if (GetTileMaxPixelZ(endtile) > z) { + if (GetTileMaxZ(endtile) > z) { if (tile_to != NULL) *tile_to = endtile; break; } diff --git a/src/elrail.cpp b/src/elrail.cpp index f8868bd4e..86170149f 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -376,7 +376,7 @@ static void DrawCatenaryRailway(const TileInfo *ti) foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], DiagDirToAxis(GetTunnelBridgeDirection(neighbour))); } - ApplyPixelFoundationToSlope(foundation, &tileh[TS_NEIGHBOUR]); + ApplyFoundationToSlope(foundation, &tileh[TS_NEIGHBOUR]); /* Half tile slopes coincide only with horizontal/vertical track. * Faking a flat slope results in the correct sprites on positions. */ diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 4fdc306d4..3f1aa0613 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1262,7 +1262,7 @@ static CommandCost CheckNewIndustry_Lumbermill(TileIndex tile) */ static CommandCost CheckNewIndustry_BubbleGen(TileIndex tile) { - if (GetTilePixelZ(tile) > TILE_HEIGHT * 4) { + if (GetTileZ(tile) > 4) { return_cmd_error(STR_ERROR_CAN_ONLY_BE_BUILT_IN_LOW_AREAS); } return CommandCost(); diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 2be271f61..7b5338704 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -221,7 +221,7 @@ public: snprintf(tmp, lengthof(tmp), "0x%.4X", tile); SetDParam(0, TileX(tile)); SetDParam(1, TileY(tile)); - SetDParam(2, GetTilePixelZ(tile) / TILE_HEIGHT); + SetDParam(2, GetTileZ(tile)); SetDParamStr(3, tmp); GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_LANDINFO_COORDS, lastof(this->landinfo_data[line_nr])); line_nr++; diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 696b88eb3..9bbf8fbb6 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -48,7 +48,7 @@ static uint32 CanalGetVariable(const ResolverObject *object, byte variable, byte switch (variable) { /* Height of tile */ case 0x80: { - uint z = GetTilePixelZ(tile) / TILE_HEIGHT; + uint z = GetTileZ(tile); /* Return consistent height within locks */ if (IsTileType(tile, MP_WATER) && IsLock(tile) && GetLockPart(tile) == LOCK_PART_UPPER) z--; return z; diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index b33c6829d..e799b95c9 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -676,7 +676,7 @@ bool FloodHalftile(TileIndex t) } } else { /* Make shore on steep slopes and 'three-corners-raised'-slopes. */ - if (ApplyPixelFoundationToSlope(GetRailFoundation(tileh, rail_bits), &tileh) == 0) { + if (ApplyFoundationToSlope(GetRailFoundation(tileh, rail_bits), &tileh) == 0) { if (IsSteepSlope(tileh) || IsSlopeWithThreeCornersRaised(tileh)) { flooded = true; SetRailGroundType(t, RAIL_GROUND_WATER); |