summaryrefslogtreecommitdiff
path: root/engine/hidden_object_functions7.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/hidden_object_functions7.asm')
-rwxr-xr-xengine/hidden_object_functions7.asm32
1 files changed, 16 insertions, 16 deletions
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
index 4e76d996..e3c296ca 100755
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -125,21 +125,21 @@ PrintCinnabarQuiz: ; 1ea17 (7:6a17)
CinnabarGymQuiz: ; 1ea25 (7:6a25)
TX_ASM
xor a
- ld [wda38], a
+ ld [wOpponentAfterWrongAnswer], a
ld a, [wHiddenObjectFunctionArgument]
push af
and $f
- ld [$ffdb], a
+ ld [hGymGateIndex], a
pop af
and $f0
swap a
ld [$ffdc], a
ld hl, CinnabarGymQuizIntroText
call PrintText
- ld a, [$ffdb]
+ ld a, [hGymGateIndex]
dec a
add a
- ld d, $0
+ ld d, 0
ld e, a
ld hl, CinnabarQuizQuestions
add hl, de
@@ -198,10 +198,10 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld c, a
ld a, [wCurrentMenuItem]
cp c
- jr nz, .asm_1eab8
+ jr nz, .wrongAnswer
ld hl, wd126
set 5, [hl]
- ld a, [$ffdb]
+ ld a, [hGymGateIndex]
ld [$ffe0], a
ld hl, CinnabarGymQuizCorrectText
call PrintText
@@ -211,14 +211,14 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld b, FLAG_SET
call CinnabarGymGateFlagAction
jp UpdateCinnabarGymGateTileBlocks_
-.asm_1eab8
+.wrongAnswer
call WaitForSoundToFinish
ld a, SFX_DENIED
call PlaySound
call WaitForSoundToFinish
ld hl, CinnabarGymQuizIncorrectText
call PrintText
- ld a, [$ffdb]
+ ld a, [hGymGateIndex]
add $2
AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
ld c, a
@@ -228,9 +228,9 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld a, c
and a
ret nz
- ld a, [$ffdb]
+ ld a, [hGymGateIndex]
add $2
- ld [wda38], a
+ ld [wOpponentAfterWrongAnswer], a
ret
CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
@@ -261,9 +261,9 @@ 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
+ ld [hGymGateIndex], a
.loop
- ld a, [$ffdb]
+ ld a, [hGymGateIndex]
dec a
add a
add a
@@ -276,9 +276,9 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
ld c, a
inc hl
ld a, [hl]
- ld [wd12f], a
+ ld [wGymGateTileBlock], a
push bc
- ld a, [$ffdb]
+ ld a, [hGymGateIndex]
ld [$ffe0], a
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
ld c, a
@@ -287,7 +287,7 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
ld a, c
and a
jr nz, .unlocked
- ld a, [wd12f]
+ ld a, [wGymGateTileBlock]
jr .next
.unlocked
ld a, $e
@@ -295,7 +295,7 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
pop bc
ld [wNewTileBlockID], a
predef ReplaceTileBlock
- ld hl, $ffdb
+ ld hl, hGymGateIndex
dec [hl]
jr nz, .loop
ret