You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
More menu stuff
This commit is contained in:
@@ -2323,7 +2323,7 @@ _ChangeBox: ; e35aa (38:75aa)
|
||||
hlcoord 0, 4
|
||||
lb bc, 8, 9
|
||||
call TextBox
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuJoypad]
|
||||
cp B_BUTTON
|
||||
jr z, .done
|
||||
|
||||
@@ -11,16 +11,16 @@ _KrisDecorationMenu: ; 0x2675c
|
||||
ld hl, .MenuDataHeader
|
||||
call LoadMenuDataHeader
|
||||
xor a
|
||||
ld [wd1ee], a
|
||||
ld [Buffer5], a
|
||||
ld a, $1
|
||||
ld [wd1ef], a
|
||||
ld [Buffer6], a
|
||||
.top_loop
|
||||
ld a, [wd1ef]
|
||||
ld a, [Buffer6]
|
||||
ld [wMenuCursorBuffer], a
|
||||
call .FindCategoriesWithOwnedDecos
|
||||
call DoNthMenu
|
||||
ld a, [wMenuCursorY]
|
||||
ld [wd1ef], a
|
||||
ld [Buffer6], a
|
||||
jr c, .exit_menu
|
||||
ld a, [MenuSelection]
|
||||
ld hl, .pointers
|
||||
@@ -31,7 +31,7 @@ _KrisDecorationMenu: ; 0x2675c
|
||||
call ExitMenu
|
||||
pop af
|
||||
ld [wcf76], a
|
||||
ld a, [wd1ee]
|
||||
ld a, [Buffer5]
|
||||
ld c, a
|
||||
ret
|
||||
; 0x2679a
|
||||
@@ -400,7 +400,7 @@ PopulateDecoCategoryMenu: ; 2695b
|
||||
call InitScrollingMenu
|
||||
xor a
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuJoypad]
|
||||
cp 2
|
||||
jr z, .no_action_2
|
||||
@@ -803,7 +803,7 @@ DecoAction_TrySetItUp: ; 26d2d
|
||||
call DecoAction_SetItUp
|
||||
jr c, .failed
|
||||
ld a, 1
|
||||
ld [wd1ee], a
|
||||
ld [Buffer5], a
|
||||
pop hl
|
||||
ld a, [MenuSelection]
|
||||
ld [hl], a
|
||||
@@ -865,7 +865,7 @@ DecoAction_TryPutItAway: ; 26d86
|
||||
jr z, .nothingthere
|
||||
; Put it away.
|
||||
ld a, $1
|
||||
ld [wd1ee], a
|
||||
ld [Buffer5], a
|
||||
ld a, [Buffer1]
|
||||
ld [MenuSelection], a
|
||||
ld hl, StringBuffer3
|
||||
@@ -889,7 +889,7 @@ DecoAction_setupornament: ; 26db3
|
||||
call DecoAction_SetItUp_Ornament
|
||||
jr c, .cancel
|
||||
ld a, $1
|
||||
ld [wd1ee], a
|
||||
ld [Buffer5], a
|
||||
jr DecoAction_FinishUp_Ornament
|
||||
|
||||
.cancel
|
||||
@@ -981,7 +981,7 @@ DecoAction_PutItAway_Ornament: ; 26e46
|
||||
ld hl, StringBuffer3
|
||||
call GetDecorationName
|
||||
ld a, $1
|
||||
ld [wd1ee], a
|
||||
ld [Buffer5], a
|
||||
xor a
|
||||
ld [wd1ec], a
|
||||
ld hl, DecoText_PutAwayTheDeco
|
||||
|
||||
@@ -545,7 +545,7 @@ Continue_LoadMenuHeader: ; 5ebf
|
||||
ld hl, .MenuDataHeader_NoDex
|
||||
|
||||
.pokedex_header
|
||||
call Function1e35
|
||||
call _OffsetMenuDataHeader
|
||||
call MenuBox
|
||||
call PlaceVerticalMenuItems
|
||||
ret
|
||||
|
||||
@@ -1271,7 +1271,7 @@ Function28835: ; 28835
|
||||
jp nz, Function2891c
|
||||
xor a
|
||||
ld [MonType], a
|
||||
call Function1bf7
|
||||
call HideCursor
|
||||
push hl
|
||||
push bc
|
||||
ld bc, NAME_LENGTH
|
||||
@@ -1333,7 +1333,7 @@ Function288c5: ; 288c5
|
||||
jp nz, Function2891c
|
||||
ld a, $1
|
||||
ld [MonType], a
|
||||
call Function1bf7
|
||||
call HideCursor
|
||||
push hl
|
||||
push bc
|
||||
ld bc, NAME_LENGTH
|
||||
@@ -1353,7 +1353,7 @@ Function288c5: ; 288c5
|
||||
ld a, [PartyCount]
|
||||
cp b
|
||||
jr nz, Function2891c
|
||||
call Function1bf7
|
||||
call HideCursor
|
||||
push hl
|
||||
push bc
|
||||
ld bc, NAME_LENGTH
|
||||
@@ -1463,7 +1463,7 @@ Function28926: ; 28926
|
||||
jp Function2888b
|
||||
|
||||
.asm_289fe
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
pop af
|
||||
ld [wMenuCursorY], a
|
||||
dec a
|
||||
@@ -1552,7 +1552,7 @@ Function28ac9: ; 28ac9
|
||||
ld a, [wMenuCursorY]
|
||||
cp $1
|
||||
jp nz, Function2891c
|
||||
call Function1bf7
|
||||
call HideCursor
|
||||
push hl
|
||||
push bc
|
||||
ld bc, NAME_LENGTH
|
||||
|
||||
@@ -399,7 +399,7 @@ MailboxPC: ; 0x44806
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [OBPals + 8 * 6]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [OBPals + 8 * 6], a
|
||||
ld a, [wMenuCursorY]
|
||||
|
||||
@@ -530,7 +530,7 @@ endr
|
||||
Function4a098: ; 4a098 (12:6098)
|
||||
ld a, $2
|
||||
call MenuClickSound
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
call WaitBGMap
|
||||
call LoadStandardMenuDataHeader
|
||||
callba Function89de0
|
||||
@@ -749,7 +749,7 @@ Function4a28a: ; 4a28a (12:628a)
|
||||
lb bc, 6, 1
|
||||
ld a, " "
|
||||
call Function4a6d8
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
call WaitBGMap
|
||||
call LoadStandardMenuDataHeader
|
||||
ld a, $5
|
||||
@@ -786,7 +786,7 @@ Function4a28a: ; 4a28a (12:628a)
|
||||
scf
|
||||
ret
|
||||
.asm_4a2f0
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
ld hl, UnknownText_0x4a358
|
||||
call PrintText
|
||||
hlcoord 14, 7
|
||||
|
||||
@@ -470,7 +470,7 @@ endr
|
||||
|
||||
|
||||
BuyMenuLoop: ; 15cef
|
||||
callba PlaceMoneyTopRightOW
|
||||
callba PlaceMoneyTopRight
|
||||
call UpdateSprites
|
||||
ld hl, MenuDataHeader_Buy
|
||||
call CopyMenuDataHeader
|
||||
@@ -478,7 +478,7 @@ BuyMenuLoop: ; 15cef
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wd045 + 1]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wd045 + 1], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -875,7 +875,7 @@ Function15ee0: ; 15ee0
|
||||
.okay_to_sell
|
||||
ld hl, Text_Mart_SellHowMany
|
||||
call PrintText
|
||||
callba PlaceMoneyTopRightMenu
|
||||
callba PlaceMoneyAtTopLeftOfTextbox
|
||||
callba SelectQuantityToSell
|
||||
call ExitMenu
|
||||
jr c, .declined
|
||||
@@ -899,7 +899,7 @@ Function15ee0: ; 15ee0
|
||||
ld hl, Text_Mart_SoldForAmount
|
||||
call PrintTextBoxText
|
||||
call PlayTransactionSound
|
||||
callba PlaceMoneyBottomLeftOW
|
||||
callba PlaceMoneyBottomLeft
|
||||
call JoyWaitAorB
|
||||
|
||||
.declined
|
||||
|
||||
@@ -69,7 +69,7 @@ Pack: ; 10000
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wItemsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wItemsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -97,7 +97,7 @@ Pack: ; 10000
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wKeyItemsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wKeyItemsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -230,7 +230,7 @@ Pack: ; 10000
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wBallsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wBallsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -528,7 +528,7 @@ TossMenu: ; 10364
|
||||
pop af
|
||||
jr c, .finish
|
||||
ld hl, NumItems
|
||||
ld a, [ItemCountBuffer]
|
||||
ld a, [CurItemQuantity]
|
||||
call TossItem
|
||||
call Pack_GetItemName
|
||||
ld hl, Text_ThrewAway
|
||||
@@ -577,7 +577,7 @@ RegisterItem: ; 103c2
|
||||
rrca
|
||||
and $c0
|
||||
ld b, a
|
||||
ld a, [ItemCountBuffer]
|
||||
ld a, [CurItemQuantity]
|
||||
inc a
|
||||
and $3f
|
||||
or b
|
||||
@@ -734,7 +734,7 @@ BattlePack: ; 10493
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wItemsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wItemsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -762,7 +762,7 @@ BattlePack: ; 10493
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wKeyItemsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wKeyItemsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -813,7 +813,7 @@ BattlePack: ; 10493
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wBallsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wBallsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -1018,7 +1018,7 @@ DepositSellPack: ; 106be
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wItemsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wItemsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -1034,7 +1034,7 @@ DepositSellPack: ; 106be
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wKeyItemsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wKeyItemsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -1059,7 +1059,7 @@ DepositSellPack: ; 106be
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wBallsPocketScrollPosition]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wBallsPocketScrollPosition], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -1243,7 +1243,7 @@ TutorialPack: ; 107bb
|
||||
call InitPocket
|
||||
pop hl
|
||||
call CopyMenuDataHeader
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ret
|
||||
|
||||
Pack_JumptableNext: ; 10866 (4:4866)
|
||||
|
||||
@@ -739,7 +739,7 @@ PartyMenuAttributes: ; 5044f
|
||||
PartyMenuSelect: ; 0x50457
|
||||
; sets carry if exitted menu.
|
||||
call StaticMenuJoypad
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
ld a, [PartyCount]
|
||||
inc a
|
||||
ld b, a
|
||||
|
||||
@@ -591,7 +591,7 @@ Function15985: ; 0x15985
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld a, [wd0dd]
|
||||
ld [wMenuScrollPosition], a
|
||||
call HandleScrollingMenu
|
||||
call ScrollingMenu
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld [wd0dd], a
|
||||
ld a, [wMenuCursorY]
|
||||
@@ -636,7 +636,7 @@ Function15985: ; 0x15985
|
||||
|
||||
.asm_159fb
|
||||
callba Function24706
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
@@ -2385,7 +2385,7 @@ Script_takeitem: ; 977f0
|
||||
call GetScriptByte
|
||||
ld [wItemQuantityChangeBuffer], a
|
||||
ld a, -1
|
||||
ld [ItemCountBuffer], a
|
||||
ld [CurItemQuantity], a
|
||||
ld hl, NumItems
|
||||
call TossItem
|
||||
ret nc
|
||||
|
||||
544
engine/scrolling_menu.asm
Executable file
544
engine/scrolling_menu.asm
Executable file
File diff suppressed because it is too large
Load Diff
@@ -101,7 +101,7 @@ SpecialsPointers:: ; c029
|
||||
add_special SpecialCheckPokerus
|
||||
add_special Special_DisplayCoinCaseBalance
|
||||
add_special Special_DisplayMoneyAndCoinBalance
|
||||
add_special PlaceMoneyTopRightOW
|
||||
add_special PlaceMoneyTopRight
|
||||
add_special Special_CheckForLuckyNumberWinners
|
||||
add_special Special_CheckLuckyNumberShowFlag
|
||||
add_special Special_ResetLuckyNumberShowFlag
|
||||
|
||||
@@ -42,7 +42,7 @@ StartMenu:: ; 125cd
|
||||
ld a, [wMenuCursorBuffer]
|
||||
ld [wd0d2], a
|
||||
call PlayClickSFX
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
call .OpenMenu
|
||||
|
||||
; Menu items have different return functions.
|
||||
@@ -1671,7 +1671,7 @@ MoveScreenLoop: ; 12fd5
|
||||
jr nz, .place_move
|
||||
ld a, [wMenuCursorY]
|
||||
ld [wMoveSwapBuffer], a
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
jp .moving_move
|
||||
|
||||
.place_move
|
||||
|
||||
@@ -145,7 +145,7 @@ Function249d1: ; 249d1 (9:49d1)
|
||||
inc hl
|
||||
pop af
|
||||
ld [hl], a
|
||||
ld hl, wMenuData2Addr
|
||||
ld hl, wMenuData2_ItemsPointerAddr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -199,7 +199,7 @@ Function24a4d: ; 24a4d (9:4a4d)
|
||||
Function24a5c: ; 24a5c (9:4a5c)
|
||||
push af
|
||||
call Function24a80
|
||||
ld hl, wMenuData2Addr
|
||||
ld hl, wMenuData2_ItemsPointerAddr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
@@ -5,11 +5,11 @@ TMHMPocket: ; 2c76f (b:476f)
|
||||
ld a, $0
|
||||
ld [hInMenu], a
|
||||
ret nc
|
||||
call Function1bee
|
||||
call PlaceHollowCursor
|
||||
call WaitBGMap
|
||||
ld a, [CurItem]
|
||||
dec a
|
||||
ld [ItemCountBuffer], a
|
||||
ld [CurItemQuantity], a
|
||||
ld hl, TMsHMs
|
||||
ld c, a
|
||||
ld b, 0
|
||||
|
||||
Reference in New Issue
Block a user