Skip to content

Commit

Permalink
Cleanup label from scripts of Gyms: PewterGym, CeruleanGym, FuchsiaGy…
Browse files Browse the repository at this point in the history
…m and SaffronGym, CinnabarGym
  • Loading branch information
kqesar committed May 17, 2021
1 parent 82f31b0 commit ba71807
Show file tree
Hide file tree
Showing 14 changed files with 461 additions and 458 deletions.
84 changes: 42 additions & 42 deletions scripts/CeladonGym.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CeladonGym_Script:
.LeaderName:
db "ERIKA@"

CeladonGymText_48943:
CeladonGymResetScripts:
xor a
ld [wJoyIgnore], a
ld [wCeladonGymCurScript], a
Expand All @@ -33,16 +33,16 @@ CeladonGym_ScriptPointers:
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
dw CeladonGymScript3
dw CeladonGymErikaPostBattle

CeladonGymScript3:
CeladonGymErikaPostBattle:
ld a, [wIsInBattle]
cp $ff
jp z, CeladonGymText_48943
jp z, CeladonGymResetScripts
ld a, $f0
ld [wJoyIgnore], a

CeladonGymText_48963:
CeladonGymReceiveTM21:
ld a, $9
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
Expand All @@ -68,19 +68,19 @@ CeladonGymText_48963:
; deactivate gym trainers
SetEventRange EVENT_BEAT_CELADON_GYM_TRAINER_0, EVENT_BEAT_CELADON_GYM_TRAINER_6

jp CeladonGymText_48943
jp CeladonGymResetScripts

CeladonGym_TextPointers:
dw CeladonGymText1
dw CeladonGymText2
dw CeladonGymText3
dw CeladonGymText4
dw CeladonGymText5
dw CeladonGymText6
dw CeladonGymText7
dw CeladonGymText8
dw CeladonGymText9
dw TM21Text
dw ErikaText
dw CeladonGymTrainerText1
dw CeladonGymTrainerText2
dw CeladonGymTrainerText3
dw CeladonGymTrainerText4
dw CeladonGymTrainerText5
dw CeladonGymTrainerText6
dw CeladonGymTrainerText7
dw ErikaRainbowbadgeInfoText
dw ReceivedTM21Text
dw TM21NoRoomText

CeladonGymTrainerHeaders:
Expand All @@ -101,27 +101,27 @@ CeladonGymTrainerHeader6:
trainer EVENT_BEAT_CELADON_GYM_TRAINER_6, 3, CeladonGymBattleText8, CeladonGymEndBattleText8, CeladonGymAfterBattleText8
db -1 ; end

CeladonGymText1:
ErikaText:
text_asm
CheckEvent EVENT_BEAT_ERIKA
jr z, .beginBattle
jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM21
jr nz, .afterVictory
call z, CeladonGymText_48963
jr nz, .afterBeat
call z, CeladonGymReceiveTM21
call DisableWaitingAfterTextDisplay
jr .done
.afterVictory
ld hl, CeladonGymText_48a68
.afterBeat
ld hl, ErikaPostBattleAdviceText
call PrintText
jr .done
.beginBattle
ld hl, CeladonGymText_48a5e
.beforeBeat
ld hl, ErikaPreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
ld hl, CeladonGymText_48a63
ld de, CeladonGymText_48a63
ld hl, ReceivedRainbowbadgeText
ld de, ReceivedRainbowbadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
Expand All @@ -135,23 +135,23 @@ CeladonGymText1:
.done
jp TextScriptEnd

CeladonGymText_48a5e:
text_far _CeladonGymText_48a5e
ErikaPreBattleText:
text_far _ErikaPreBattleText
text_end

CeladonGymText_48a63:
text_far _CeladonGymText_48a63
ReceivedRainbowbadgeText:
text_far _ReceivedRainbowbadgeText
text_end

CeladonGymText_48a68:
text_far _CeladonGymText_48a68
ErikaPostBattleAdviceText:
text_far _ErikaPostBattleAdviceText
text_end

