Deobfuscate gyms consistently

This commit is contained in:
deak311andris 2019-10-07 07:23:57 +02:00
parent 8d2afb7c13
commit 2e45c2946a
9 changed files with 77 additions and 77 deletions

View file

@ -54,12 +54,12 @@ CeladonGymText_48963:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM21
jr .asm_4898c
jr .gymVictory
.BagFull
ld a, $b
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_4898c
.gymVictory
ld hl, wObtainedBadges
set 3, [hl]
ld hl, wBeatGymFlags
@ -151,17 +151,17 @@ CeladonGymTrainerHeader6:
CeladonGymText1:
TX_ASM
CheckEvent EVENT_BEAT_ERIKA
jr z, .asm_48a2d
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM21
jr nz, .asm_48a25
jr nz, .afterVictory
call z, CeladonGymText_48963
call DisableWaitingAfterTextDisplay
jr .asm_48a5b
.asm_48a25
jr .done
.afterVictory
ld hl, CeladonGymText_48a68
call PrintText
jr .asm_48a5b
.asm_48a2d
jr .done
.beginBattle
ld hl, CeladonGymText_48a5e
call PrintText
ld hl, wd72d
@ -179,7 +179,7 @@ CeladonGymText1:
ld a, $3
ld [wCeladonGymCurScript], a
ld [wCurMapScript], a
.asm_48a5b
.done
jp TextScriptEnd
CeladonGymText_48a5e:

View file

@ -54,12 +54,12 @@ CeruleanGymScript_5c70d:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM11
jr .asm_5c736
jr .gymVictory
.BagFull
ld a, $7
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5c736
.gymVictory
ld hl, wObtainedBadges
set 1, [hl]
ld hl, wBeatGymFlags
@ -102,17 +102,17 @@ CeruleanGymTrainerHeader1:
CeruleanGymText1:
TX_ASM
CheckEvent EVENT_BEAT_MISTY
jr z, .asm_5c78d
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM11
jr nz, .asm_5c785
jr nz, .afterVictory
call z, CeruleanGymScript_5c70d
call DisableWaitingAfterTextDisplay
jr .asm_5c7bb
.asm_5c785
jr .done
.afterVictory
ld hl, CeruleanGymText_5c7c3
call PrintText
jr .asm_5c7bb
.asm_5c78d
jr .done
.beginBattle
ld hl, CeruleanGymText_5c7be
call PrintText
ld hl, wd72d
@ -131,7 +131,7 @@ CeruleanGymText1:
ld [hJoyHeld], a
ld a, $3
ld [wCeruleanGymCurScript], a
.asm_5c7bb
.done
jp TextScriptEnd
CeruleanGymText_5c7be:

View file

@ -151,12 +151,12 @@ CinnabarGymScript3_75857:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM38
jr .asm_75880
jr .gymVictory
.BagFull
ld a, $c
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_75880
.gymVictory
ld hl, wObtainedBadges
set 6, [hl]
ld hl, wBeatGymFlags
@ -207,17 +207,17 @@ CinnabarGymScript_758b7:
CinnabarGymText1:
TX_ASM
CheckEvent EVENT_BEAT_BLAINE
jr z, .asm_d9332
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM38
jr nz, .asm_3012f
jr nz, .afterVictory
call z, CinnabarGymScript3_75857
call DisableWaitingAfterTextDisplay
jp TextScriptEnd
.asm_3012f
.afterVictory
ld hl, BlaineFireBlastText
call PrintText
jp TextScriptEnd
.asm_d9332
.beginBattle
ld hl, BlaineBattleText
call PrintText
ld hl, BlaineEndBattleText

View file

@ -54,12 +54,12 @@ FuchsiaGymScript3_75497:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM06
jr .asm_754c0
jr .gymVictory
.BagFull
ld a, $b
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_754c0
.gymVictory
ld hl, wObtainedBadges
set 4, [hl]
ld hl, wBeatGymFlags
@ -142,17 +142,17 @@ FuchsiaGymTrainerHeader5:
FuchsiaGymText1:
TX_ASM
CheckEvent EVENT_BEAT_KOGA
jr z, .asm_181b6
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM06
jr nz, .asm_adc3b
jr nz, .afterVictory
call z, FuchsiaGymScript3_75497
call DisableWaitingAfterTextDisplay
jr .asm_e84c6
.asm_adc3b
jr .done
.afterVictory
ld hl, KogaExplainToxicText
call PrintText
jr .asm_e84c6
.asm_181b6
jr .done
.beginBattle
ld hl, KogaBeforeBattleText
call PrintText
ld hl, wd72d
@ -171,7 +171,7 @@ FuchsiaGymText1:
ld [hJoyHeld], a
ld a, $3
ld [wFuchsiaGymCurScript], a
.asm_e84c6
.done
jp TextScriptEnd
KogaBeforeBattleText:

View file

@ -764,17 +764,17 @@ OaksLab_TextPointers2:
OaksLabText1:
TX_ASM
CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2
jr nz, .asm_1d0de
jr nz, .beforeChooseMon
ld hl, OaksLabGaryText1
call PrintText
jr .done
.asm_1d0de
.beforeChooseMon
bit 2, a
jr nz, .asm_1d0ea
jr nz, .afterChooseMon
ld hl, OaksLabText40
call PrintText
jr .done
.asm_1d0ea
.afterChooseMon
ld hl, OaksLabText41
call PrintText
.done

View file

