(svn r1386) Move TileIndexDiff to map.h

Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
This commit is contained in:
tron
2005-01-05 13:32:03 +00:00
parent 0a37e6202b
commit e4cf2ba1b3
20 changed files with 87 additions and 83 deletions

View File

@@ -121,7 +121,7 @@ static int32 DoBuildShiplift(uint tile, int dir, uint32 flags)
ret = DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret == CMD_ERROR) return CMD_ERROR;
delta = _tileoffs_by_dir[dir];
delta = TileOffsByDir(dir);
// lower tile
ret = DoCommandByTile(tile - delta, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret == CMD_ERROR) return CMD_ERROR;
@@ -143,7 +143,7 @@ static int32 DoBuildShiplift(uint tile, int dir, uint32 flags)
static int32 RemoveShiplift(uint tile, uint32 flags)
{
int delta = _tileoffs_by_dir[_map5[tile] & 3];
int delta = TileOffsByDir(_map5[tile] & 3);
// make sure no vehicle is on the tile.
if (!EnsureNoVehicle(tile) || !EnsureNoVehicle(tile + delta) || !EnsureNoVehicle(tile - delta))