CeladonGymText9:
text_far _CeladonGymText9
ErikaRainbowbadgeInfoText:
text_far _ErikaRainbowbadgeInfoText
text_end

TM21Text:
ReceivedTM21Text:
text_far _ReceivedTM21Text
sound_get_item_1
text_far _TM21ExplanationText
Expand All @@ -161,7 +161,7 @@ TM21NoRoomText:
text_far _TM21NoRoomText
text_end

CeladonGymText2:
CeladonGymTrainerText1:
text_asm
ld hl, CeladonGymTrainerHeader0
call TalkToTrainer
Expand All @@ -179,7 +179,7 @@ CeladonGymAfterBattleText2:
text_far _CeladonGymAfterBattleText2
text_end

CeladonGymText3:
CeladonGymTrainerText2:
text_asm
ld hl, CeladonGymTrainerHeader1
call TalkToTrainer
Expand All @@ -197,7 +197,7 @@ CeladonGymAfterBattleText3:
text_far _CeladonGymAfterBattleText3
text_end

CeladonGymText4:
CeladonGymTrainerText3:
text_asm
ld hl, CeladonGymTrainerHeader2
call TalkToTrainer
Expand All @@ -215,7 +215,7 @@ CeladonGymAfterBattleText4:
text_far _CeladonGymAfterBattleText4
text_end

CeladonGymText5:
CeladonGymTrainerText4:
text_asm
ld hl, CeladonGymTrainerHeader3
call TalkToTrainer
Expand All @@ -233,7 +233,7 @@ CeladonGymAfterBattleText5:
text_far _CeladonGymAfterBattleText5
text_end

CeladonGymText6:
CeladonGymTrainerText5:
text_asm
ld hl, CeladonGymTrainerHeader4
call TalkToTrainer
Expand All @@ -251,7 +251,7 @@ CeladonGymAfterBattleText6:
text_far _CeladonGymAfterBattleText6
text_end

CeladonGymText7:
CeladonGymTrainerText6:
text_asm
ld hl, CeladonGymTrainerHeader5
call TalkToTrainer
Expand All @@ -269,7 +269,7 @@ CeladonGymAfterBattleText7:
text_far _CeladonGymAfterBattleText7
text_end

CeladonGymText8:
CeladonGymTrainerText7:
text_asm
ld hl, CeladonGymTrainerHeader6
call TalkToTrainer
Expand Down
94 changes: 47 additions & 47 deletions scripts/CeruleanGym.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CeruleanGym_Script:
.LeaderName:
db "MISTY@"

CeruleanGymScript_5c6ed:
CeruleanGymResetScripts:
xor a
ld [wJoyIgnore], a
ld [wCeruleanGymCurScript], a
Expand All @@ -33,16 +33,16 @@ CeruleanGym_ScriptPointers:
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
dw CeruleanGymScript3
dw CeruleanGymMistyPostBattle

CeruleanGymScript3:
CeruleanGymMistyPostBattle:
ld a, [wIsInBattle]
cp $ff
jp z, CeruleanGymScript_5c6ed
jp z, CeruleanGymResetScripts
ld a, $f0
ld [wJoyIgnore], a

CeruleanGymScript_5c70d:
CeruleanGymReceiveTM11:
ld a, $5
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
Expand All @@ -68,16 +68,16 @@ CeruleanGymScript_5c70d:
; deactivate gym trainers
SetEvents EVENT_BEAT_CERULEAN_GYM_TRAINER_0, EVENT_BEAT_CERULEAN_GYM_TRAINER_1

jp CeruleanGymScript_5c6ed
jp CeruleanGymResetScripts

CeruleanGym_TextPointers:
dw CeruleanGymText1
dw CeruleanGymText2
dw CeruleanGymText3
dw CeruleanGymText4
dw CeruleanGymText5
dw CeruleanGymText6
dw CeruleanGymText7
dw MistyText
dw CeruleanGymTrainerText1
dw CeruleanGymTrainerText2
dw CeruleanGymFanText
dw MistyCascadebadgeInfoText
dw ReceivedTM11Text
dw TM11NoRoomText

