From: Lukas Krickl Date: Tue, 10 Feb 2026 12:06:16 +0000 (+0100) Subject: mapgen: the generated map is now loaded X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=8f92580e3071238ec629a1c7713b7d091d59c762;p=gbrg%2F.git mapgen: the generated map is now loaded All tiles are now walls by default. --- diff --git a/src/mapgen.s b/src/mapgen.s index 13763de..7fbf8c6 100644 --- a/src/mapgen.s +++ b/src/mapgen.s @@ -4,8 +4,8 @@ ; 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 diff --git a/src/update.s b/src/update.s index 11210a8..fa2969b 100644 --- a/src/update.s +++ b/src/update.s @@ -162,7 +162,7 @@ new_game: call map_generate call player_init - ld de, l1 + ld de, mapgen_map_header call map_load ld hl, update_game diff --git a/src/wram.s b/src/wram.s index 6741772..376d05a 100644 --- a/src/wram.s +++ b/src/wram.s @@ -134,8 +134,6 @@ mapgen_game_seed: .adv 2 ; - 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 @@ -172,6 +170,8 @@ map_mark_flag: .adv 1 render_canary: .adv 4 #endif +; generated map header +mapgen_map_header: .adv map_header_size ; mapgen tile memory mapgen_tiles: .adv MAP_TILES