diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-02-01 21:04:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 21:04:00 -0500 |
commit | 7e26aa3d21f55e1375bfde6ffbc70210170fdc37 (patch) | |
tree | 8904e34e1c44fc10c413b2ba5a42d06b61ca1343 /src/battle_setup.c | |
parent | 90513a9d726e6cda19a3f8fdc8988ee31d9f4ff1 (diff) | |
parent | 92bd6400b7ded57bde9a41206d10a5dcbd9f6383 (diff) |
Merge pull request #1316 from GriffinRichards/doc-scrcmd
Label remaining script commands, document some scrcmd.c, event_object_lock, trainer_see, berry tree
Diffstat (limited to 'src/battle_setup.c')
-rw-r--r-- | src/battle_setup.c | 12 |
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; |