From 9e5958122011a2d5092db57f07f14fd511fb6f42 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 26 Jan 2021 04:41:13 -0500 Subject: Document object lock and some trainer approach --- src/battle_setup.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/battle_setup.c') diff --git a/src/battle_setup.c b/src/battle_setup.c index 0a5e7e8b4..cb65d25d6 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1197,7 +1197,7 @@ void ConfigureAndSetUpOneTrainerBattle(u8 trainerObjEventId, const u8 *trainerSc gSelectedObjectEvent = trainerObjEventId; gSpecialVar_LastTalked = gObjectEvents[trainerObjEventId].localId; BattleSetup_ConfigureTrainerBattle(trainerScript + 1); - ScriptContext1_SetupScript(EventScript_271354); + ScriptContext1_SetupScript(EventScript_StartTrainerApproach); ScriptContext2_Enable(); } @@ -1210,7 +1210,7 @@ void ConfigureTwoTrainersBattle(u8 trainerObjEventId, const u8 *trainerScript) void SetUpTwoTrainersBattle(void) { - ScriptContext1_SetupScript(EventScript_271354); + ScriptContext1_SetupScript(EventScript_StartTrainerApproach); ScriptContext2_Enable(); } @@ -1220,10 +1220,12 @@ bool32 GetTrainerFlagFromScriptPointer(const u8 *data) return FlagGet(TRAINER_FLAGS_START + flag); } -void SetUpTrainerMovement(void) +// Set trainer's movement type so they stop and remain facing that direction +// Note: Only for trainers who are spoken to directly +// For trainers who spot the player this is handled by PlayerFaceApproachingTrainer +void SetTrainerFacingDirection(void) { struct ObjectEvent *objectEvent = &gObjectEvents[gSelectedObjectEvent]; - SetTrainerMovementType(objectEvent, GetTrainerFacingDirectionMovementType(objectEvent->facingDirection)); } @@ -1437,7 +1439,7 @@ void ShowTrainerCantBattleSpeech(void) ShowFieldMessage(GetTrainerCantBattleSpeech()); } -void SetUpTrainerEncounterMusic(void) +void PlayTrainerEncounterMusic(void) { u16 trainerId; u16 music; -- cgit v1.2.3