--- a/src/tunnelbridge_cmd.cpp Wed Jun 13 12:05:56 2007 +0000
+++ b/src/tunnelbridge_cmd.cpp Tue Jun 19 07:21:01 2007 +0000
@@ -110,7 +110,7 @@
* - rest is invalid
*/
#define M(x) (1 << (x))
-static int32 CheckBridgeSlopeNorth(Axis axis, Slope tileh)
+static CommandCost CheckBridgeSlopeNorth(Axis axis, Slope tileh)
{
uint32 valid;
@@ -125,7 +125,7 @@
return CMD_ERROR;
}
-static int32 CheckBridgeSlopeSouth(Axis axis, Slope tileh)
+static CommandCost CheckBridgeSlopeSouth(Axis axis, Slope tileh)
{
uint32 valid;
@@ -175,7 +175,7 @@
* - p2 = (bit 8-..) - rail type or road types.
* - p2 = (bit 15 ) - set means road bridge.
*/
-int32 CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2)
{
uint bridge_type;
RailType railtype;
@@ -194,7 +194,7 @@
TileIndexDiff delta;
uint bridge_len;
Axis direction;
- int32 cost, terraformcost, ret;
+ CommandCost cost, terraformcost, ret;
bool allow_on_slopes;
bool replace_bridge = false;
uint replaced_bridge_type;
@@ -453,7 +453,7 @@
* @param p1 railtype or roadtypes. bit 9 set means road tunnel
* @param p2 unused
*/
-int32 CmdBuildTunnel(TileIndex start_tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdBuildTunnel(TileIndex start_tile, uint32 flags, uint32 p1, uint32 p2)
{
TileIndexDiff delta;
TileIndex end_tile;
@@ -462,8 +462,8 @@
Slope end_tileh;
uint start_z;
uint end_z;
- int32 cost;
- int32 ret;
+ CommandCost cost;
+ CommandCost ret;
_build_tunnel_endtile = 0;
if (!HASBIT(p1, 9)) {
@@ -578,7 +578,7 @@
return false;
}
-static int32 DoClearTunnel(TileIndex tile, uint32 flags)
+static CommandCost DoClearTunnel(TileIndex tile, uint32 flags)
{
Town *t = NULL;
TileIndex endtile;
@@ -638,7 +638,7 @@
return false;
}
-static int32 DoClearBridge(TileIndex tile, uint32 flags)
+static CommandCost DoClearBridge(TileIndex tile, uint32 flags)
{
DiagDirection direction;
TileIndexDiff delta;
@@ -698,7 +698,7 @@
return (DistanceManhattan(tile, endtile) + 1) * _eco->GetPrice(CEconomy::CLEAR_BRIDGE);
}
-static int32 ClearTile_TunnelBridge(TileIndex tile, byte flags)
+static CommandCost ClearTile_TunnelBridge(TileIndex tile, byte flags)
{
if (IsTunnel(tile)) {
if (flags & DC_AUTO) return_cmd_error(STR_5006_MUST_DEMOLISH_TUNNEL_FIRST);
@@ -721,7 +721,7 @@
* @return The cost and state of the operation
* @retval CMD_ERROR An error occured during the operation.
*/
-int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
+CommandCost DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
{
TileIndex endtile;