From f8c95a1dbeac23296cacc83ae25d2a8b352cd83d Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 6 Jan 2005 11:39:00 +0000 Subject: (svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff --- rail_gui.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'rail_gui.c') diff --git a/rail_gui.c b/rail_gui.c index f80590e68..5e0ea7a33 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -385,14 +385,14 @@ static int GetBestFit1x1(int x, int y) // get the rail in each direction tile = TILE_FROM_XY(x,y); for(i=0; i!=5; i++) { - static TileIndexDiff _tile_inc[5] = { - TILE_XY(-1, 0), - TILE_XY(0, 1) - TILE_XY(-1, 0), - TILE_XY(1, 0) - TILE_XY(0, 1), - TILE_XY(0, -1) - TILE_XY(1, 0), - TILE_XY(0, 0) - TILE_XY(0, -1), + static const TileIndexDiffC _tile_inc[] = { + {-1 , 0 }, + { 0 - -1, 1 - 0}, + { 1 - 0, 0 - 1}, + { 0 - 1, -1 - 0}, + { 0 - 0, 0 - -1} }; - tile += _tile_inc[i]; + tile += ToTileIndexDiff(_tile_inc[i]); m[i] = 0; if (IS_TILETYPE(tile, MP_RAILWAY) && _map5[tile] < 0x80) m[i] = _map5[tile]&0x3F; -- cgit v1.2.3-54-g00ecf