diff options
Diffstat (limited to 'scripts/SilphCo3F.asm')
| -rw-r--r-- | scripts/SilphCo3F.asm | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/scripts/SilphCo3F.asm b/scripts/SilphCo3F.asm index eb92dd78..df9df9e8 100644 --- a/scripts/SilphCo3F.asm +++ b/scripts/SilphCo3F.asm @@ -1,5 +1,5 @@ SilphCo3F_Script: - call SilphCo3Script_59f71 + call SilphCo3FGateCallbackScript call EnableAutoTextBoxDrawing ld hl, SilphCo3TrainerHeaders ld de, SilphCo3F_ScriptPointers @@ -8,23 +8,23 @@ SilphCo3F_Script: ld [wSilphCo3FCurScript], a ret -SilphCo3Script_59f71: +SilphCo3FGateCallbackScript: ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo3GateCoords - call SilphCo2Script_59d43 - call SilphCo3Script_59fad + ld hl, .GateCoordinates + call SilphCo2F_SetCardKeyDoorYScript + call SilphCo3F_UnlockedDoorEventScript CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1 - jr nz, .asm_59f98 + jr nz, .unlock_door1 push af ld a, $5f ld [wNewTileBlockID], a lb bc, 4, 4 predef ReplaceTileBlock pop af -.asm_59f98 +.unlock_door1 CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret nz ld a, $5f @@ -32,93 +32,95 @@ SilphCo3Script_59f71: lb bc, 4, 8 predef_jump ReplaceTileBlock -SilphCo3GateCoords: +.GateCoordinates: dbmapcoord 4, 4 dbmapcoord 8, 4 db -1 ; end -SilphCo3Script_59fad: +SilphCo3F_UnlockedDoorEventScript: EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 - jr nz, .next + jr nz, .unlock_door1 SetEventReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret -.next +.unlock_door1 SetEventAfterBranchReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret SilphCo3F_ScriptPointers: - dw CheckFightingMapTrainers - dw DisplayEnemyTrainerTextAndStartBattle - dw EndTrainerBattle + def_script_pointers + dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO3F_DEFAULT + dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO3F_START_BATTLE + dw_const EndTrainerBattle, SCRIPT_SILPHCO3F_END_BATTLE SilphCo3F_TextPointers: - dw SilphCo3Text1 - dw SilphCo3Text2 - dw SilphCo3Text3 - dw PickUpItemText + def_text_pointers + dw_const SilphCo3FSilphWorkerMText, TEXT_SILPHCO3F_SILPH_WORKER_M + dw_const SilphCo3FRocketText, TEXT_SILPHCO3F_ROCKET + dw_const SilphCo3FScientistText, TEXT_SILPHCO3F_SCIENTIST + dw_const PickUpItemText, TEXT_SILPHCO3F_HYPER_POTION SilphCo3TrainerHeaders: def_trainers 2 SilphCo3TrainerHeader0: - trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3BattleText1, SilphCo3EndBattleText1, SilphCo3AfterBattleText1 + trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3FRocketBattleText, SilphCo3FRocketEndBattleText, SilphCo3FRocketAfterBattleText SilphCo3TrainerHeader1: - trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3BattleText2, SilphCo3EndBattleText2, SilphCo3AfterBattleText2 + trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3FScientistBattleText, SilphCo3FScientistEndBattleText, SilphCo3FScientistAfterBattleText db -1 ; end -SilphCo3Text1: +SilphCo3FSilphWorkerMText: text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI - ld hl, SilphCo3Text_59ffe - jr nz, .asm_59fee - ld hl, SilphCo3Text_59ff9 -.asm_59fee + ld hl, .YouSavedUsText + jr nz, .beat_giovanni + ld hl, .WhatShouldIDoText +.beat_giovanni call PrintText jp TextScriptEnd -SilphCo3Text_59ff9: - text_far _SilphCo3Text_59ff9 +.WhatShouldIDoText: + text_far _SilphCo3FSilphWorkerMWhatShouldIDoText text_end -SilphCo3Text_59ffe: - text_far _SilphCo3Text_59ffe +.YouSavedUsText: + text_far _SilphCo3FSilphWorkerMYouSavedUsText text_end -SilphCo3Text2: +SilphCo3FRocketText: text_asm ld hl, SilphCo3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo3BattleText1: - text_far _SilphCo3BattleText1 +SilphCo3FRocketBattleText: + text_far _SilphCo3FRocketBattleText text_end -SilphCo3EndBattleText1: - text_far _SilphCo3EndBattleText1 +SilphCo3FRocketEndBattleText: + text_far _SilphCo3FRocketEndBattleText text_end -SilphCo3AfterBattleText1: - text_far _SilphCo3AfterBattleText1 +SilphCo3FRocketAfterBattleText: + text_far _SilphCo3FRocketAfterBattleText text_end -SilphCo3Text3: +SilphCo3FScientistText: text_asm ld hl, SilphCo3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo3BattleText2: - text_far _SilphCo3BattleText2 +SilphCo3FScientistBattleText: + text_far _SilphCo3FScientistBattleText text_end -SilphCo3EndBattleText2: - text_far _SilphCo3EndBattleText2 +SilphCo3FScientistEndBattleText: + text_far _SilphCo3FScientistEndBattleText text_end -SilphCo3AfterBattleText2: - text_far _SilphCo3AfterBattleText2 +SilphCo3FScientistAfterBattleText: + text_far _SilphCo3FScientistAfterBattleText text_end |
