summaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-03 18:59:58 +0000
committertron <tron@openttd.org>2005-01-03 18:59:58 +0000
commitc0702318d27d327e449b7f954dd15c0e46403f5c (patch)
tree294d2e8a0c3b227b0a8b5baf6e113d2043432d81 /map.c
parentd382463f8afad00bc944c3057c2e9a0ac90e721c (diff)
downloadopenttd-c0702318d27d327e449b7f954dd15c0e46403f5c.tar.xz
(svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) instead of TILES_[XY]
Diffstat (limited to 'map.c')
-rw-r--r--map.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/map.c b/map.c
index 034d4fa70..1c349e40f 100644
--- a/map.c
+++ b/map.c
@@ -5,10 +5,12 @@
uint _map_log_x = TILE_X_BITS;
uint _map_log_y = TILE_Y_BITS;
-byte _map_type_and_height [TILES_X * TILES_Y];
-byte _map5 [TILES_X * TILES_Y];
-byte _map3_lo [TILES_X * TILES_Y];
-byte _map3_hi [TILES_X * TILES_Y];
-byte _map_owner [TILES_X * TILES_Y];
-uint16 _map2 [TILES_X * TILES_Y];
-byte _map_extra_bits [TILES_X * TILES_Y / 4];
+#define MAP_SIZE ((1 << TILE_X_BITS) * (1 << TILE_Y_BITS))
+
+byte _map_type_and_height [MAP_SIZE];
+byte _map5 [MAP_SIZE];
+byte _map3_lo [MAP_SIZE];
+byte _map3_hi [MAP_SIZE];
+byte _map_owner [MAP_SIZE];
+uint16 _map2 [MAP_SIZE];
+byte _map_extra_bits [MAP_SIZE / 4];