2018-06-24 14:09:41 +00:00
|
|
|
ScrollingMenu::
|
2018-04-05 04:35:14 +00:00
|
|
|
call CopyMenuData
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hROMBank]
|
2018-04-05 04:35:14 +00:00
|
|
|
push af
|
|
|
|
|
2019-01-12 20:17:20 +00:00
|
|
|
ld a, BANK(_ScrollingMenu) ; aka BANK(_InitScrollingMenu)
|
2018-04-05 04:35:14 +00:00
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
call _InitScrollingMenu
|
|
|
|
call .UpdatePalettes
|
|
|
|
call _ScrollingMenu
|
|
|
|
|
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
ld a, [wMenuJoypad]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.UpdatePalettes:
|
2018-04-05 04:35:14 +00:00
|
|
|
ld hl, wVramState
|
|
|
|
bit 0, [hl]
|
|
|
|
jp nz, UpdateTimePals
|
|
|
|
jp SetPalettes
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
InitScrollingMenu::
|
2018-04-05 04:35:14 +00: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
|
2019-04-08 12:15:10 +00:00
|
|
|
jp Textbox
|
2018-04-05 04:35:14 +00:00
|
|
|
|
2018-06-25 01:39:23 +00:00
|
|
|
JoyTextDelay_ForcehJoyDown::
|
2018-04-05 04:35:14 +00:00
|
|
|
call DelayFrame
|
|
|
|
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hInMenu]
|
2018-04-05 04:35:14 +00:00
|
|
|
push af
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hInMenu], a
|
2018-04-05 04:35:14 +00:00
|
|
|
call JoyTextDelay
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hInMenu], a
|
2018-04-05 04:35:14 +00:00
|
|
|
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hJoyLast]
|
2018-04-05 04:35:14 +00:00
|
|
|
and D_RIGHT + D_LEFT + D_UP + D_DOWN
|
|
|
|
ld c, a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hJoyPressed]
|
2018-04-05 04:35:14 +00:00
|
|
|
and A_BUTTON + B_BUTTON + SELECT + START
|
|
|
|
or c
|
|
|
|
ld c, a
|
|
|
|
ret
|