All tiles are now walls by default.
; writes map to map buffer and mapgen_header
; writes tiles to mapgen_tiles
map_generate:
- ; clear the map
- ld d, TT_WALL
+ ; clear the map with wall tiles
+ ld d, 0
ld hl, mapgen_tiles
ld bc, MAP_TILES
call memset
call map_generate
call player_init
- ld de, l1
+ ld de, mapgen_map_header
call map_load
ld hl, update_game
; - possible actors that may spawn
mapgen_floor: .adv 1
- ; generated map header
-mapgen_map_header: .adv map_header_size
; collision related data
; y/x positions
render_canary: .adv 4
#endif
+; generated map header
+mapgen_map_header: .adv map_header_size
; mapgen tile memory
mapgen_tiles: .adv MAP_TILES