From b84a1c2c0ebb484e23753c2f9db8742389fcc99a Mon Sep 17 00:00:00 2001 From: Astatin Date: Tue, 17 Jun 2025 17:42:44 +0200 Subject: loading ldtk tilemaps + adding dungeon structure that can be loaded at runtime --- modes/maploading.gbasm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'modes/maploading.gbasm') diff --git a/modes/maploading.gbasm b/modes/maploading.gbasm index 72f24ed..ab8ecbe 100644 --- a/modes/maploading.gbasm +++ b/modes/maploading.gbasm @@ -32,8 +32,11 @@ Map_Loading: LD A, $00 LD $mem_display_flag, A - LD A, bank(=Dungeon) - LD HL, ptr(=Dungeon) + LD A, ($mem_dungeon+1) + LD H, A + LD A, ($mem_dungeon+2) + LD L, A + LD A, ($mem_dungeon) CALL =Load_Dungeon_Txt LD A, $f4 @@ -57,8 +60,11 @@ Map_Loading: LD DE, ptr(=_map_Test) CALL =memcpy - LD A, bank(=Dungeon) - LD HL, ptr(=Dungeon) + LD A, ($mem_dungeon+1) + LD H, A + LD A, ($mem_dungeon+2) + LD L, A + LD A, ($mem_dungeon) CALL =Load_Dungeon_Spawn_patterns LD A, $entity_questgoalbunny_index LD $mem_loaded_special_entity_index, A -- cgit v1.2.3-70-g09d2