You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Board menu: implement preliminary Party, Bag, Pokegear, and Exit submenus (#11)
This commit is contained in:
@@ -11,6 +11,9 @@ OverworldLoop::
|
||||
cp MAPSTATUS_DONE
|
||||
jr nz, .loop
|
||||
.done
|
||||
call DisableOverworldHUD
|
||||
ld hl, wGameTimerPaused
|
||||
res GAME_TIMER_PAUSED_F, [hl] ; stop game timer counter
|
||||
ret
|
||||
|
||||
.Jumptable:
|
||||
@@ -105,6 +108,8 @@ StartMap:
|
||||
call ByteFill
|
||||
farcall InitCallReceiveDelay
|
||||
call ClearJoypad
|
||||
ld a, BOARDEVENT_DISPLAY_MENU
|
||||
ld [hCurBoardEvent], a
|
||||
EnterMap:
|
||||
xor a
|
||||
ld [wXYComparePointer], a
|
||||
@@ -238,6 +243,9 @@ PlayerEvents:
|
||||
and a
|
||||
ret nz
|
||||
|
||||
call CheckBoardEvent
|
||||
jr c, .ok
|
||||
|
||||
call CheckTrainerBattle_GetPlayerEvent
|
||||
jr c, .ok
|
||||
|
||||
@@ -269,6 +277,28 @@ PlayerEvents:
|
||||
scf
|
||||
ret
|
||||
|
||||
CheckBoardEvent:
|
||||
jumptable .Jumptable, hCurBoardEvent
|
||||
|
||||
.Jumptable:
|
||||
table_width 2, .Jumptable
|
||||
dw .none
|
||||
dw .menu
|
||||
assert_table_length NUM_BOARD_EVENTS + 1
|
||||
|
||||
.none
|
||||
xor a
|
||||
ret
|
||||
|
||||
.menu
|
||||
ld a, BANK(BoardMenuScript)
|
||||
ld hl, BoardMenuScript
|
||||
call CallScript
|
||||
xor a
|
||||
ld [hCurBoardEvent], a
|
||||
scf
|
||||
ret
|
||||
|
||||
CheckTrainerBattle_GetPlayerEvent:
|
||||
call CheckTrainerBattle
|
||||
jr nc, .nope
|
||||
|
||||
@@ -234,6 +234,7 @@ ScriptCommandTable:
|
||||
dw Script_getname ; a7
|
||||
dw Script_wait ; a8
|
||||
dw Script_checksave ; a9
|
||||
dw Script_exitoverworld ; aa
|
||||
assert_table_length NUM_EVENT_COMMANDS
|
||||
|
||||
StartScript:
|
||||
@@ -2329,6 +2330,14 @@ ReturnFromCredits:
|
||||
call StopScript
|
||||
ret
|
||||
|
||||
Script_exitoverworld:
|
||||
call GetScriptByte
|
||||
call Script_endall
|
||||
ld a, MAPSTATUS_DONE
|
||||
call LoadMapStatus
|
||||
call StopScript
|
||||
ret
|
||||
|
||||
Script_wait:
|
||||
push bc
|
||||
call GetScriptByte
|
||||
|
||||
Reference in New Issue
Block a user