aboutsummaryrefslogtreecommitdiff
path: root/modes/maploading.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-06-17 17:42:44 +0200
committerAstatin <[email protected]>2025-06-17 17:42:44 +0200
commitb84a1c2c0ebb484e23753c2f9db8742389fcc99a (patch)
tree0036439ad1a5cc4c08c4bef79c0255b851a894f2 /modes/maploading.gbasm
parenta9142d0163f41c89196ea201ce8245899c701b82 (diff)
loading ldtk tilemaps + adding dungeon structure that can be loaded at runtime
Diffstat (limited to 'modes/maploading.gbasm')
-rw-r--r--modes/maploading.gbasm14
1 files changed, 10 insertions, 4 deletions
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