diff options
author | tron <tron@openttd.org> | 2005-01-07 17:02:43 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-07 17:02:43 +0000 |
commit | 7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4 (patch) | |
tree | e4137b60a824b45ce09f668d58520e36dba10256 /rail_cmd.c | |
parent | f5c33e50733c46cee14e84ade6da0c171d96064b (diff) | |
download | openttd-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 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 763dd0965..cab96d87e 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -983,8 +983,8 @@ int32 CmdBuildManySignals(int x, int y, uint32 flags, uint32 p1, uint32 p2) SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); /* unpack end tile */ - ex = GET_TILE_X(p1)*16; - ey = GET_TILE_Y(p1)*16; + ex = TileX(p1) * 16; + ey = TileY(p1) * 16; railbit = _railbit.initial[((p2 >> 4)&0xF) + (x > ex ? 4 : 0) + (y > ey ? 8 : 0)]; @@ -1144,8 +1144,8 @@ int32 CmdConvertRail(int ex, int ey, uint32 flags, uint32 p1, uint32 p2) SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); // make sure sx,sy are smaller than ex,ey - sx = GET_TILE_X(p1)*16; - sy = GET_TILE_Y(p1)*16; + sx = TileX(p1) * 16; + sy = TileY(p1) * 16; if (ex < sx) intswap(ex, sx); if (ey < sy) intswap(ey, sy); |