summaryrefslogtreecommitdiff
path: root/unmovable_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-07 17:02:43 +0000
committertron <tron@openttd.org>2005-01-07 17:02:43 +0000
commit414ac3286b10b83d8f832c58f48f373f5130cb89 (patch)
treee4137b60a824b45ce09f668d58520e36dba10256 /unmovable_cmd.c
parentfe798488e6c03311cee8328398c7ce5e235f70c8 (diff)
downloadopenttd-414ac3286b10b83d8f832c58f48f373f5130cb89.tar.xz
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
Diffstat (limited to 'unmovable_cmd.c')
-rw-r--r--unmovable_cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/unmovable_cmd.c b/unmovable_cmd.c
index adb82bc03..66c8a38f4 100644
--- a/unmovable_cmd.c
+++ b/unmovable_cmd.c
@@ -236,7 +236,7 @@ static bool checkRadioTowerNearby(uint tile)
{
uint tile_s;
- tile_s = TILE_XY( (int) GET_TILE_X(tile)-4, (int) GET_TILE_Y(tile)-4 );
+ tile_s = TILE_XY(TileX(tile) - 4, TileY(tile) - 4);
BEGIN_TILE_LOOP(tile, 9, 9, tile_s)
// already a radio tower here?
@@ -324,7 +324,9 @@ int32 CmdBuildCompanyHQ(int x, int y, uint32 flags, uint32 p1, uint32 p2)
return CMD_ERROR;
if (p1)
- cost = DoCommand(GET_TILE_X(p->location_of_house)*16, GET_TILE_Y(p->location_of_house)*16, p1&0xFF, 0, flags, CMD_DESTROY_COMPANY_HQ);
+ cost = DoCommand(
+ TileX(p->location_of_house) * 16, TileY(p->location_of_house) * 16,
+ p1 & 0xFF, 0, flags, CMD_DESTROY_COMPANY_HQ);
if (flags & DC_EXEC) {
score = UpdateCompanyRatingAndValue(p, false);