summaryrefslogtreecommitdiff
path: root/engine/overworld/hidden_objects.asm
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-05-24 17:41:33 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-05-24 17:41:33 -0400
commit219eddf056933c6e5f06903caa73d49de3118a60 (patch)
treef06ec3c1e351de9b9f2466f371a3c13faf1fe8a7 /engine/overworld/hidden_objects.asm
parentfdac1f9f80295eb4ce7c347f3e7626897a67826d (diff)
Update hidden object functions and include them in main
Diffstat (limited to 'engine/overworld/hidden_objects.asm')
-rwxr-xr-xengine/overworld/hidden_objects.asm20
1 files changed, 5 insertions, 15 deletions
diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm
index 3774c482..15496b81 100755
--- a/engine/overworld/hidden_objects.asm
+++ b/engine/overworld/hidden_objects.asm
@@ -1,27 +1,17 @@
; if a hidden object was found, stores $00 in [$ffee], else stores $ff
-CheckForHiddenObject: ; 469a0 (11:69a0)
+CheckForHiddenObject: ; f25f8 (3c:65f8)
ld hl, $ffeb
xor a
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
- ld de, $0
ld hl, HiddenObjectMaps
-.hiddenMapLoop
- ld a, [hli]
- ld b, a
- cp $ff
- jr z, .noMatch
+ ld de, 3
ld a, [wCurMap]
- cp b
- jr z, .foundMatchingMap
- inc de
- inc de
- jr .hiddenMapLoop
-.foundMatchingMap
- ld hl, HiddenObjectPointers
- add hl, de
+ call IsInArray
+ jr nc, .noMatch
+ inc hl
ld a, [hli]
ld h, [hl]
ld l, a