summaryrefslogtreecommitdiff
path: root/unmovable_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-10 07:15:58 +0000
committertron <tron@openttd.org>2006-04-10 07:15:58 +0000
commit35e93e451fbf0b88401d9af137b2423fefe1dc58 (patch)
treef8613338e934555520fd9b45b411e8a946c5be7a /unmovable_cmd.c
parentb0b5641639e042399e0ee3886740999678bc63ea (diff)
downloadopenttd-35e93e451fbf0b88401d9af137b2423fefe1dc58.tar.xz
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
Diffstat (limited to 'unmovable_cmd.c')
-rw-r--r--unmovable_cmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/unmovable_cmd.c b/unmovable_cmd.c
index 06055f3bd..a2518fd98 100644
--- a/unmovable_cmd.c
+++ b/unmovable_cmd.c
@@ -82,14 +82,13 @@ void UpdateCompanyHQ(Player *p, uint score)
}
/** Build or relocate the HQ. This depends if the HQ is already built or not
- * @param x,y the coordinates where the HQ will be built or relocated to
+ * @param tile tile where the HQ will be built or relocated to
* @param p1 unused
* @param p2 unused
*/
extern int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, int *);
-int32 CmdBuildCompanyHQ(int x, int y, uint32 flags, uint32 p1, uint32 p2)
+int32 CmdBuildCompanyHQ(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
- TileIndex tile = TileVirtXY(x, y);
Player *p = GetPlayer(_current_player);
int cost;
int32 ret;
@@ -219,7 +218,7 @@ static int32 ClearTile_Unmovable(TileIndex tile, byte flags)
}
if (IsOwnedLand(tile)) {
- return DoCommandByTile(tile, 0, 0, flags, CMD_SELL_LAND_AREA);
+ return DoCommand(tile, 0, 0, flags, CMD_SELL_LAND_AREA);
}
// checks if you're allowed to remove unmovable things