diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -231,7 +231,7 @@ static void TileLoop_Clear(TileIndex til /* 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 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -60,7 +60,7 @@ void CcBuildCanal(const CommandCost &res 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(Til 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 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -376,7 +376,7 @@ static void DrawCatenaryRailway(const 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 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1262,7 +1262,7 @@ static CommandCost CheckNewIndustry_Lumb */ 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 --- 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 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -48,7 +48,7 @@ static uint32 CanalGetVariable(const Res 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 --- 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);