summaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
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];