aboutsummaryrefslogtreecommitdiffstats
path: root/engine/bank3d.asm
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-06-11 20:37:15 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-06-11 20:37:15 -0400
commitf5983c0f813d3d908b6016db3ed866e4ca9437dc (patch)
treed6888723f443557ce45c9a00d873caa5e7a8930e /engine/bank3d.asm
parentCharacter dict; surfing minigame; printer debug (diff)
parentMore syncing with pokered (diff)
downloadpokeyellow-f5983c0f813d3d908b6016db3ed866e4ca9437dc.tar.gz
pokeyellow-f5983c0f813d3d908b6016db3ed866e4ca9437dc.tar.xz
pokeyellow-f5983c0f813d3d908b6016db3ed866e4ca9437dc.zip
Merge branch 'master' of github.com:pret/pokeyellow
Diffstat (limited to 'engine/bank3d.asm')
-rw-r--r--engine/bank3d.asm13
1 files changed, 8 insertions, 5 deletions
diff --git a/engine/bank3d.asm b/engine/bank3d.asm
index bf84e096..fbf816b6 100644
--- a/engine/bank3d.asm
+++ b/engine/bank3d.asm
@@ -456,12 +456,15 @@ Text_f5b28: ; f5b28 (3d:5b28)
TX_FAR _CanMoveBouldersText ; 2d:4193
db "@"
-CheckForForcedBikeSurf: ; f5b2d (3d:5b2d)
+IsSurfingAllowed: ; f5b2d (3d:5b2d)
+; 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
+; Seafoam Islands before the current has been slowed with boulders.
ld hl, wd728
set 1, [hl]
ld a, [wd732]
bit 5, a
- jr nz, .asm_f5b59
+ jr nz, .forcedToRideBike
ld a, [wCurMap]
cp SEAFOAM_ISLANDS_5
ret nz
@@ -474,7 +477,7 @@ CheckForForcedBikeSurf: ; f5b2d (3d:5b2d)
res 1, [hl]
ld hl, CurrentTooFastText
jp PrintText
-.asm_f5b59
+.forcedToRideBike
ld hl, wd728
res 1, [hl]
ld hl, CyclingIsFunText
@@ -499,7 +502,7 @@ AddItemToInventory_: ; f5b70 (3d:5b70)
push de
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
cp l
jr nz, .checkIfInventoryFull
@@ -507,7 +510,7 @@ AddItemToInventory_: ; f5b70 (3d:5b70)
cp h
jr nz, .checkIfInventoryFull
; 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
ld a, [hl]
sub d