summaryrefslogtreecommitdiff
path: root/src/battle_setup.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-01-26 04:41:13 -0500
committerGriffinR <griffin.g.richards@gmail.com>2021-01-26 04:42:18 -0500
commit9e5958122011a2d5092db57f07f14fd511fb6f42 (patch)
tree316c5533951be13d21d8568a936d868a810ae27a /src/battle_setup.c
parent0064333e4aa1bacb42f840ba67d38a9aced8816e (diff)
Document object lock and some trainer approach
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;