added constants for item capacity

This commit is contained in:
YamaArashi 2015-08-29 17:27:57 -07:00
parent b6a7e5e9cf
commit 2ff0f3f208
3 changed files with 10 additions and 7 deletions

View file

@ -10,6 +10,9 @@ PARTY_LENGTH EQU 6
MONS_PER_BOX EQU 20 MONS_PER_BOX EQU 20
NUM_BOXES EQU 12 NUM_BOXES EQU 12
BAG_ITEM_CAPACITY EQU 20
PC_ITEM_CAPACITY EQU 50
HOF_MON EQU $10 HOF_MON EQU $10
HOF_TEAM EQU PARTY_LENGTH * HOF_MON HOF_TEAM EQU PARTY_LENGTH * HOF_MON
HOF_TEAM_CAPACITY EQU 50 HOF_TEAM_CAPACITY EQU 50

View file

@ -2752,14 +2752,14 @@ CanMoveBouldersText: ; cdbb (3:4dbb)
db "@" db "@"
IsSurfingAllowed: ; cdc0 (3:4dc0) IsSurfingAllowed: ; cdc0 (3:4dc0)
; Returns whether surfing is allowed in bit of d728. ; Returns whether surfing is allowed in bit 1 of wd728.
; Surfing isn't allowed on the Cycling Road or in the lowest level of the ; Surfing isn't allowed on the Cycling Road or in the lowest level of the
; Seafoam Islands before the current has been slowed with boulders. ; Seafoam Islands before the current has been slowed with boulders.
ld hl, wd728 ld hl, wd728
set 1, [hl] set 1, [hl]
ld a, [wd732] ld a, [wd732]
bit 5, a bit 5, a
jr nz, .asm_cdec jr nz, .forcedToRideBike
ld a, [W_CURMAP] ld a, [W_CURMAP]
cp SEAFOAM_ISLANDS_5 cp SEAFOAM_ISLANDS_5
ret nz ret nz
@ -2772,7 +2772,7 @@ IsSurfingAllowed: ; cdc0 (3:4dc0)
res 1, [hl] res 1, [hl]
ld hl, CurrentTooFastText ld hl, CurrentTooFastText
jp PrintText jp PrintText
.asm_cdec .forcedToRideBike
ld hl, wd728 ld hl, wd728
res 1, [hl] res 1, [hl]
ld hl, CyclingIsFunText ld hl, CyclingIsFunText
@ -2802,7 +2802,7 @@ AddItemToInventory_: ; ce04 (3:4e04)
push de push de
push hl push hl
push hl push hl
ld d,50 ; PC box can hold 50 items ld d,PC_ITEM_CAPACITY ; how many items the PC can hold
ld a,wNumBagItems & $FF ld a,wNumBagItems & $FF
cp l cp l
jr nz,.checkIfInventoryFull jr nz,.checkIfInventoryFull
@ -2810,7 +2810,7 @@ AddItemToInventory_: ; ce04 (3:4e04)
cp h cp h
jr nz,.checkIfInventoryFull jr nz,.checkIfInventoryFull
; if the destination is the bag ; if the destination is the bag
ld d,20 ; bag can hold 20 items ld d,BAG_ITEM_CAPACITY ; how many items the bag can hold
.checkIfInventoryFull .checkIfInventoryFull
ld a,[hl] ld a,[hl]
sub d sub d

View file

@ -2282,7 +2282,7 @@ wNumBagItems:: ; d31d
ds 1 ds 1
wBagItems:: ; d31e wBagItems:: ; d31e
; item, quantity ; item, quantity
ds 20 * 2 ds BAG_ITEM_CAPACITY * 2
ds 1 ; end ds 1 ; end
wPlayerMoney:: ; d347 wPlayerMoney:: ; d347
@ -2595,7 +2595,7 @@ wNumBoxItems:: ; d53a
ds 1 ds 1
wBoxItems:: ; d53b wBoxItems:: ; d53b
; item, quantity ; item, quantity
ds 50 * 2 ds PC_ITEM_CAPACITY * 2
ds 1 ; end ds 1 ; end
wCurrentBoxNum:: ; d5a0 wCurrentBoxNum:: ; d5a0