CeruleanGymTrainerHeaders:
def_trainers 2
Expand All @@ -87,27 +87,27 @@ CeruleanGymTrainerHeader1:
trainer EVENT_BEAT_CERULEAN_GYM_TRAINER_1, 3, CeruleanGymBattleText2, CeruleanGymEndBattleText2, CeruleanGymAfterBattleText2
db -1 ; end

CeruleanGymText1:
MistyText:
text_asm
CheckEvent EVENT_BEAT_MISTY
jr z, .beginBattle
jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM11
jr nz, .afterVictory
call z, CeruleanGymScript_5c70d
jr nz, .aterBeat
call z, CeruleanGymReceiveTM11
call DisableWaitingAfterTextDisplay
jr .done
.afterVictory
ld hl, CeruleanGymText_5c7c3
.aterBeat
ld hl, TM11ExplanationText
call PrintText
jr .done
.beginBattle
ld hl, CeruleanGymText_5c7be
.beforeBeat
ld hl, MistyPreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
ld hl, CeruleanGymText_5c7d8
ld de, CeruleanGymText_5c7d8
ld hl, ReceivedCascadebadgeText
ld de, ReceivedCascadebadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
Expand All @@ -122,34 +122,34 @@ CeruleanGymText1:
.done
jp TextScriptEnd

CeruleanGymText_5c7be:
text_far _CeruleanGymText_5c7be
MistyPreBattleText:
text_far _MistyPreBattleText
text_end

CeruleanGymText_5c7c3:
text_far _CeruleanGymText_5c7c3
TM11ExplanationText:
text_far _TM11ExplanationText
text_end

CeruleanGymText5:
text_far _CeruleanGymText_5c7c8
MistyCascadebadgeInfoText:
text_far _MistyCascadebadgeInfoText
text_end

CeruleanGymText6:
ReceivedTM11Text:
text_far _ReceivedTM11Text
sound_get_item_1
text_end

CeruleanGymText7:
text_far _CeruleanGymText_5c7d3
TM11NoRoomText:
text_far _TM11NoRoomText
text_end

CeruleanGymText_5c7d8:
text_far _CeruleanGymText_5c7d8
ReceivedCascadebadgeText:
text_far _ReceivedCascadebadgeText
sound_get_key_item ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
text_promptbutton
text_end

CeruleanGymText2:
CeruleanGymTrainerText1:
text_asm
ld hl, CeruleanGymTrainerHeader0
call TalkToTrainer
Expand All @@ -167,7 +167,7 @@ CeruleanGymAfterBattleText1:
text_far _CeruleanGymAfterBattleText1
text_end

CeruleanGymText3:
CeruleanGymTrainerText2:
text_asm
ld hl, CeruleanGymTrainerHeader1
call TalkToTrainer
Expand All @@ -185,23 +185,23 @@ CeruleanGymAfterBattleText2:
text_far _CeruleanGymAfterBattleText2
text_end

CeruleanGymText4:
CeruleanGymFanText:
text_asm
CheckEvent EVENT_BEAT_MISTY
jr nz, .asm_5c821
ld hl, CeruleanGymText_5c82a
jr nz, .afterBeat
ld hl, CeruleanGymFanPreBattleText
call PrintText
jr .asm_5c827
.asm_5c821
ld hl, CeruleanGymText_5c82f
jr .done
.afterBeat
ld hl, CeruleanGymFanPostBattleText
call PrintText
.asm_5c827
.done
jp TextScriptEnd

CeruleanGymText_5c82a:
text_far _CeruleanGymText_5c82a
CeruleanGymFanPreBattleText:
text_far _CeruleanGymFanPreBattleText
text_end

CeruleanGymText_5c82f:
text_far _CeruleanGymText_5c82f
CeruleanGymFanPostBattleText:
text_far _CeruleanGymFanPostBattleText
text_end
Loading

0 comments on commit ba71807

Please sign in to comment.