summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rwxr-xr-xengine/hall_of_fame.asm2
-rwxr-xr-xengine/hidden_object_functions7.asm42
-rwxr-xr-xengine/pokedex_rating.asm2
3 files changed, 24 insertions, 22 deletions
diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm
index 7361fea2..1fc2c5c5 100755
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -207,7 +207,7 @@ HoFLoadMonPlayerPicTileIDs: ; 7036d (1c:436d)
predef_jump CopyTileIDsFromList
HoFDisplayPlayerStats: ; 70377 (1c:4377)
- SetEvent EVENT_003
+ SetEvent EVENT_HALL_OF_FAME_DEX_RATING
predef DisplayDexRating
coord hl, 0, 4
ld b, $6
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
index 90de784f..08aadf02 100755
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -188,8 +188,8 @@ CinnabarQuizQuestionsText6: ; 1ea85 (7:6a85)
TX_FAR _CinnabarQuizQuestionsText6
db "@"
-CinnabarGymQuiz_1ea8a: ; 1ea8a (7:6a8a)
- EventFlagAddress hl, EVENT_2A8
+CinnabarGymGateFlagAction: ; 1ea8a (7:6a8a)
+ EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED
predef_jump FlagActionPredef
CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
@@ -206,11 +206,11 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld hl, CinnabarGymQuizCorrectText
call PrintText
ld a, [$ffe0]
- AdjustEventBit EVENT_2A8, 0
+ AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
ld c, a
ld b, FLAG_SET
- call CinnabarGymQuiz_1ea8a
- jp CinnabarGymQuiz_1eb0a
+ call CinnabarGymGateFlagAction
+ jp UpdateCinnabarGymGateTileBlocks_
.asm_1eab8
call WaitForSoundToFinish
ld a, SFX_DENIED
@@ -220,10 +220,10 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
call PrintText
ld a, [$ffdb]
add $2
- AdjustEventBit EVENT_29A, 2
+ AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
ld c, a
ld b, FLAG_TEST
- EventFlagAddress hl, EVENT_29A
+ EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0
predef FlagActionPredef
ld a, c
and a
@@ -240,10 +240,10 @@ CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
TX_ASM
ld a, [$ffe0]
- AdjustEventBit EVENT_2A8, 0
+ AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
ld c, a
ld b, FLAG_TEST
- call CinnabarGymQuiz_1ea8a
+ call CinnabarGymGateFlagAction
ld a, c
and a
jp nz, TextScriptEnd
@@ -257,15 +257,17 @@ CinnabarGymQuizIncorrectText: ; 1eb05 (7:6b05)
TX_FAR _CinnabarGymQuizIncorrectText
db "@"
-CinnabarGymQuiz_1eb0a: ; 1eb0a (7:6b0a)
- ld a, $6
+UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
+; Update the overworld map with open floor blocks or locked gate blocks
+; depending on event flags.
+ ld a, 6
ld [$ffdb], a
-.asm_1eb0e
+.loop
ld a, [$ffdb]
dec a
add a
add a
- ld d, $0
+ ld d, 0
ld e, a
ld hl, CinnabarGymGateCoords
add hl, de
@@ -278,24 +280,24 @@ CinnabarGymQuiz_1eb0a: ; 1eb0a (7:6b0a)
push bc
ld a, [$ffdb]
ld [$ffe0], a
- AdjustEventBit EVENT_2A8, 0
+ AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
ld c, a
ld b, FLAG_TEST
- call CinnabarGymQuiz_1ea8a
+ call CinnabarGymGateFlagAction
ld a, c
and a
- jr nz, .asm_1eb36
+ jr nz, .unlocked
ld a, [wd12f]
- jr .asm_1eb38
-.asm_1eb36
+ jr .next
+.unlocked
ld a, $e
-.asm_1eb38
+.next
pop bc
ld [wd09f], a
predef ReplaceTileBlock
ld hl, $ffdb
dec [hl]
- jr nz, .asm_1eb0e
+ jr nz, .loop
ret
CinnabarGymGateCoords: ; 1eb48 (7:6b48)
diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm
index 2d7073df..ca88673f 100755
--- a/engine/pokedex_rating.asm
+++ b/engine/pokedex_rating.asm
@@ -23,7 +23,7 @@ DisplayDexRating: ; 44169 (11:4169)
ld a, [hli]
ld h, [hl]
ld l, a ; load text pointer into hl
- CheckAndResetEventA EVENT_003
+ CheckAndResetEventA EVENT_HALL_OF_FAME_DEX_RATING
jr nz, .label3
push hl
ld hl, PokedexRatingText_441cc