summaryrefslogtreecommitdiff
path: root/src/battle_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_setup.c')
-rw-r--r--src/battle_setup.c12
1 files changed, 7 insertions, 5 deletions
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;