aboutsummaryrefslogtreecommitdiff
path: root/map/generationevents.gbasm
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 /map/generationevents.gbasm
parent9690f6f39bdabcaa62211fd10027c3dba3169e94 (diff)
Add support for multi bank data
Diffstat (limited to 'map/generationevents.gbasm')
-rw-r--r--map/generationevents.gbasm30
1 files changed, 24 insertions, 6 deletions
diff --git a/map/generationevents.gbasm b/map/generationevents.gbasm
index 430b3fe..8a39b64 100644
--- a/map/generationevents.gbasm
+++ b/map/generationevents.gbasm
@@ -21,8 +21,8 @@ Generation_Event_Execution:
.skip:
LD A, L
- AND $fc
- ADD $04
+ AND $f8
+ ADD $08
LD L, A
CP $00
JR NZ, =.loop
@@ -51,6 +51,8 @@ Generation_Event_Jump_Table:
LD $mem_requested_mode, A
LD A, (HL+)
+ LD $mem_dialogue_script_bank, A
+ LD A, (HL+)
LD ($mem_dialogue_script_program_counter), A
LD A, (HL)
LD ($mem_dialogue_script_program_counter+1), A
@@ -79,11 +81,16 @@ Init_DemoQuest_Event:
INC HL
LD (HL), $01 ; jump table dialogue script
INC HL
- LD (HL), high(=Demo_quest_init)
+ LD (HL), bank(=Demo_quest_init)
+ INC HL
+ LD (HL), high(ptr(=Demo_quest_init))
+ INC HL
+ LD (HL), low(ptr(=Demo_quest_init))
INC HL
- LD (HL), low(=Demo_quest_init)
INC HL
+ INC HL
+ INC HL
LD (HL), $10 ; floor
INC HL
@@ -93,6 +100,10 @@ Init_DemoQuest_Event:
INC HL
INC HL
+ INC HL
+ INC HL
+ INC HL
+ INC HL
LD (HL), $10 ; floor
INC HL
@@ -101,13 +112,20 @@ Init_DemoQuest_Event:
INC HL
INC HL
+ INC HL
+ INC HL
+ INC HL
+ INC HL
LD (HL), $10 ; floor
INC HL
LD (HL), $01 ; jump table dialogue script
INC HL
- LD (HL), high(=Demo_quest_floor_reach)
+ LD (HL), bank(=Demo_quest_floor_reach)
+ INC HL
+ LD (HL), high(ptr(=Demo_quest_floor_reach))
INC HL
- LD (HL), low(=Demo_quest_floor_reach)
+ LD (HL), low(ptr(=Demo_quest_floor_reach))
+AAAAAAAAA:
RET