@ -54,12 +54,12 @@ PewterGymScript_5c3df:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM34
jr .asm_5c408
jr .gymVictory
.BagFull
ld a, $6
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5c408
.gymVictory
ld hl, wObtainedBadges
set 0, [hl]
ld hl, wBeatGymFlags
@ -101,17 +101,17 @@ PewterGymTrainerHeader0:
PewterGymText1:
TX_ASM
CheckEvent EVENT_BEAT_BROCK
jr z, .asm_5c46a
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM34
jr nz, .asm_5c462
jr nz, .gymVictory
call z, PewterGymScript_5c3df
call DisableWaitingAfterTextDisplay
jr .asm_5c49b
.asm_5c462
jr .done
.gymVictory
ld hl, PewterGymText_5c4a3
call PrintText
jr .asm_5c49b
.asm_5c46a
jr .done
.beginBattle
ld hl, PewterGymText_5c49e
call PrintText
ld hl, wd72d
@ -131,7 +131,7 @@ PewterGymText1:
ld a, $3
ld [wPewterGymCurScript], a
ld [wCurMapScript], a
.asm_5c49b
.done
jp TextScriptEnd
PewterGymText_5c49e:

View file

@ -54,12 +54,12 @@ SaffronGymText_5d068:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM46
jr .asm_5d091
jr .gymVictory
.BagFull
ld a, $c
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5d091
.gymVictory
ld hl, wObtainedBadges
set 5, [hl]
ld hl, wBeatGymFlags
@ -152,17 +152,17 @@ SaffronGymTrainerHeader6:
SaffronGymText1:
TX_ASM
CheckEvent EVENT_BEAT_SABRINA
jr z, .asm_5d134
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM46
jr nz, .asm_5d12c
jr nz, .afterVictory
call z, SaffronGymText_5d068
call DisableWaitingAfterTextDisplay
jr .asm_5d15f
.asm_5d12c
jr .done
.afterVictory
ld hl, SaffronGymText_5d16e
call PrintText
jr .asm_5d15f
.asm_5d134
jr .done
.beginBattle
ld hl, SaffronGymText_5d162
call PrintText
ld hl, wd72d
@ -179,7 +179,7 @@ SaffronGymText1:
ld [wGymLeaderNo], a
ld a, $3
ld [wSaffronGymCurScript], a
.asm_5d15f
.done
jp TextScriptEnd
SaffronGymText_5d162:

View file

@ -29,14 +29,14 @@ Gym3LeaderName:
VermilionGymScript_5ca6d:
CheckEvent EVENT_2ND_LOCK_OPENED
jr nz, .asm_5ca78
jr nz, .doorsOpen
ld a, $24
jr .asm_5ca7f
.asm_5ca78
jr .replaceTile
.doorsOpen
ld a, SFX_GO_INSIDE
call PlaySound
ld a, $5
.asm_5ca7f
.replaceTile
ld [wNewTileBlockID], a
lb bc, 2, 2
predef_jump ReplaceTileBlock
@ -73,12 +73,12 @@ VermilionGymScript_5caaa:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM24
jr .asm_5cad3
jr .gymVictory
.BagFull
ld a, $8
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5cad3
.gymVictory
ld hl, wObtainedBadges
set 2, [hl]
ld hl, wBeatGymFlags
@ -131,17 +131,17 @@ VermilionGymTrainerHeader2:
VermilionGymText1:
TX_ASM
CheckEvent EVENT_BEAT_LT_SURGE
jr z, .asm_5cb39
jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM24
jr nz, .asm_5cb31
jr nz, .afterBeat
call z, VermilionGymScript_5caaa
call DisableWaitingAfterTextDisplay
jr .asm_5cb6a
.asm_5cb31
jr .done
.afterBeat
ld hl, VermilionGymText_5cb72
call PrintText
jr .asm_5cb6a
.asm_5cb39
jr .done
.beforeBeat
ld hl, VermilionGymText_5cb6d
call PrintText
ld hl, wd72d
@ -161,7 +161,7 @@ VermilionGymText1:
ld a, $3
ld [wVermilionGymCurScript], a
ld [wCurMapScript], a
.asm_5cb6a
.done
jp TextScriptEnd
VermilionGymText_5cb6d:

View file

@ -148,12 +148,12 @@ ViridianGymScript3_74995:
ld [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM27
jr .asm_749be
jr .gymVictory
.BagFull
ld a, $e
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_749be
.gymVictory
ld hl, wObtainedBadges
set 7, [hl]
ld hl, wBeatGymFlags
@ -261,13 +261,13 @@ ViridianGymTrainerHeader7:
ViridianGymText1:
TX_ASM
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr z, .asm_6de66
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM27
jr nz, .asm_9fc95
jr nz, .afterVictory
call z, ViridianGymScript3_74995
call DisableWaitingAfterTextDisplay
jr .asm_6dff7
.asm_9fc95
jr .done
.afterVictory
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, ViridianGymText_74ad9
@ -279,8 +279,8 @@ ViridianGymText1:
call UpdateSprites
call Delay3
call GBFadeInFromBlack
jr .asm_6dff7
.asm_6de66
jr .done
.beginBattle
ld hl, ViridianGymText_74ace
call PrintText
ld hl, wd72d
@ -297,7 +297,7 @@ ViridianGymText1:
ld [wGymLeaderNo], a
ld a, $3
ld [wViridianGymCurScript], a
.asm_6dff7
.done
jp TextScriptEnd
ViridianGymText_74ace: