mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-20 06:08:57 +13:00
The Big One Again
Pushing everything I've done, currently doesn't build because the Galarian Birds filesize is too thicc for the section but I need to push this before I go mad
This commit is contained in:
parent
1466465f63
commit
14f08c941d
57 changed files with 3676 additions and 370 deletions
|
|
@ -72,6 +72,8 @@ ExitPlayerPC:
|
|||
call WaitForSoundToFinish
|
||||
.next
|
||||
ld hl, wFlags_0xcd60
|
||||
res 2, [hl]
|
||||
res 4, [hl]
|
||||
res 5, [hl]
|
||||
call LoadScreenTilesFromBuffer2
|
||||
xor a
|
||||
|
|
@ -94,6 +96,9 @@ PlayerPCDeposit:
|
|||
call PrintText
|
||||
jp PlayerPCMenu
|
||||
.loop
|
||||
ld hl, wFlags_0xcd60
|
||||
set 2, [hl]
|
||||
res 4, [hl]
|
||||
ld hl, WhatToDepositText
|
||||
call PrintText
|
||||
ld hl, wNumBagItems
|
||||
|
|
@ -106,6 +111,7 @@ PlayerPCDeposit:
|
|||
ld a, ITEMLISTMENU
|
||||
ld [wListMenuID], a
|
||||
call DisplayListMenuID
|
||||
jp nz, .sortItems
|
||||
jp c, PlayerPCMenu
|
||||
call IsKeyItem
|
||||
ld a, 1
|
||||
|
|
@ -120,6 +126,9 @@ PlayerPCDeposit:
|
|||
cp $ff
|
||||
jp z, .loop
|
||||
.next
|
||||
ld hl, wFlags_0xcd60
|
||||
res 2, [hl]
|
||||
res 4, [hl]
|
||||
ld hl, wNumBoxItems
|
||||
call AddItemToInventory
|
||||
jr c, .roomAvailable
|
||||
|
|
@ -136,7 +145,9 @@ PlayerPCDeposit:
|
|||
ld hl, ItemWasStoredText
|
||||
call PrintText
|
||||
jp .loop
|
||||
|
||||
.sortItems
|
||||
call SortItems
|
||||
jp .loop
|
||||
PlayerPCWithdraw:
|
||||
xor a
|
||||
ld [wCurrentMenuItem], a
|
||||
|
|
@ -148,6 +159,9 @@ PlayerPCWithdraw:
|
|||
call PrintText
|
||||
jp PlayerPCMenu
|
||||
.loop
|
||||
ld hl, wFlags_0xcd60
|
||||
set 2, [hl]
|
||||
set 4, [hl]
|
||||
ld hl, WhatToWithdrawText
|
||||
call PrintText
|
||||
ld hl, wNumBoxItems
|
||||
|
|
@ -160,6 +174,7 @@ PlayerPCWithdraw:
|
|||
ld a, ITEMLISTMENU
|
||||
ld [wListMenuID], a
|
||||
call DisplayListMenuID
|
||||
jp nz, .sortItems
|
||||
jp c, PlayerPCMenu
|
||||
call IsKeyItem
|
||||
ld a, 1
|
||||
|
|
@ -174,6 +189,9 @@ PlayerPCWithdraw:
|
|||
cp $ff
|
||||
jp z, .loop
|
||||
.next
|
||||
ld hl, wFlags_0xcd60
|
||||
res 2, [hl]
|
||||
res 4, [hl]
|
||||
ld hl, wNumBagItems
|
||||
call AddItemToInventory
|
||||
jr c, .roomAvailable
|
||||
|
|
@ -190,7 +208,9 @@ PlayerPCWithdraw:
|
|||
ld hl, WithdrewItemText
|
||||
call PrintText
|
||||
jp .loop
|
||||
|
||||
.sortItems
|
||||
call SortItems
|
||||
jp .loop
|
||||
PlayerPCToss:
|
||||
xor a
|
||||
ld [wCurrentMenuItem], a
|
||||
|
|
@ -202,6 +222,9 @@ PlayerPCToss:
|
|||
call PrintText
|
||||
jp PlayerPCMenu
|
||||
.loop
|
||||
ld hl, wFlags_0xcd60
|
||||
set 2, [hl]
|
||||
set 4, [hl]
|
||||
ld hl, WhatToTossText
|
||||
call PrintText
|
||||
ld hl, wNumBoxItems
|
||||
|
|
@ -216,6 +239,7 @@ PlayerPCToss:
|
|||
push hl
|
||||
call DisplayListMenuID
|
||||
pop hl
|
||||
jp nz, .sortItems
|
||||
jp c, PlayerPCMenu
|
||||
push hl
|
||||
call IsKeyItem
|
||||
|
|
@ -237,8 +261,14 @@ PlayerPCToss:
|
|||
cp $ff
|
||||
jp z, .loop
|
||||
.next
|
||||
ld hl, wFlags_0xcd60
|
||||
res 2, [hl]
|
||||
res 4, [hl]
|
||||
call TossItem ; disallows tossing key items
|
||||
jp .loop
|
||||
.sortItems
|
||||
call SortItems
|
||||
jp .loop
|
||||
|
||||
PlayersPCMenuEntries:
|
||||
db "WITHDRAW ITEM"
|
||||
|
|
|
|||
|
|
@ -319,6 +319,9 @@ StartMenu_Item::
|
|||
call PrintText
|
||||
jr .exitMenu
|
||||
.notInCableClubRoom
|
||||
ld hl,wFlags_0xcd60
|
||||
set 2, [hl]
|
||||
res 4, [hl]
|
||||
ld bc, wNumBagItems
|
||||
ld hl, wListPointer
|
||||
ld a, c
|
||||
|
|
@ -336,6 +339,9 @@ StartMenu_Item::
|
|||
ld [wBagSavedMenuItem], a
|
||||
jr nc, .choseItem
|
||||
.exitMenu
|
||||
ld hl,wFlags_0xcd60
|
||||
res 2, [hl]
|
||||
res 4, [hl]
|
||||
call LoadScreenTilesFromBuffer2 ; restore saved screen
|
||||
call LoadTextBoxTilePatterns
|
||||
call UpdateSprites
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ SortItems::
|
|||
ld de, 0
|
||||
ld hl, ItemSortList
|
||||
ld b, [hl] ; This is the first item to check for
|
||||
ld hl, wBagItems
|
||||
call .ldHLbagorbox
|
||||
ld c, 0 ; Relative to wBagItems, this is where we'd like to begin swapping
|
||||
.loopCurrItemInBag
|
||||
ld a, [hl] ; Load the value of hl to a (which is an item number) and Increments to the quantity
|
||||
|
|
@ -196,7 +196,7 @@ SortItems::
|
|||
ld hl, ItemSortList
|
||||
add hl, de
|
||||
ld b, [hl]
|
||||
ld hl, wBagItems ; Resets hl to start at the beginning of the bag
|
||||
call .ldHLbagorbox ; Resets hl to start at the beginning of the bag
|
||||
ld a, b
|
||||
cp -1 ; Check if we got through all of the items, to the last one
|
||||
jr z, .finishedSwapping
|
||||
|
|
@ -207,7 +207,7 @@ SortItems::
|
|||
push de
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, wBagItems
|
||||
call .ldHLbagorbox
|
||||
ld a, b
|
||||
ld b, 0
|
||||
add hl, bc ; hl now holds where we'd like to swap to
|
||||
|
|
@ -240,6 +240,15 @@ SortItems::
|
|||
pop de
|
||||
jr .findNextItem
|
||||
|
||||
;Allow for sorting both the bag and the item PC box
|
||||
.ldHLbagorbox
|
||||
ld hl, wBagItems
|
||||
ld a, [wFlags_0xcd60]
|
||||
bit 4, a
|
||||
ret z
|
||||
ld hl, wBoxItems
|
||||
ret
|
||||
|
||||
SortItemsText::
|
||||
text_far _SortItemsText
|
||||
db "@"
|
||||
|
|
@ -255,7 +264,7 @@ NothingToSort::
|
|||
ItemSortList::
|
||||
; Used Key Items
|
||||
db BICYCLE
|
||||
db SUPER_ROD
|
||||
db FISHING_ROD
|
||||
db POCKET_LAPRAS
|
||||
db ITEMFINDER
|
||||
db TOWN_MAP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue