diff options
| author | dannye <33dannye@gmail.com> | 2023-11-20 00:33:27 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2023-11-20 20:23:27 -0600 |
| commit | 298e99d3776580585c3f434e5d93137ae431bdd3 (patch) | |
| tree | a808c4ffd0fd0f9bd28972bae5236e0d3345c8e5 /scripts/PokemonMansion2F.asm | |
| parent | Add sound bits documentation for wOptions (#110) (diff) | |
| parent | Name 2 unnamed labels I missed in SeafoamIslandsB4F and PokemonMansion3F (#437) (diff) | |
| download | pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.gz pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.xz pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'scripts/PokemonMansion2F.asm')
| -rw-r--r-- | scripts/PokemonMansion2F.asm | 97 |
1 files changed, 49 insertions, 48 deletions
diff --git a/scripts/PokemonMansion2F.asm b/scripts/PokemonMansion2F.asm index a887913a..bc3d78e9 100644 --- a/scripts/PokemonMansion2F.asm +++ b/scripts/PokemonMansion2F.asm @@ -1,5 +1,5 @@ PokemonMansion2F_Script: - call Mansion2Script_51fee + call Mansion2CheckReplaceSwitchDoorBlocks call EnableAutoTextBoxDrawing ld hl, Mansion2TrainerHeaders ld de, PokemonMansion2F_ScriptPointers @@ -8,36 +8,36 @@ PokemonMansion2F_Script: ld [wPokemonMansion2FCurScript], a ret -Mansion2Script_51fee: +Mansion2CheckReplaceSwitchDoorBlocks: ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z CheckEvent EVENT_MANSION_SWITCH_ON - jr nz, .asm_52016 + jr nz, .switchTurnedOn ld a, $e lb bc, 2, 4 - call Mansion2Script_5202f + call Mansion2ReplaceBlock ld a, $54 lb bc, 4, 9 - call Mansion2Script_5202f + call Mansion2ReplaceBlock ld a, $5f lb bc, 11, 3 - call Mansion2Script_5202f + call Mansion2ReplaceBlock ret -.asm_52016 +.switchTurnedOn ld a, $5f lb bc, 2, 4 - call Mansion2Script_5202f + call Mansion2ReplaceBlock ld a, $e lb bc, 4, 9 - call Mansion2Script_5202f + call Mansion2ReplaceBlock ld a, $e lb bc, 11, 3 - call Mansion2Script_5202f + call Mansion2ReplaceBlock ret -Mansion2Script_5202f: +Mansion2ReplaceBlock: ld [wNewTileBlockID], a predef_jump ReplaceTileBlock @@ -47,89 +47,90 @@ Mansion2Script_Switches:: ret nz xor a ldh [hJoyHeld], a - ld a, $5 + ld a, TEXT_POKEMONMANSION2F_SWITCH ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansion2F_ScriptPointers: - dw CheckFightingMapTrainers - dw DisplayEnemyTrainerTextAndStartBattle - dw EndTrainerBattle + def_script_pointers + dw_const CheckFightingMapTrainers, SCRIPT_POKEMONMANSION2F_DEFAULT + dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONMANSION2F_START_BATTLE + dw_const EndTrainerBattle, SCRIPT_POKEMONMANSION2F_END_BATTLE PokemonMansion2F_TextPointers: - dw Mansion2Text1 - dw PickUpItemText - dw Mansion2Text3 - dw Mansion2Text4 - dw Mansion2Text5 + def_text_pointers + dw_const PokemonMansion2FSuperNerdText, TEXT_POKEMONMANSION2F_SUPER_NERD + dw_const PickUpItemText, TEXT_POKEMONMANSION2F_CALCIUM + dw_const PokemonMansion2FDiary1Text, TEXT_POKEMONMANSION2F_DIARY1 + dw_const PokemonMansion2FDiary2Text, TEXT_POKEMONMANSION2F_DIARY2 + dw_const PokemonMansion2FSwitchText, TEXT_POKEMONMANSION2F_SWITCH Mansion2TrainerHeaders: def_trainers Mansion2TrainerHeader0: - trainer EVENT_BEAT_MANSION_2_TRAINER_0, 0, Mansion2BattleText1, Mansion2EndBattleText1, Mansion2AfterBattleText1 + trainer EVENT_BEAT_MANSION_2_TRAINER_0, 0, PokemonMansion2FSuperNerdBattleText, PokemonMansion2FSuperNerdEndBattleText, PokemonMansion2FSuperNerdAfterBattleText db -1 ; end -Mansion2Text1: +PokemonMansion2FSuperNerdText: text_asm ld hl, Mansion2TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Mansion2BattleText1: - text_far _Mansion2BattleText1 +PokemonMansion2FSuperNerdBattleText: + text_far _PokemonMansion2FSuperNerdBattleText text_end -Mansion2EndBattleText1: - text_far _Mansion2EndBattleText1 +PokemonMansion2FSuperNerdEndBattleText: + text_far _PokemonMansion2FSuperNerdEndBattleText text_end -Mansion2AfterBattleText1: - text_far _Mansion2AfterBattleText1 +PokemonMansion2FSuperNerdAfterBattleText: + text_far _PokemonMansion2FSuperNerdAfterBattleText text_end -Mansion2Text3: - text_far _Mansion2Text3 +PokemonMansion2FDiary1Text: + text_far _PokemonMansion2FDiary1Text text_end -Mansion2Text4: - text_far _Mansion2Text4 +PokemonMansion2FDiary2Text: + text_far _PokemonMansion2FDiary2Text text_end -Mansion3Text6: -Mansion2Text5: +PokemonMansion2FSwitchText: text_asm - ld hl, Mansion2Text_520c2 + ld hl, .Text call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_520b9 + jr nz, .not_pressed ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, wCurrentMapScriptFlags set 5, [hl] - ld hl, Mansion2Text_520c7 + ld hl, .PressedText call PrintText ld a, SFX_GO_INSIDE call PlaySound CheckAndSetEvent EVENT_MANSION_SWITCH_ON - jr z, .asm_520bf + jr z, .done ResetEventReuseHL EVENT_MANSION_SWITCH_ON - jr .asm_520bf -.asm_520b9 - ld hl, Mansion2Text_520cc + jr .done +.not_pressed + ld hl, .NotPressed call PrintText -.asm_520bf +.done jp TextScriptEnd -Mansion2Text_520c2: - text_far _Mansion2Text_520c2 +.Text: + text_far _PokemonMansion2FSwitchText text_end -Mansion2Text_520c7: - text_far _Mansion2Text_520c7 +.PressedText: + text_far _PokemonMansion2FSwitchPressedText text_end -Mansion2Text_520cc: - text_far _Mansion2Text_520cc +.NotPressed: + text_far _PokemonMansion2FSwitchNotPressedText text_end |
