summaryrefslogtreecommitdiff
path: root/engine/hidden_object_functions17.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-07-20 18:32:02 -0700
committerYamaArashi <shadow962@live.com>2015-07-20 18:32:26 -0700
commitfcab935a0f449246380480613ac0896e0b90a0d8 (patch)
tree60391cf3fa91cc8173d13cc9fd75c050d9898e0c /engine/hidden_object_functions17.asm
parent13e28b0ece7c7888cba792cc6f7219b384213427 (diff)
enumerate events
Diffstat (limited to 'engine/hidden_object_functions17.asm')
-rwxr-xr-xengine/hidden_object_functions17.asm12
1 files changed, 4 insertions, 8 deletions
diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm
index 94b37193..01787e3e 100755
--- a/engine/hidden_object_functions17.asm
+++ b/engine/hidden_object_functions17.asm
@@ -314,8 +314,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
ld [wcd5b], a
; Don't do the trash can puzzle if it's already been done.
- ld a, [wd773]
- bit 0, a
+ CheckEvent EVENT_2ND_LOCK_OPENED
jr z, .ok
tx_pre_jump VermilionGymTrashText
@@ -335,8 +334,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
.openFirstLock
; Next can is trying for the second switch.
- ld hl, wd773
- set 1, [hl]
+ SetEvent EVENT_1ST_LOCK_OPENED
ld hl, GymTrashCans
ld a, [wcd5b]
@@ -379,8 +377,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
jr z, .openSecondLock
; Reset the cans.
- ld hl, wd773
- res 1, [hl]
+ ResetEvent EVENT_1ST_LOCK_OPENED
call Random
and $e
@@ -391,8 +388,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
.openSecondLock
; Completed the trash can puzzle.
- ld hl, wd773
- set 0, [hl]
+ SetEvent EVENT_2ND_LOCK_OPENED
ld hl, wd126
set 6, [hl]