summaryrefslogtreecommitdiff
path: root/src/unmovable_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-18 10:48:15 +0000
committerrubidium <rubidium@openttd.org>2007-06-18 10:48:15 +0000
commit966e2738b9c97bb44276ec90ebfa4a202d67d715 (patch)
treee8ff8f3847b0d29507eeef3450ff752e9b318604 /src/unmovable_cmd.cpp
parentf6be61bb3481419a388d9dcdede16c2b5f77c4a2 (diff)
downloadopenttd-966e2738b9c97bb44276ec90ebfa4a202d67d715.tar.xz
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
Diffstat (limited to 'src/unmovable_cmd.cpp')
-rw-r--r--src/unmovable_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
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) {