2019-11-03 11:46:21 -08:00
|
|
|
SetMenuAttributes::
|
2013-09-03 15:43:15 -07:00
|
|
|
push hl
|
|
|
|
push bc
|
2019-11-03 11:46:21 -08:00
|
|
|
ld hl, w2DMenuCursorInitY
|
|
|
|
ld b, $8
|
|
|
|
.loop
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ld a, $1
|
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
2013-09-03 15:43:15 -07:00
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2019-11-03 11:46:21 -08:00
|
|
|
StaticMenuJoypad::
|
|
|
|
callfar _StaticMenuJoypad
|
2015-12-15 15:59:49 -08:00
|
|
|
call GetMenuJoypad
|
2013-09-03 15:43:15 -07:00
|
|
|
ret
|
|
|
|
|
2019-11-03 11:46:21 -08:00
|
|
|
ScrollingMenuJoypad::
|
|
|
|
callfar _ScrollingMenuJoypad
|
|
|
|
call GetMenuJoypad
|
2013-09-03 15:43:15 -07:00
|
|
|
ret
|
|
|
|
|
2019-11-03 11:46:21 -08:00
|
|
|
GetMenuJoypad::
|
|
|
|
push bc
|
2013-09-03 15:43:15 -07:00
|
|
|
push af
|
2019-11-03 11:46:21 -08:00
|
|
|
ldh a, [hJoyLast]
|
|
|
|
and D_PAD
|
2013-09-03 15:43:15 -07:00
|
|
|
ld b, a
|
2019-11-03 11:46:21 -08:00
|
|
|
ldh a, [hJoyPressed]
|
|
|
|
and BUTTONS
|
|
|
|
or b
|
2013-09-03 15:43:15 -07:00
|
|
|
ld b, a
|
2019-11-03 11:46:21 -08:00
|
|
|
pop af
|
|
|
|
ld a, b
|
|
|
|
pop bc
|
2013-09-03 15:43:15 -07:00
|
|
|
ret
|
|
|
|
|
2019-11-03 11:46:21 -08:00
|
|
|
PlaceHollowCursor::
|
|
|
|
ld hl, wCursorCurrentTile
|
2013-09-03 15:43:15 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2019-11-03 11:46:21 -08:00
|
|
|
ld [hl], "▷"
|
2013-09-03 15:43:15 -07:00
|
|
|
ret
|
|
|
|
|
2019-11-03 11:46:21 -08:00
|
|
|
HideCursor::
|
|
|
|
ld hl, wCursorCurrentTile
|
2013-09-03 15:43:15 -07:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2019-11-03 11:46:21 -08:00
|
|
|
ld [hl], " "
|
2013-09-03 15:43:15 -07:00
|
|
|
ret
|