aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/PokemonMansion3F.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2023-11-20 00:33:27 -0600
committerdannye <33dannye@gmail.com>2023-11-20 20:23:27 -0600
commit298e99d3776580585c3f434e5d93137ae431bdd3 (patch)
treea808c4ffd0fd0f9bd28972bae5236e0d3345c8e5 /scripts/PokemonMansion3F.asm
parentAdd sound bits documentation for wOptions (#110) (diff)
parentName 2 unnamed labels I missed in SeafoamIslandsB4F and PokemonMansion3F (#437) (diff)
downloadpokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.gz
pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.xz
pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'scripts/PokemonMansion3F.asm')
-rw-r--r--scripts/PokemonMansion3F.asm88
1 files changed, 45 insertions, 43 deletions
diff --git a/scripts/PokemonMansion3F.asm b/scripts/PokemonMansion3F.asm
index 2fc7c18d..f64357d5 100644
--- a/scripts/PokemonMansion3F.asm
+++ b/scripts/PokemonMansion3F.asm
@@ -1,5 +1,5 @@
PokemonMansion3F_Script:
- call Mansion3Script_52204
+ call Mansion3CheckReplaceSwitchDoorBlocks
call EnableAutoTextBoxDrawing
ld hl, Mansion3TrainerHeaders
ld de, PokemonMansion3F_ScriptPointers
@@ -8,55 +8,56 @@ PokemonMansion3F_Script:
ld [wPokemonMansion3FCurScript], a
ret
-Mansion3Script_52204:
+Mansion3CheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
- jr nz, .asm_52224
+ jr nz, .switchTurnedOn
ld a, $e
lb bc, 2, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $5f
lb bc, 5, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
-.asm_52224
+.switchTurnedOn
ld a, $5f
lb bc, 2, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $e
lb bc, 5, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
PokemonMansion3F_ScriptPointers:
- dw Mansion3Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const PokemonMansion3FDefaultScript, SCRIPT_POKEMONMANSION3F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONMANSION3F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONMANSION3F_END_BATTLE
-Mansion3Script0:
- ld hl, CoordsData_52254
- call Mansion3Script_5225b
+PokemonMansion3FDefaultScript:
+ ld hl, .holeCoords
+ call .isPlayerFallingDownHole
ld a, [wWhichDungeonWarp]
and a
jp z, CheckFightingMapTrainers
cp $3
ld a, POKEMON_MANSION_1F
- jr nz, .asm_52250
+ jr nz, .fellDownHoleTo1F
ld a, POKEMON_MANSION_2F
-.asm_52250
+.fellDownHoleTo1F
ld [wDungeonWarpDestinationMap], a
ret
-CoordsData_52254:
+.holeCoords:
dbmapcoord 16, 14
dbmapcoord 17, 14
dbmapcoord 19, 14
db -1 ; end
-Mansion3Script_5225b:
+.isPlayerFallingDownHole:
xor a
ld [wWhichDungeonWarp], a
ld a, [wd72d]
@@ -78,62 +79,63 @@ Mansion3Script_Switches::
ret nz
xor a
ldh [hJoyHeld], a
- ld a, $6
+ ld a, TEXT_POKEMONMANSION3F_SWITCH
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansion3F_TextPointers:
- dw Mansion3Text1
- dw Mansion3Text2
- dw PickUpItemText
- dw PickUpItemText
- dw Mansion3Text5
- dw Mansion3Text6
+ def_text_pointers
+ dw_const PokemonMansion3FSuperNerdText, TEXT_POKEMONMANSION3F_SUPER_NERD
+ dw_const PokemonMansion3FScientistText, TEXT_POKEMONMANSION3F_SCIENTIST
+ dw_const PickUpItemText, TEXT_POKEMONMANSION3F_MAX_POTION
+ dw_const PickUpItemText, TEXT_POKEMONMANSION3F_IRON
+ dw_const PokemonMansion3FDiaryText, TEXT_POKEMONMANSION3F_DIARY
+ dw_const PokemonMansion2FSwitchText, TEXT_POKEMONMANSION3F_SWITCH ; This switch uses the text script from the 2F.
Mansion3TrainerHeaders:
def_trainers
Mansion3TrainerHeader0:
- trainer EVENT_BEAT_MANSION_3_TRAINER_0, 0, Mansion3BattleText1, Mansion3EndBattleText1, Mansion3AfterBattleText1
+ trainer EVENT_BEAT_MANSION_3_TRAINER_0, 0, PokemonMansion3FSuperNerdBattleText, PokemonMansion3FSuperNerdEndBattleText, PokemonMansion3FSuperNerdAfterBattleText
Mansion3TrainerHeader1:
- trainer EVENT_BEAT_MANSION_3_TRAINER_1, 2, Mansion3BattleText2, Mansion3EndBattleText2, Mansion3AfterBattleText2
+ trainer EVENT_BEAT_MANSION_3_TRAINER_1, 2, PokemonMansion3FScientistBattleText, PokemonMansion3FScientistEndBattleText, PokemonMansion3FScientistAfterBattleText
db -1 ; end
-Mansion3Text1:
+PokemonMansion3FSuperNerdText:
text_asm
ld hl, Mansion3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Mansion3Text2:
+PokemonMansion3FScientistText:
text_asm
ld hl, Mansion3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Mansion3BattleText1:
- text_far _Mansion3BattleText1
+PokemonMansion3FSuperNerdBattleText:
+ text_far _PokemonMansion3FSuperNerdBattleText
text_end
-Mansion3EndBattleText1:
- text_far _Mansion3EndBattleText1
+PokemonMansion3FSuperNerdEndBattleText:
+ text_far _PokemonMansion3FSuperNerdEndBattleText
text_end
-Mansion3AfterBattleText1:
- text_far _Mansion3AfterBattleText1
+PokemonMansion3FSuperNerdAfterBattleText:
+ text_far _PokemonMansion3FSuperNerdAfterBattleText
text_end
-Mansion3BattleText2:
- text_far _Mansion3BattleText2
+PokemonMansion3FScientistBattleText:
+ text_far _PokemonMansion3FScientistBattleText
text_end
-Mansion3EndBattleText2:
- text_far _Mansion3EndBattleText2
+PokemonMansion3FScientistEndBattleText:
+ text_far _PokemonMansion3FScientistEndBattleText
text_end
-Mansion3AfterBattleText2:
- text_far _Mansion3AfterBattleText2
+PokemonMansion3FScientistAfterBattleText:
+ text_far _PokemonMansion3FScientistAfterBattleText
text_end
-Mansion3Text5:
- text_far _Mansion3Text5
+PokemonMansion3FDiaryText:
+ text_far _PokemonMansion3FDiaryText
text_end