diff options
author | tron <tron@openttd.org> | 2005-01-06 11:39:00 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-06 11:39:00 +0000 |
commit | f8c95a1dbeac23296cacc83ae25d2a8b352cd83d (patch) | |
tree | f875975dc056d7d3fea370018fa0bdf62837fd3e /tree_cmd.c | |
parent | 790b03c7071388addd4cb064e473e96f8e1f12e0 (diff) | |
download | openttd-f8c95a1dbeac23296cacc83ae25d2a8b352cd83d.tar.xz |
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
Diffstat (limited to 'tree_cmd.c')
-rw-r--r-- | tree_cmd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tree_cmd.c b/tree_cmd.c index 1f39d58e2..dc60dd7f5 100644 --- a/tree_cmd.c +++ b/tree_cmd.c @@ -466,15 +466,15 @@ static void TileLoop_Trees(uint tile) byte m5; uint16 m2; - static const TileIndexDiff _tileloop_trees_dir[] = { - TILE_XY(-1,-1), - TILE_XY(0,-1), - TILE_XY(1,-1), - TILE_XY(-1,0), - TILE_XY(1,0), - TILE_XY(-1,1), - TILE_XY(0,1), - TILE_XY(1,1), + static const TileIndexDiffC _tileloop_trees_dir[] = { + {-1, -1}, + { 0, -1}, + { 1, -1}, + {-1, 0}, + { 1, 0}, + {-1, 1}, + { 0, 1}, + { 1, 1} }; if (_opt.landscape == LT_DESERT) { @@ -514,7 +514,7 @@ static void TileLoop_Trees(uint tile) case 2: { /* add a neighbouring tree */ byte m3 = _map3_lo[tile]; - tile += _tileloop_trees_dir[Random() & 7]; + tile += ToTileIndexDiff(_tileloop_trees_dir[Random() & 7]); if (!IS_TILETYPE(tile, MP_CLEAR)) return; |