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/AgathasRoom.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/AgathasRoom.asm')
| -rw-r--r-- | scripts/AgathasRoom.asm | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/scripts/AgathasRoom.asm b/scripts/AgathasRoom.asm index abe22a4f..cf5254ac 100644 --- a/scripts/AgathasRoom.asm +++ b/scripts/AgathasRoom.asm @@ -26,18 +26,19 @@ AgathaShowOrHideExitBlock: predef_jump ReplaceTileBlock ResetAgathaScript: - xor a + xor a ; SCRIPT_AGATHASROOM_DEFAULT ld [wAgathasRoomCurScript], a ret AgathasRoom_ScriptPointers: - dw AgathaScript0 - dw DisplayEnemyTrainerTextAndStartBattle - dw AgathaScript2 - dw AgathaScript3 - dw AgathaScript4 + def_script_pointers + dw_const AgathasRoomDefaultScript, SCRIPT_AGATHASROOM_DEFAULT + dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_AGATHASROOM_AGATHA_START_BATTLE + dw_const AgathasRoomAgathaEndBattleScript, SCRIPT_AGATHASROOM_AGATHA_END_BATTLE + dw_const AgathasRoomPlayerIsMovingScript, SCRIPT_AGATHASROOM_PLAYER_IS_MOVING + dw_const AgathasRoomNoopScript, SCRIPT_AGATHASROOM_NOOP -AgathaScript4: +AgathasRoomNoopScript: ret AgathaScriptWalkIntoRoom: @@ -53,12 +54,12 @@ AgathaScriptWalkIntoRoom: ld a, $6 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates - ld a, $3 + ld a, SCRIPT_AGATHASROOM_PLAYER_IS_MOVING ld [wAgathasRoomCurScript], a ld [wCurMapScript], a ret -AgathaScript0: +AgathasRoomDefaultScript: ld hl, AgathaEntranceCoords call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers @@ -73,15 +74,15 @@ AgathaScript0: CheckAndSetEvent EVENT_AUTOWALKED_INTO_AGATHAS_ROOM jr z, AgathaScriptWalkIntoRoom .stopPlayerFromLeaving - ld a, $2 + ld a, TEXT_AGATHASROOM_AGATHA_DONT_RUN_AWAY ldh [hSpriteIndexOrTextID], a - call DisplayTextID ; "Don't run away!" + call DisplayTextID ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates - ld a, $3 + ld a, SCRIPT_AGATHASROOM_PLAYER_IS_MOVING ld [wAgathasRoomCurScript], a ld [wCurMapScript], a ret @@ -93,7 +94,7 @@ AgathaEntranceCoords: dbmapcoord 5, 11 db -1 ; end -AgathaScript3: +AgathasRoomPlayerIsMovingScript: ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -104,21 +105,22 @@ AgathaScript3: ld [wCurMapScript], a ret -AgathaScript2: +AgathasRoomAgathaEndBattleScript: call EndTrainerBattle ld a, [wIsInBattle] cp $ff jp z, ResetAgathaScript - ld a, $1 + ld a, TEXT_AGATHASROOM_AGATHA ldh [hSpriteIndexOrTextID], a call DisplayTextID - ld a, $1 + ld a, SCRIPT_CHAMPIONSROOM_PLAYER_ENTERS ld [wChampionsRoomCurScript], a ret AgathasRoom_TextPointers: - dw AgathaText1 - dw AgathaDontRunAwayText + def_text_pointers + dw_const AgathasRoomAgathaText, TEXT_AGATHASROOM_AGATHA + dw_const AgathasRoomAgathaDontRunAwayText, TEXT_AGATHASROOM_AGATHA_DONT_RUN_AWAY AgathasRoomTrainerHeaders: def_trainers @@ -126,7 +128,7 @@ AgathasRoomTrainerHeader0: trainer EVENT_BEAT_AGATHAS_ROOM_TRAINER_0, 0, AgathaBeforeBattleText, AgathaEndBattleText, AgathaAfterBattleText db -1 ; end -AgathaText1: +AgathasRoomAgathaText: text_asm ld hl, AgathasRoomTrainerHeader0 call TalkToTrainer @@ -144,6 +146,6 @@ AgathaAfterBattleText: text_far _AgathaAfterBattleText text_end -AgathaDontRunAwayText: - text_far _AgathaDontRunAwayText +AgathasRoomAgathaDontRunAwayText: + text_far _AgathasRoomAgathaDontRunAwayText text_end |
