summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/overworld.asm56
-rw-r--r--engine/predef.asm4
-rw-r--r--engine/title.asm4
3 files changed, 8 insertions, 56 deletions
diff --git a/engine/overworld.asm b/engine/overworld.asm
deleted file mode 100644
index 3f52f6e..0000000
--- a/engine/overworld.asm
+++ /dev/null
@@ -1,56 +0,0 @@
-INCLUDE "constants.asm"
-
-SECTION "Startmenu and Select Button Check", ROM0[$2C05]
-
-OverworldStartButtonCheck:: ; 2c05 (0:2c05)
- ldh a, [hJoyState]
- bit START_F, a
- ret z
- and (START | B_BUTTON)
- cp (START | B_BUTTON)
- jr nz, .regularMenu
- ld a, [wce63]
- bit 1, a
- ret z ; debug disabled
- ld a, BANK(InGameDebugMenu)
- ld hl, InGameDebugMenu
- call FarCall_hl
- jr CheckStartmenuSelectHook
-.regularMenu
- ld a, BANK(DisplayStartMenu)
- ld hl, DisplayStartMenu
- call FarCall_hl
- jr CheckStartmenuSelectHook
-SelectButtonFunction:: ; 2c2a (0:2c2a)
- ld hl, CheckRegisteredItem
- ld a, BANK(CheckRegisteredItem)
- call FarCall_hl
-CheckStartmenuSelectHook:
- ldh a, [hStartmenuCloseAndSelectHookEnable]
- and a
- ret z ; hook is disabled
- ld hl, StartmenuCloseAndSelectHookPtr
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [StartmenuCloseAndSelectHookBank]
- call FarCall_hl
- ld hl, hStartmenuCloseAndSelectHookEnable
- xor a
- ld [hli], a ; clear hook enable and ???
- ld [hl], a
- dec a
- ret
-
-SECTION "Install StartMenu Hook Function", ROM0[$35EC]
-
-InstallStartmenuCloseAndSelectHook::
-; Install a function that is called as soon as
-; the start menu is closed or directly after
-; the select button function ran
- ld [StartmenuCloseAndSelectHookBank], a
- ld a, l
- ld [StartmenuCloseAndSelectHookPtr], a
- ld a, h
- ld [StartmenuCloseAndSelectHookPtr + 1], a
- ret
diff --git a/engine/predef.asm b/engine/predef.asm
index 8210266..14de69f 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -1,6 +1,10 @@
INCLUDE "constants.asm"
+if DEBUG
SECTION "Predef pointers", ROMX[$62B0], BANK[$01]
+else
+SECTION "Predef pointers", ROMX[$62AD], BANK[$01]
+endc
GetPredefPointer:: ; 1:62b0
ld a, h
diff --git a/engine/title.asm b/engine/title.asm
index 2ddaa44..961b83b 100644
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -6,7 +6,11 @@ IntroSequence:: ; 5d8c
; TODO
+if DEBUG
SECTION "Title screen TEMPORARY", ROMX[$62A5],BANK[1] ; TODO: merge this with the main section above
+else
+SECTION "Title screen TEMPORARY", ROMX[$62A2],BANK[1] ; TODO: merge this with the main section above
+endc
GameInit:: ; 62a5
call ClearWindowData