2018-06-24 07:09:41 -07:00
|
|
|
ScrollingMenu::
|
2018-04-04 21:35:14 -07:00
|
|
|
call CopyMenuData
|
|
|
|
ld a, [hROMBank]
|
|
|
|
push af
|
|
|
|
|
|
|
|
ld a, BANK(_ScrollingMenu)
|
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
call _InitScrollingMenu
|
|
|
|
call .UpdatePalettes
|
|
|
|
call _ScrollingMenu
|
|
|
|
|
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
ld a, [wMenuJoypad]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.UpdatePalettes:
|
2018-04-04 21:35:14 -07:00
|
|
|
ld hl, wVramState
|
|
|
|
bit 0, [hl]
|
|
|
|
jp nz, UpdateTimePals
|
|
|
|
jp SetPalettes
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
InitScrollingMenu::
|
2018-04-04 21:35:14 -07:00
|
|
|
ld a, [wMenuBorderTopCoord]
|
|
|
|
dec a
|
|
|
|
ld b, a
|
|
|
|
ld a, [wMenuBorderBottomCoord]
|
|
|
|
sub b
|
|
|
|
ld d, a
|
|
|
|
ld a, [wMenuBorderLeftCoord]
|
|
|
|
dec a
|
|
|
|
ld c, a
|
|
|
|
ld a, [wMenuBorderRightCoord]
|
|
|
|
sub c
|
|
|
|
ld e, a
|
|
|
|
push de
|
|
|
|
call Coord2Tile
|
|
|
|
pop bc
|
|
|
|
jp TextBox
|
|
|
|
|
2018-06-24 18:39:23 -07:00
|
|
|
JoyTextDelay_ForcehJoyDown::
|
2018-04-04 21:35:14 -07:00
|
|
|
call DelayFrame
|
|
|
|
|
|
|
|
ld a, [hInMenu]
|
|
|
|
push af
|
|
|
|
ld a, $1
|
|
|
|
ld [hInMenu], a
|
|
|
|
call JoyTextDelay
|
|
|
|
pop af
|
|
|
|
ld [hInMenu], a
|
|
|
|
|
|
|
|
ld a, [hJoyLast]
|
|
|
|
and D_RIGHT + D_LEFT + D_UP + D_DOWN
|
|
|
|
ld c, a
|
|
|
|
ld a, [hJoyPressed]
|
|
|
|
and A_BUTTON + B_BUTTON + SELECT + START
|
|
|
|
or c
|
|
|
|
ld c, a
|
|
|
|
ret
|