diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 10:18:13 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 10:18:13 +0000 |
commit | 7757a2ed406996be35c7179185f2e4e7cba37e12 (patch) | |
tree | ccf4b25e4efba9fee88cfb65ccabd68972c09400 /src/ai/api | |
parent | 47203dbeb5080a5d24131a61ec12d1d3164bcb42 (diff) | |
download | openttd-7757a2ed406996be35c7179185f2e4e7cba37e12.tar.xz |
(svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight)
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_tile.cpp | 10 | ||||
-rw-r--r-- | src/ai/api/ai_tunnel.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/ai/api/ai_tile.cpp b/src/ai/api/ai_tile.cpp index 98701b3a0..2c098e5ba 100644 --- a/src/ai/api/ai_tile.cpp +++ b/src/ai/api/ai_tile.cpp @@ -142,7 +142,7 @@ { if (!::IsValidTile(tile)) return SLOPE_INVALID; - return (Slope)::GetTileSlope(tile, NULL); + return (Slope)::GetTilePixelSlope(tile, NULL); } /* static */ AITile::Slope AITile::GetComplementSlope(Slope slope) @@ -156,14 +156,14 @@ { if (!::IsValidTile(tile)) return -1; - return ::GetTileZ(tile) / ::TILE_HEIGHT; + return ::GetTilePixelZ(tile) / ::TILE_HEIGHT; } /* static */ int32 AITile::GetMaxHeight(TileIndex tile) { if (!::IsValidTile(tile)) return -1; - return ::GetTileMaxZ(tile) / ::TILE_HEIGHT; + return ::GetTileMaxPixelZ(tile) / ::TILE_HEIGHT; } /* static */ int32 AITile::GetCornerHeight(TileIndex tile, Corner corner) @@ -171,8 +171,8 @@ if (!::IsValidTile(tile) || !::IsValidCorner((::Corner)corner)) return -1; uint z; - ::Slope slope = ::GetTileSlope(tile, &z); - return (z + ::GetSlopeZInCorner(slope, (::Corner)corner)) / ::TILE_HEIGHT; + ::Slope slope = ::GetTilePixelSlope(tile, &z); + return (z + ::GetSlopePixelZInCorner(slope, (::Corner)corner)) / ::TILE_HEIGHT; } /* static */ AICompany::CompanyID AITile::GetOwner(TileIndex tile) diff --git a/src/ai/api/ai_tunnel.cpp b/src/ai/api/ai_tunnel.cpp index 99aec30c4..d82d8d68e 100644 --- a/src/ai/api/ai_tunnel.cpp +++ b/src/ai/api/ai_tunnel.cpp @@ -30,7 +30,7 @@ if (IsTunnelTile(tile)) return ::GetOtherTunnelEnd(tile); uint start_z; - Slope start_tileh = ::GetTileSlope(tile, &start_z); + Slope start_tileh = ::GetTilePixelSlope(tile, &start_z); DiagDirection direction = ::GetInclinedSlopeDirection(start_tileh); if (direction == INVALID_DIAGDIR) return INVALID_TILE; @@ -40,7 +40,7 @@ tile += delta; if (!::IsValidTile(tile)) return INVALID_TILE; - ::GetTileSlope(tile, &end_z); + ::GetTilePixelSlope(tile, &end_z); } while (start_z != end_z); return tile; |