diff options
Diffstat (limited to 'scripts/LoreleisRoom.asm')
| -rw-r--r-- | scripts/LoreleisRoom.asm | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/scripts/LoreleisRoom.asm b/scripts/LoreleisRoom.asm index 1f42fa2e..c1cc2adb 100644 --- a/scripts/LoreleisRoom.asm +++ b/scripts/LoreleisRoom.asm @@ -28,18 +28,19 @@ LoreleiShowOrHideExitBlock: predef_jump ReplaceTileBlock ResetLoreleiScript: - xor a + xor a ; SCRIPT_LORELEISROOM_DEFAULT ld [wLoreleisRoomCurScript], a ret LoreleisRoom_ScriptPointers: - dw LoreleiScript0 - dw DisplayEnemyTrainerTextAndStartBattle - dw LoreleiScript2 - dw LoreleiScript3 - dw LoreleiScript4 + def_script_pointers + dw_const LoreleisRoomDefaultScript, SCRIPT_LORELEISROOM_DEFAULT + dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_LORELEISROOM_LORELEI_START_BATTLE + dw_const LoreleisRoomLoreleiEndBattleScript, SCRIPT_LORELEISROOM_LORELEI_END_BATTLE + dw_const LoreleisRoomPlayerIsMovingScript, SCRIPT_LORELEISROOM_PLAYER_IS_MOVING + dw_const LoreleisRoomNoopScript, SCRIPT_LORELEISROOM_NOOP -LoreleiScript4: +LoreleisRoomNoopScript: ret LoreleiScriptWalkIntoRoom: @@ -55,12 +56,12 @@ LoreleiScriptWalkIntoRoom: ld a, $6 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates - ld a, $3 + ld a, SCRIPT_LORELEISROOM_PLAYER_IS_MOVING ld [wLoreleisRoomCurScript], a ld [wCurMapScript], a ret -LoreleiScript0: +LoreleisRoomDefaultScript: ld hl, LoreleiEntranceCoords call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers @@ -75,7 +76,7 @@ LoreleiScript0: CheckAndSetEvent EVENT_AUTOWALKED_INTO_LORELEIS_ROOM jr z, LoreleiScriptWalkIntoRoom .stopPlayerFromLeaving - ld a, $2 + ld a, TEXT_LORELEISROOM_DONT_RUN_AWAY ldh [hSpriteIndexOrTextID], a call DisplayTextID ; "Don't run away!" ld a, D_UP @@ -83,7 +84,7 @@ LoreleiScript0: ld a, $1 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates - ld a, $3 + ld a, SCRIPT_LORELEISROOM_PLAYER_IS_MOVING ld [wLoreleisRoomCurScript], a ld [wCurMapScript], a ret @@ -95,7 +96,7 @@ LoreleiEntranceCoords: dbmapcoord 5, 11 db -1 ; end -LoreleiScript3: +LoreleisRoomPlayerIsMovingScript: ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -106,43 +107,44 @@ LoreleiScript3: ld [wCurMapScript], a ret -LoreleiScript2: +LoreleisRoomLoreleiEndBattleScript: call EndTrainerBattle ld a, [wIsInBattle] cp $ff jp z, ResetLoreleiScript - ld a, $1 + ld a, TEXT_LORELEISROOM_LORELEI ldh [hSpriteIndexOrTextID], a jp DisplayTextID LoreleisRoom_TextPointers: - dw LoreleiText1 - dw LoreleiDontRunAwayText + def_text_pointers + dw_const LoreleisRoomLoreleiText, TEXT_LORELEISROOM_LORELEI + dw_const LoreleisRoomLoreleiDontRunAwayText, TEXT_LORELEISROOM_DONT_RUN_AWAY LoreleisRoomTrainerHeaders: def_trainers LoreleisRoomTrainerHeader0: - trainer EVENT_BEAT_LORELEIS_ROOM_TRAINER_0, 0, LoreleiBeforeBattleText, LoreleiEndBattleText, LoreleiAfterBattleText + trainer EVENT_BEAT_LORELEIS_ROOM_TRAINER_0, 0, LoreleisRoomLoreleiBeforeBattleText, LoreleisRoomLoreleiEndBattleText, LoreleisRoomLoreleiAfterBattleText db -1 ; end -LoreleiText1: +LoreleisRoomLoreleiText: text_asm ld hl, LoreleisRoomTrainerHeader0 call TalkToTrainer jp TextScriptEnd -LoreleiBeforeBattleText: - text_far _LoreleiBeforeBattleText +LoreleisRoomLoreleiBeforeBattleText: + text_far _LoreleisRoomLoreleiBeforeBattleText text_end -LoreleiEndBattleText: - text_far _LoreleiEndBattleText +LoreleisRoomLoreleiEndBattleText: + text_far _LoreleisRoomLoreleiEndBattleText text_end -LoreleiAfterBattleText: - text_far _LoreleiAfterBattleText +LoreleisRoomLoreleiAfterBattleText: + text_far _LoreleisRoomLoreleiAfterBattleText text_end -LoreleiDontRunAwayText: - text_far _LoreleiDontRunAwayText +LoreleisRoomLoreleiDontRunAwayText: + text_far _LoreleisRoomLoreleiDontRunAwayText text_end |
