You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Create constants for ScrollingMenu item formats
...I should've done this quite a while ago.
This commit is contained in:
@@ -600,7 +600,7 @@ MenuHeader_Buy:
|
||||
.MenuData
|
||||
db SCROLLINGMENU_DISPLAY_ARROWS | SCROLLINGMENU_ENABLE_FUNCTION3 ; flags
|
||||
db 4, 8 ; rows, columns
|
||||
db 1 ; horizontal spacing
|
||||
db SCROLLINGMENU_ITEMS_NORMAL ; item format
|
||||
dbw 0, wCurMart
|
||||
dba PlaceMenuItemName
|
||||
dba .PrintBCDPrices
|
||||
|
@@ -1465,7 +1465,7 @@ ItemsPocketMenuHeader:
|
||||
.MenuData:
|
||||
db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags
|
||||
db 5, 8 ; rows, columns
|
||||
db 2 ; horizontal spacing
|
||||
db SCROLLINGMENU_ITEMS_QUANTITY ; item format
|
||||
dbw 0, wNumItems
|
||||
dba PlaceMenuItemName
|
||||
dba PlaceMenuItemQuantity
|
||||
@@ -1480,7 +1480,7 @@ PC_Mart_ItemsPocketMenuHeader:
|
||||
.MenuData:
|
||||
db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags
|
||||
db 5, 8 ; rows, columns
|
||||
db 2 ; horizontal spacing
|
||||
db SCROLLINGMENU_ITEMS_QUANTITY ; item format
|
||||
dbw 0, wNumItems
|
||||
dba PlaceMenuItemName
|
||||
dba PlaceMenuItemQuantity
|
||||
@@ -1495,7 +1495,7 @@ KeyItemsPocketMenuHeader:
|
||||
.MenuData:
|
||||
db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags
|
||||
db 5, 8 ; rows, columns
|
||||
db 1 ; horizontal spacing
|
||||
db SCROLLINGMENU_ITEMS_NORMAL ; item format
|
||||
dbw 0, wNumKeyItems
|
||||
dba PlaceMenuItemName
|
||||
dba PlaceMenuItemQuantity
|
||||
@@ -1510,7 +1510,7 @@ PC_Mart_KeyItemsPocketMenuHeader:
|
||||
.MenuData:
|
||||
db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags
|
||||
db 5, 8 ; rows, columns
|
||||
db 1 ; horizontal spacing
|
||||
db SCROLLINGMENU_ITEMS_NORMAL ; item format
|
||||
dbw 0, wNumKeyItems
|
||||
dba PlaceMenuItemName
|
||||
dba PlaceMenuItemQuantity
|
||||
@@ -1525,7 +1525,7 @@ BallsPocketMenuHeader:
|
||||
.MenuData:
|
||||
db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags
|
||||
db 5, 8 ; rows, columns
|
||||
db 2 ; horizontal spacing
|
||||
db SCROLLINGMENU_ITEMS_QUANTITY ; item format
|
||||
dbw 0, wNumBalls
|
||||
dba PlaceMenuItemName
|
||||
dba PlaceMenuItemQuantity
|
||||
@@ -1540,7 +1540,7 @@ PC_Mart_BallsPocketMenuHeader:
|
||||
.MenuData:
|
||||
db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags
|
||||
db 5, 8 ; rows, columns
|
||||
db 2 ; horizontal spacing
|
||||
db SCROLLINGMENU_ITEMS_QUANTITY ; item format
|
||||
dbw 0, wNumBalls
|
||||
dba PlaceMenuItemName
|
||||
dba PlaceMenuItemQuantity
|
||||
|
@@ -48,7 +48,7 @@ SwitchItemsInBag:
|
||||
call ItemSwitch_GetNthItem
|
||||
dec hl
|
||||
push hl
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
add hl, bc
|
||||
ld d, h
|
||||
ld e, l
|
||||
@@ -74,7 +74,7 @@ SwitchItemsInBag:
|
||||
call ItemSwitch_GetNthItem
|
||||
ld d, h
|
||||
ld e, l
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
add hl, bc
|
||||
pop bc
|
||||
call CopyBytes
|
||||
@@ -162,7 +162,7 @@ Function249d1:
|
||||
|
||||
.asm_24a25
|
||||
dec [hl]
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
push bc
|
||||
ld a, [wSwitchItem]
|
||||
call ItemSwitch_GetNthItem
|
||||
@@ -183,7 +183,7 @@ Function249d1:
|
||||
Function24a40:
|
||||
call ItemSwitch_GetNthItem
|
||||
ld de, wd002
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
call CopyBytes
|
||||
ret
|
||||
|
||||
@@ -192,13 +192,13 @@ Function24a4d:
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, wd002
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
call CopyBytes
|
||||
ret
|
||||
|
||||
ItemSwitch_GetNthItem:
|
||||
push af
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
ld hl, wMenuData_ItemsPointerAddr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@@ -210,7 +210,7 @@ ItemSwitch_GetNthItem:
|
||||
|
||||
Function24a6c:
|
||||
push hl
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
ld a, d
|
||||
sub e
|
||||
jr nc, .dont_negate
|
||||
@@ -224,13 +224,13 @@ Function24a6c:
|
||||
pop hl
|
||||
ret
|
||||
|
||||
ItemSwitch_ConvertSpacingToDW:
|
||||
ItemSwitch_ConvertItemFormatToDW:
|
||||
; This function is absolutely idiotic.
|
||||
push hl
|
||||
ld a, [wMenuData_ScrollingMenuSpacing]
|
||||
ld a, [wMenuData_ScrollingMenuItemFormat]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, .spacing_dws
|
||||
ld hl, .format_dws
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld c, [hl]
|
||||
@@ -239,12 +239,14 @@ ItemSwitch_ConvertSpacingToDW:
|
||||
pop hl
|
||||
ret
|
||||
|
||||
.spacing_dws
|
||||
dw 0, 1, 2
|
||||
.format_dws
|
||||
dw 0
|
||||
dw 1
|
||||
dw 2
|
||||
|
||||
Function24a97:
|
||||
push af
|
||||
call ItemSwitch_ConvertSpacingToDW
|
||||
call ItemSwitch_ConvertItemFormatToDW
|
||||
ld a, c
|
||||
cp 2
|
||||
jr nz, .not_2
|
||||
|
Reference in New Issue
Block a user