summaryrefslogtreecommitdiff
path: root/scripts/PewterGym.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2021-05-31 16:43:31 -0500
committerdannye <33dannye@gmail.com>2021-05-31 16:51:45 -0500
commit7a23e2a635318754b56923824d5949bcff3815bf (patch)
tree6e57c5b6762b76ce8e18e8b08dace841f640a01d /scripts/PewterGym.asm
parentd53e450c984d4e2d60b146594e7934703a8c9796 (diff)
parentf3dbec09a89d1ef816da83228e67a27c8df0be89 (diff)
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'scripts/PewterGym.asm')
-rw-r--r--scripts/PewterGym.asm111
1 files changed, 56 insertions, 55 deletions
diff --git a/scripts/PewterGym.asm b/scripts/PewterGym.asm
index 2d3c2bb9..016535c2 100644
--- a/scripts/PewterGym.asm
+++ b/scripts/PewterGym.asm
@@ -23,7 +23,7 @@ PewterGym_Script:
.LeaderName:
db "BROCK@"
-PewterGymScript_5c3bf:
+PewterGymResetScripts:
xor a
ld [wJoyIgnore], a
ld [wPewterGymCurScript], a
@@ -34,15 +34,16 @@ PewterGym_ScriptPointers:
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
- dw PewterGymScript3
+ dw PewterGymBrockPostBattle
-PewterGymScript3:
+PewterGymBrockPostBattle:
ld a, [wIsInBattle]
cp $ff
- jp z, PewterGymScript_5c3bf
+ jp z, PewterGymResetScripts
ld a, $f0
ld [wJoyIgnore], a
-PewterGymScript_5c3df:
+; fallthrough
+PewterGymScriptReceiveTM34:
ld a, $4
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
@@ -77,15 +78,15 @@ PewterGymScript_5c3df:
; deactivate gym trainers
SetEvent EVENT_BEAT_PEWTER_GYM_TRAINER_0
- jp PewterGymScript_5c3bf
+ jp PewterGymResetScripts
PewterGym_TextPointers:
- dw PewterGymText1
- dw PewterGymText2
- dw PewterGymText3
- dw PewterGymText4
- dw PewterGymText5
- dw PewterGymText6
+ dw BrockText
+ dw PewterGymTrainerText1
+ dw PewterGymGuideText
+ dw BeforeReceivedTM34Text
+ dw ReceivedTM34Text
+ dw TM34NoRoomText
PewterGymTrainerHeaders:
def_trainers 2
@@ -93,27 +94,27 @@ PewterGymTrainerHeader0:
trainer EVENT_BEAT_PEWTER_GYM_TRAINER_0, 5, PewterGymBattleText1, PewterGymEndBattleText1, PewterGymAfterBattleText1
db -1 ; end
-PewterGymText1:
+BrockText:
text_asm
CheckEvent EVENT_BEAT_BROCK
- jr z, .beginBattle
+ jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM34
- jr nz, .gymVictory
- call z, PewterGymScript_5c3df
+ jr nz, .afterBeat
+ call z, PewterGymScriptReceiveTM34
call DisableWaitingAfterTextDisplay
jr .done
-.gymVictory
- ld hl, PewterGymText_5c4a3
+.afterBeat
+ ld hl, BrockPostBattleAdviceText
call PrintText
jr .done
-.beginBattle
- ld hl, PewterGymText_5c49e
+.beforeBeat
+ ld hl, BrockPreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, PewterGymText_5c4bc
- ld de, PewterGymText_5c4bc
+ ld hl, ReceivedBoulderBadgeText
+ ld de, ReceivedBoulderBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -129,35 +130,35 @@ PewterGymText1:
.done
jp TextScriptEnd
-PewterGymText_5c49e:
- text_far _PewterGymText_5c49e
+BrockPreBattleText:
+ text_far _BrockPreBattleText
text_end
-PewterGymText_5c4a3:
- text_far _PewterGymText_5c4a3
+BrockPostBattleAdviceText:
+ text_far _BrockPostBattleAdviceText
text_end
-PewterGymText4:
- text_far _TM34PreReceiveText
+BeforeReceivedTM34Text:
+ text_far _BeforeReceivedTM34Text
text_end
-PewterGymText5:
+ReceivedTM34Text:
text_far _ReceivedTM34Text
sound_get_item_1
text_far _TM34ExplanationText
text_end
-PewterGymText6:
+TM34NoRoomText:
text_far _TM34NoRoomText
text_end
-PewterGymText_5c4bc:
- text_far _PewterGymText_5c4bc
+ReceivedBoulderBadgeText:
+ text_far _ReceivedBoulderBadgeText
sound_get_item_1
- text_far _PewterGymText_5c4c1
+ text_far _BrockBoulerBadgeInfoText ; Text to tell that the flash technique can be used
text_end
-PewterGymText2:
+PewterGymTrainerText1:
text_asm
ld hl, PewterGymTrainerHeader0
call TalkToTrainer
@@ -175,58 +176,58 @@ PewterGymAfterBattleText1:
text_far _PewterGymAfterBattleText1
text_end
-PewterGymText3:
+PewterGymGuideText:
text_asm
ld a, [wBeatGymFlags]
bit BIT_BOULDERBADGE, a
- jr nz, .asm_5c50c
- ld hl, PewterGymText_5c515
+ jr nz, .afterBeat
+ ld hl, PewterGymGuidePreAdviceText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_5c4fe
+ jr nz, .PewterGymGuideBeginAdviceText
ld a, [wd472]
bit 7, a
jp nz, .asm_5c3fa
- ld hl, PewterGymText_5c51a
+ ld hl, PewterGymGuideBeginAdviceText
call PrintText
- jr .asm_5c504
-.asm_5c4fe
+ jr .PewterGymGuideAdviceText
+.PewterGymGuideBeginAdviceText
ld hl, PewterGymText_5c524
call PrintText
-.asm_5c504
- ld hl, PewterGymText_5c51f
+.PewterGymGuideAdviceText
+ ld hl, PewterGymGuideAdviceText
call PrintText
- jr .asm_5c512
-.asm_5c50c
- ld hl, PewterGymText_5c529
+ jr .done
+.afterBeat
+ ld hl, PewterGymGuidePostBattleText
call PrintText
-.asm_5c512
+.done
jp TextScriptEnd
.asm_5c3fa
ld hl, PewterGymText_5c41c
call PrintText
jp TextScriptEnd
-PewterGymText_5c515:
- text_far _PewterGymText_5c515
+PewterGymGuidePreAdviceText:
+ text_far _PewterGymGuidePreAdviceText
text_end
-PewterGymText_5c51a:
- text_far _PewterGymText_5c51a
+PewterGymGuideBeginAdviceText:
+ text_far _PewterGymGuideBeginAdviceText
text_end
-PewterGymText_5c51f:
- text_far _PewterGymText_5c51f
+PewterGymGuideAdviceText:
+ text_far _PewterGymGuideAdviceText
text_end
PewterGymText_5c524:
text_far _PewterGymText_5c524
text_end
-PewterGymText_5c529:
- text_far _PewterGymText_5c529
+PewterGymGuidePostBattleText:
+ text_far _PewterGymGuidePostBattleText
text_end
PewterGymText_5c41c: