Small polishing of the previous commit + Item Sorting

- Fixes a few bugs from the last commit, namely:
     - The guy who gives you the Pocket Lapras having bugged text
     - Being able to use it where you shouldn't (Cycling Road, Seafoam before the boulder puzzle)
     - Pocket Lapras not having an item description

- As well as this, automatic item sorting has been added. Just press Start in the bag menu and all your items will get assorted into a convenient list.

- Changed a few item descriptions since some of them didn't terminate properly

- Freed up some space in the Home bank
This commit is contained in:
Martha Schilling 2024-05-14 21:17:36 +01:00
parent dd7130c489
commit 2c02483f01
15 changed files with 379 additions and 66 deletions

View file

@ -1,7 +1,8 @@
; rst vectors (unused)
SECTION "rst0", ROM0[$0000]
rst $38
_Bankswitch::
jp Bankswitch
ds $08 - @, 0 ; unused

View file

@ -50,7 +50,7 @@ DisplayListMenuID::
ld [wTopMenuItemY], a
ld a, 5
ld [wTopMenuItemX], a
ld a, A_BUTTON | B_BUTTON | SELECT
ld a, A_BUTTON | B_BUTTON | SELECT | START
ld [wMenuWatchedKeys], a
ld c, 10
call DelayFrames
@ -178,6 +178,8 @@ DisplayListMenuIDLoop::
jp nz, ExitListMenu ; if so, exit the menu
bit BIT_SELECT, a
jp nz, HandleItemListSwapping ; if so, allow the player to swap menu entries
bit 3, a ; was the start button pressed?
jp nz, .sortItems ; if so, allow the player to swap menu entries
ld b, a
bit BIT_D_DOWN, b
ld hl, wListScrollOffset
@ -197,6 +199,10 @@ DisplayListMenuIDLoop::
jp z, DisplayListMenuIDLoop
dec [hl]
jp DisplayListMenuIDLoop
.sortItems
rra ; Sets the zero flag to 0 so the sorting function will happen
rla
jp BankswitchBack
DisplayChooseQuantityMenu::
; text box dimensions/coordinates for just quantity