From 7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 7 Jan 2005 17:02:43 +0000 Subject: (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY] --- roadveh_cmd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'roadveh_cmd.c') 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; -- cgit v1.2.3-70-g09d2