mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-21 15:08:53 +13:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
61
home/scrolling_menu.asm
Normal file
61
home/scrolling_menu.asm
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
ScrollingMenu::
|
||||
call CopyMenuData
|
||||
ldh a, [hROMBank]
|
||||
push af
|
||||
|
||||
ld a, BANK(_ScrollingMenu) ; aka BANK(_InitScrollingMenu)
|
||||
rst Bankswitch
|
||||
|
||||
call _InitScrollingMenu
|
||||
call .UpdatePalettes
|
||||
call _ScrollingMenu
|
||||
|
||||
pop af
|
||||
rst Bankswitch
|
||||
|
||||
ld a, [wMenuJoypad]
|
||||
ret
|
||||
|
||||
.UpdatePalettes:
|
||||
ld hl, wVramState
|
||||
bit 0, [hl]
|
||||
jp nz, UpdateTimePals
|
||||
jp SetPalettes
|
||||
|
||||
InitScrollingMenu::
|
||||
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
|
||||
|
||||
JoyTextDelay_ForcehJoyDown::
|
||||
call DelayFrame
|
||||
|
||||
ldh a, [hInMenu]
|
||||
push af
|
||||
ld a, $1
|
||||
ldh [hInMenu], a
|
||||
call JoyTextDelay
|
||||
pop af
|
||||
ldh [hInMenu], a
|
||||
|
||||
ldh a, [hJoyLast]
|
||||
and D_RIGHT + D_LEFT + D_UP + D_DOWN
|
||||
ld c, a
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON + B_BUTTON + SELECT + START
|
||||
or c
|
||||
ld c, a
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue