summaryrefslogtreecommitdiff
path: root/src/engine/home.asm
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2016-01-26 20:13:32 +0100
committerxCrystal <rgr.crystal@gmail.com>2016-01-26 20:13:32 +0100
commit22846d42c053777e079f3ebdfc5f105bfb379c4a (patch)
tree5bbbd764ee5e724276f2ff8d242874d8a0fb3399 /src/engine/home.asm
parent5428dd5b63aff95421bbc770562efbd15d7d367c (diff)
wDoFrameFunction
Diffstat (limited to 'src/engine/home.asm')
-rwxr-xr-xsrc/engine/home.asm13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/engine/home.asm b/src/engine/home.asm
index 9c4466a..195641e 100755
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -723,7 +723,7 @@ DoFrame: ; 053f (0:053f)
push hl
push de
push bc
- ld hl, $cad3
+ ld hl, wDoFrameFunction ; context-specific function
call CallIndirect
call WaitForVBlank
call ReadJoypad
@@ -5090,17 +5090,18 @@ Func_3aed: ; 3aed (0:3aed)
INCBIN "baserom.gbc",$3b11,$3bd2 - $3b11
-Func_3bd2: ; 3bd2 (0:3bd2)
+; writes from hl the pointer to the function to be called by DoFrame
+SetDoFrameFunction: ; 3bd2 (0:3bd2)
ld a, l
- ld [$cad3], a
+ ld [wDoFrameFunction], a
ld a, h
- ld [$cad4], a
+ ld [wDoFrameFunction + 1], a
ret
-Func_3bdb: ; 3bdb (0:3bdb)
+ResetDoFrameFunction: ; 3bdb (0:3bdb)
push hl
ld hl, $0000
- call Func_3bd2
+ call SetDoFrameFunction
pop hl
ret
; 0x3be4