diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 11:36:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 11:36:10 +0000 |
commit | 459c9523e8acdf314ce697460f4768eec228daac (patch) | |
tree | 60320999f3a69b8595d152af6e9474292da902d8 /src/tunnelbridge_cmd.cpp | |
parent | 19eabdba2cf0184d5dc55cb3b9b8a7b5fe7ccfd3 (diff) | |
download | openttd-459c9523e8acdf314ce697460f4768eec228daac.tar.xz |
(svn r23107) -Codechange: let GetSlopePixelZ and TerraformTile tile type functions use int z as well
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index fd6b5f9c6..8edfdc810 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1359,7 +1359,7 @@ void DrawBridgeMiddle(const TileInfo *ti) } -static uint GetSlopePixelZ_TunnelBridge(TileIndex tile, uint x, uint y) +static int GetSlopePixelZ_TunnelBridge(TileIndex tile, uint x, uint y) { int z; Slope tileh = GetTilePixelSlope(tile, &z); @@ -1673,7 +1673,7 @@ static VehicleEnterTileStatus VehicleEnter_TunnelBridge(Vehicle *v, TileIndex ti return VETSB_CONTINUE; } -static CommandCost TerraformTile_TunnelBridge(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new) +static CommandCost TerraformTile_TunnelBridge(TileIndex tile, DoCommandFlag flags, int z_new, Slope tileh_new) { if (_settings_game.construction.build_on_slopes && AutoslopeEnabled() && IsBridge(tile) && GetTunnelBridgeTransportType(tile) != TRANSPORT_WATER) { DiagDirection direction = GetTunnelBridgeDirection(tile); @@ -1685,10 +1685,10 @@ static CommandCost TerraformTile_TunnelBridge(TileIndex tile, DoCommandFlag flag /* Check if new slope is valid for bridges in general (so we can safely call GetBridgeFoundation()) */ if ((direction == DIAGDIR_NW) || (direction == DIAGDIR_NE)) { CheckBridgeSlopeSouth(axis, &tileh_old, &z_old); - res = CheckBridgeSlopeSouth(axis, &tileh_new, (int*)&z_new); + res = CheckBridgeSlopeSouth(axis, &tileh_new, &z_new); } else { CheckBridgeSlopeNorth(axis, &tileh_old, &z_old); - res = CheckBridgeSlopeNorth(axis, &tileh_new, (int*)&z_new); + res = CheckBridgeSlopeNorth(axis, &tileh_new, &z_new); } /* Surface slope is valid and remains unchanged? */ |