aboutsummaryrefslogtreecommitdiffstats
path: root/engine/overworld/hidden_items.asm
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2016-05-30 18:20:41 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2016-05-30 18:20:41 -0400
commit3330662296eabb6b3b7f0eed1c79003c8873c712 (patch)
treedae9a2f40425a236a3ef6ecce453cf16b4359c26 /engine/overworld/hidden_items.asm
parentBank7 misc functions (diff)
parentDigletts Cave Route 11 Entrance (diff)
downloadpokeyellow-3330662296eabb6b3b7f0eed1c79003c8873c712.tar.gz
pokeyellow-3330662296eabb6b3b7f0eed1c79003c8873c712.tar.xz
pokeyellow-3330662296eabb6b3b7f0eed1c79003c8873c712.zip
Merge pull request #9 from PikalaxALT/master
Disassemble banks 3A, 3F, and all outdoor maps
Diffstat (limited to 'engine/overworld/hidden_items.asm')
-rwxr-xr-xengine/overworld/hidden_items.asm17
1 files changed, 14 insertions, 3 deletions
diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm
index f7f81070..39bb385d 100755
--- a/engine/overworld/hidden_items.asm
+++ b/engine/overworld/hidden_items.asm
@@ -9,7 +9,7 @@ HiddenItems: ; 76688 (1d:6688)
predef FlagActionPredef
ld a, c
and a
- ret nz
+ jr nz, .asm_75fa5
call EnableAutoTextBoxDrawing
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -18,6 +18,11 @@ HiddenItems: ; 76688 (1d:6688)
call GetItemName
tx_pre_jump FoundHiddenItemText
+.asm_75fa5
+ ld a, $ff
+ ld [hItemAlreadyFound], a
+ ret
+
INCLUDE "data/hidden_item_coords.asm"
FoundHiddenItemText: ; 7675b (1d:675b)
@@ -54,7 +59,7 @@ HiddenCoins: ; 76799 (1d:6799)
predef GetQuantityOfItemInBag
ld a, b
and a
- ret z
+ jr z, .asm_760ce
ld hl, HiddenCoinCoords
call FindHiddenItemOrCoinsIndex
ld [wHiddenItemOrCoinsIndex], a
@@ -65,7 +70,7 @@ HiddenCoins: ; 76799 (1d:6799)
predef FlagActionPredef
ld a, c
and a
- ret nz
+ jr nz, .asm_760ce
xor a
ld [hUnusedCoinsByte], a
ld [hCoins], a
@@ -79,6 +84,12 @@ HiddenCoins: ; 76799 (1d:6799)
cp 40
jr z, .bcd20
jr .bcd100
+
+.asm_760ce
+ ld a, $ff
+ ld [hItemAlreadyFound], a
+ ret
+
.bcd10
ld a, $10
ld [hCoins + 1], a