2019-11-03 19:46:21 +00:00
|
|
|
SetMenuAttributes::
|
2013-09-03 22:43:15 +00:00
|
|
|
push hl
|
|
|
|
push bc
|
2019-11-03 19:46:21 +00: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 22:43:15 +00:00
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2019-11-03 19:46:21 +00:00
|
|
|
StaticMenuJoypad::
|
|
|
|
callfar _StaticMenuJoypad
|
2015-12-15 23:59:49 +00:00
|
|
|
call GetMenuJoypad
|
2013-09-03 22:43:15 +00:00
|
|
|
ret
|
|
|
|
|
2019-11-03 19:46:21 +00:00
|
|
|
ScrollingMenuJoypad::
|
|
|
|
callfar _ScrollingMenuJoypad
|
|
|
|
call GetMenuJoypad
|
2013-09-03 22:43:15 +00:00
|
|
|
ret
|
|
|
|
|
2019-11-03 19:46:21 +00:00
|
|
|
GetMenuJoypad::
|
|
|
|
push bc
|
2013-09-03 22:43:15 +00:00
|
|
|
push af
|
2019-11-03 19:46:21 +00:00
|
|
|
ldh a, [hJoyLast]
|
|
|
|
and D_PAD
|
2013-09-03 22:43:15 +00:00
|
|
|
ld b, a
|
2019-11-03 19:46:21 +00:00
|
|
|
ldh a, [hJoyPressed]
|
|
|
|
and BUTTONS
|
|
|
|
or b
|
2013-09-03 22:43:15 +00:00
|
|
|
ld b, a
|
2019-11-03 19:46:21 +00:00
|
|
|
pop af
|
|
|
|
ld a, b
|
|
|
|
pop bc
|
2013-09-03 22:43:15 +00:00
|
|
|
ret
|
|
|
|
|
2019-11-03 19:46:21 +00:00
|
|
|
PlaceHollowCursor::
|
|
|
|
ld hl, wCursorCurrentTile
|
2013-09-03 22:43:15 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2019-11-03 19:46:21 +00:00
|
|
|
ld [hl], "▷"
|
2013-09-03 22:43:15 +00:00
|
|
|
ret
|
|
|
|
|
2019-11-03 19:46:21 +00:00
|
|
|
HideCursor::
|
|
|
|
ld hl, wCursorCurrentTile
|
2013-09-03 22:43:15 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2019-11-03 19:46:21 +00:00
|
|
|
ld [hl], " "
|
2013-09-03 22:43:15 +00:00
|
|
|
ret
|