From 966e2738b9c97bb44276ec90ebfa4a202d67d715 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 18 Jun 2007 10:48:15 +0000 Subject: (svn r10197) -Codechange: replace int32 with CommandCost where appropriate. --- src/unmovable_cmd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/unmovable_cmd.cpp') diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index dc3bf1112..97a558caa 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -31,7 +31,7 @@ * @param flags docommand flags of calling function * @return cost of the operation */ -static int32 DestroyCompanyHQ(PlayerID pid, uint32 flags) +static CommandCost DestroyCompanyHQ(PlayerID pid, uint32 flags) { Player* p = GetPlayer(pid); @@ -73,7 +73,7 @@ void UpdateCompanyHQ(Player *p, uint score) MarkTileDirtyByTile(tile + TileDiffXY(1, 1)); } -extern int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, StationID* station, bool check_clear = true); +extern CommandCost CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, StationID* station, bool check_clear = true); /** Build or relocate the HQ. This depends if the HQ is already built or not * @param tile tile where the HQ will be built or relocated to @@ -81,11 +81,11 @@ extern int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint * @param p1 unused * @param p2 unused */ -int32 CmdBuildCompanyHQ(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) +CommandCost CmdBuildCompanyHQ(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { Player *p = GetPlayer(_current_player); - int cost; - int32 ret; + CommandCost cost; + CommandCost ret; SET_EXPENSES_TYPE(EXPENSES_PROPERTY); @@ -216,7 +216,7 @@ static Slope GetSlopeTileh_Unmovable(TileIndex tile, Slope tileh) return IsOwnedLand(tile) ? tileh : SLOPE_FLAT; } -static int32 ClearTile_Unmovable(TileIndex tile, byte flags) +static CommandCost ClearTile_Unmovable(TileIndex tile, byte flags) { if (IsCompanyHQ(tile)) { if (_current_player == OWNER_WATER) { -- cgit v1.2.3-54-g00ecf