summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xengine/specials.asm4
-rw-r--r--home.asm15
-rwxr-xr-xhome/queue_script.asm12
-rw-r--r--wram.asm4
4 files changed, 21 insertions, 14 deletions
diff --git a/engine/specials.asm b/engine/specials.asm
index c6ccef66..c12198bf 100755
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -342,9 +342,9 @@ DummyNonfunctionalGameCornerGame: ; c4e7 (3:44e7)
ret
Functionc4f4: ; c4f4 (3:44f4)
- call Function3425
+ call FarQueueScript
call FadeToMenu
- ld hl, wcfd8
+ ld hl, wQueuedScriptBank
ld a, [hli]
push af
ld a, [hli]
diff --git a/home.asm b/home.asm
index 6437eb68..832eafc5 100644
--- a/home.asm
+++ b/home.asm
@@ -194,29 +194,24 @@ SkipNames::
INCLUDE "home/math.asm"
INCLUDE "home/print_text.asm"
-Function3414::
+CallPointerAt::
ldh a, [hROMBank]
push af
ld a, [hli]
rst Bankswitch
+
ld a, [hli]
ld h, [hl]
ld l, a
+
call _hl_
+
pop hl
ld a, h
rst Bankswitch
ret
-QueueScript::
- ldh a, [hROMBank]
-Function3425::
- ld [wcfd8], a
- ld a, l
- ld [wcfd9], a
- ld a, h
- ld [wcfda], a
- ret
+INCLUDE "home/queue_script.asm"
Function3431::
.asm_3431
diff --git a/home/queue_script.asm b/home/queue_script.asm
new file mode 100755
index 00000000..23f80d24
--- /dev/null
+++ b/home/queue_script.asm
@@ -0,0 +1,12 @@
+QueueScript::
+; Push pointer hl in the current bank to wQueuedScriptBank.
+ ldh a, [hROMBank]
+
+FarQueueScript::
+; Push pointer a:hl to wQueuedScriptBank.
+ ld [wQueuedScriptBank], a
+ ld a, l
+ ld [wQueuedScriptAddr], a
+ ld a, h
+ ld [wQueuedScriptAddr + 1], a
+ ret \ No newline at end of file
diff --git a/wram.asm b/wram.asm
index 322c1690..8ccb22f1 100644
--- a/wram.asm
+++ b/wram.asm
@@ -2424,8 +2424,8 @@ wcfd4:: ds 1 ; cfd4
wcfd5:: ds 1 ; cfd5
wcfd6:: ds 1 ; cfd6
wcfd7:: ds 1 ; cfd7
-wcfd8:: ds 1 ; cfd8
-wcfd9:: ds 1 ; cfd9
+wQueuedScriptBank:: ds 1 ; cfd8
+wQueuedScriptAddr:: ds 1 ; cfd9
wcfda:: ds 1 ; cfda
wPredefID:: ds 1 ; cfdb
wPredefTemp:: dw ; cfdc