summaryrefslogtreecommitdiff
path: root/roadveh_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 /roadveh_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 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index e7b42e574..0e8d808c2 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -138,8 +138,8 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v->owner = _current_player;
v->tile = tile;
- x = GET_TILE_X(tile)*16 + 8;
- y = GET_TILE_Y(tile)*16 + 8;
+ x = TileX(tile) * 16 + 8;
+ y = TileY(tile) * 16 + 8;
v->x_pos = x;
v->y_pos = y;
v->z_pos = GetSlopeZ(x,y);
@@ -1107,8 +1107,8 @@ static void RoadVehEventHandler(Vehicle *v)
rd2 = _roadveh_data_2[dir];
rdp = _road_drive_data[(_opt.road_side<<4) + rd2];
- x = GET_TILE_X(v->tile)*16 + (rdp[6].x&0xF);
- y = GET_TILE_Y(v->tile)*16 + (rdp[6].y&0xF);
+ x = TileX(v->tile) * 16 + (rdp[6].x & 0xF);
+ y = TileY(v->tile) * 16 + (rdp[6].y & 0xF);
if (RoadVehFindCloseTo(v,x,y,v->direction))
return;
@@ -1192,8 +1192,8 @@ again:
tmp &= ~0x10;
- x = GET_TILE_X(tile)*16 + rdp[0].x;
- y = GET_TILE_Y(tile)*16 + rdp[0].y;
+ x = TileX(tile) * 16 + rdp[0].x;
+ y = TileY(tile) * 16 + rdp[0].y;
if (RoadVehFindCloseTo(v, x, y, newdir=RoadVehGetSlidingDirection(v, x, y)))
return;
@@ -1254,8 +1254,8 @@ again:
tmp = (_opt.road_side<<4) + dir;
rdp = _road_drive_data[tmp];
- x = GET_TILE_X(v->tile)*16 + rdp[1].x;
- y = GET_TILE_Y(v->tile)*16 + rdp[1].y;
+ x = TileX(v->tile) * 16 + rdp[1].x;
+ y = TileY(v->tile) * 16 + rdp[1].y;
if (RoadVehFindCloseTo(v, x, y, newdir=RoadVehGetSlidingDirection(v, x, y)))
return;