Implement View Map mode [commit 4]: draw arrows OAM and refactor previous commit to support this (#29)

This commit is contained in:
xCrystal
2023-11-04 13:04:25 +01:00
parent c2e7422ba0
commit 8f3e9b04e2
11 changed files with 194 additions and 50 deletions

View File

@@ -77,6 +77,7 @@ BoardMenuScript::
callasm .EnterViewMapMode
appearplayermock
closetext
callasm .ViewMapModeOAM
end
.EnterViewMapMode:
@@ -102,6 +103,13 @@ BoardMenuScript::
set INVISIBLE_F, [hl]
ret
.ViewMapModeOAM:
; this runs after closetext to prevent graphical glitches with the board menu OAM
farcall LoadViewMapModeGFX
ld hl, wDisplaySecondarySprites
set SECONDARYSPRITES_VIEW_MAP_MODE_F, [hl]
ret
.SubmenuCallback:
; if submenu has requested a callback through wMenuReturn,
; it has also taken care of queuing it into wQueuedScriptBank/wQueuedScriptAddr.