diff options
author | tron <tron@openttd.org> | 2005-01-06 11:39:00 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-06 11:39:00 +0000 |
commit | f8c95a1dbeac23296cacc83ae25d2a8b352cd83d (patch) | |
tree | f875975dc056d7d3fea370018fa0bdf62837fd3e /unmovable_cmd.c | |
parent | 790b03c7071388addd4cb064e473e96f8e1f12e0 (diff) | |
download | openttd-f8c95a1dbeac23296cacc83ae25d2a8b352cd83d.tar.xz |
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
Diffstat (limited to 'unmovable_cmd.c')
-rw-r--r-- | unmovable_cmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/unmovable_cmd.c b/unmovable_cmd.c index f1511e76d..adb82bc03 100644 --- a/unmovable_cmd.c +++ b/unmovable_cmd.c @@ -224,11 +224,11 @@ static void ClickTile_Unmovable(uint tile) } } -static const TileIndexDiff _tile_add[4] = { - TILE_XY(1,0), - TILE_XY(0,1), - TILE_XY(-1,0), - TILE_XY(0,-1), +static const TileIndexDiffC _tile_add[] = { + { 1, 0}, + { 0, 1}, + {-1, 0}, + { 0, -1} }; /* checks, if a radio tower is within a 9x9 tile square around tile */ @@ -295,7 +295,7 @@ restart: do { if (--j == 0) goto restart; - tile = TILE_MASK(tile + _tile_add[dir]); + tile = TILE_MASK(tile + ToTileIndexDiff(_tile_add[dir])); } while (!(IS_TILETYPE(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h <= 16)); assert(tile == TILE_MASK(tile)); |