aboutsummaryrefslogtreecommitdiff
path: root/modes
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-06-10 18:27:13 +0200
committerAstatin <[email protected]>2025-06-10 18:27:13 +0200
commita9142d0163f41c89196ea201ce8245899c701b82 (patch)
treefee05913dc30343798c4ccc9062ece30bdacbbec /modes
parent9690f6f39bdabcaa62211fd10027c3dba3169e94 (diff)
Add support for multi bank data
Diffstat (limited to 'modes')
-rw-r--r--modes/dungeongeneration.gbasm8
-rw-r--r--modes/maploading.gbasm13
2 files changed, 15 insertions, 6 deletions
diff --git a/modes/dungeongeneration.gbasm b/modes/dungeongeneration.gbasm
index c459805..172093f 100644
--- a/modes/dungeongeneration.gbasm
+++ b/modes/dungeongeneration.gbasm
@@ -32,7 +32,8 @@ New_Dungeon:
LD A, $00
LD $mem_display_flag, A
- LD HL, =Dungeon
+ LD A, bank(=Dungeon)
+ LD HL, ptr(=Dungeon)
CALL =Load_Dungeon_Txt
LD A, $f4
@@ -51,7 +52,8 @@ New_Dungeon:
CALL =Reset_Map
- LD HL, =Dungeon
+ LD A, bank(=Dungeon)
+ LD HL, ptr(=Dungeon)
CALL =Load_Dungeon_Spawn_patterns
LD A, $entity_questgoalbunny_index
LD $mem_loaded_special_entity_index, A
@@ -96,6 +98,8 @@ New_Dungeon:
CALL =Generation_Event_Execution
+ LD HL, $mem_entities_list
+ CALL =Center_viewport_around_entity
CALL =Load_Prepared_Map
CALL =VBlank_Wait
diff --git a/modes/maploading.gbasm b/modes/maploading.gbasm
index d96bca0..72f24ed 100644
--- a/modes/maploading.gbasm
+++ b/modes/maploading.gbasm
@@ -32,7 +32,8 @@ Map_Loading:
LD A, $00
LD $mem_display_flag, A
- LD HL, =Dungeon
+ LD A, bank(=Dungeon)
+ LD HL, ptr(=Dungeon)
CALL =Load_Dungeon_Txt
LD A, $f4
@@ -50,12 +51,14 @@ Map_Loading:
CALL =Reset_Map
+ .LOAD_BANK_OF =_map_Test
LD HL, $mem_dungeon_map
LD BC, $0080
- LD DE, =_map_Test
+ LD DE, ptr(=_map_Test)
CALL =memcpy
- LD HL, =Dungeon
+ LD A, bank(=Dungeon)
+ LD HL, ptr(=Dungeon)
CALL =Load_Dungeon_Spawn_patterns
LD A, $entity_questgoalbunny_index
LD $mem_loaded_special_entity_index, A
@@ -64,7 +67,9 @@ Map_Loading:
LD B, $0f
LD C, $0f
CALL =Initialize_Bunny
- CALL =Reset_viewport_thingies
+
+ LD HL, $mem_entities_list
+ CALL =Center_viewport_around_entity
LD A, $mem_map_loading_flags
OR $01