summaryrefslogtreecommitdiff
path: root/industry_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
commit7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4 (patch)
treee4137b60a824b45ce09f668d58520e36dba10256 /industry_cmd.c
parentf5c33e50733c46cee14e84ade6da0c171d96064b (diff)
downloadopenttd-7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4.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 'industry_cmd.c')
-rw-r--r--industry_cmd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 5014daae5..498958bfc 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -628,7 +628,7 @@ static void AnimateTile_Industry(uint tile)
static void MakeIndustryTileBiggerCase8(uint tile)
{
TileInfo ti;
- FindLandscapeHeight(&ti, GET_TILE_X(tile)*16, GET_TILE_Y(tile)*16);
+ FindLandscapeHeight(&ti, TileX(tile) * 16, TileY(tile) * 16);
CreateEffectVehicle(ti.x + 15, ti.y + 14, ti.z + 59 + (ti.tileh != 0 ? 8 : 0), EV_INDUSTRYSMOKE);
}
@@ -692,8 +692,8 @@ static void TileLoopIndustryCase161(uint tile)
dir = Random() & 3;
v = CreateEffectVehicleAbove(
- GET_TILE_X(tile)*16 + _tileloop_ind_case_161[dir + 0],
- GET_TILE_Y(tile)*16 + _tileloop_ind_case_161[dir + 4],
+ TileX(tile) * 16 + _tileloop_ind_case_161[dir + 0],
+ TileY(tile) * 16 + _tileloop_ind_case_161[dir + 4],
_tileloop_ind_case_161[dir + 8],
EV_INDUSTRY_SMOKE
);
@@ -779,7 +779,7 @@ static void TileLoop_Industry(uint tile)
break;
case 49: {
- CreateEffectVehicleAbove(GET_TILE_X(tile)*16 + 6, GET_TILE_Y(tile)*16 + 6, 43, EV_SMOKE_3);
+ CreateEffectVehicleAbove(TileX(tile) * 16 + 6, TileY(tile) * 16 + 6, 43, EV_SMOKE_3);
} break;
@@ -1145,8 +1145,8 @@ static bool CheckNewIndustry_Oilwell(uint tile, int type)
if (type != IT_OIL_RIG && _game_mode == GM_EDITOR)
return true;
- x = GET_TILE_X(tile);
- y = GET_TILE_Y(tile);
+ x = TileX(tile);
+ y = TileY(tile);
if ( x < 15 || y < 15 || x > 238 || y > 238)
return true;
@@ -1217,8 +1217,8 @@ static CheckNewIndustryProc * const _check_new_industry_procs[] = {
static bool CheckSuitableIndustryPos(uint tile)
{
- uint x = GET_TILE_X(tile);
- uint y = GET_TILE_Y(tile);
+ uint x = TileX(tile);
+ uint y = TileY(tile);
if ( x < 2 || y < 2 || x > MapMaxX() - 3 || y > MapMaxY() - 3) {
_error_message = STR_0239_SITE_UNSUITABLE;