halt.c
Halt.
games/tbs/src/object/psynergy_effects/halt.c on GitHub
Halt. Part of psynergy_effects.c, compiled only through it.
Functions
BattleFx_UpdateRadialCamera
void BattleFx_UpdateRadialCamera(struct EffectSlot *effect)
Effect slot callback: state 0 heads for a point 40 to 70 pixels from where the particle appeared; state 1 waits to arrive, then goes on to 2; state 2 heads for a point 4 pixels round 8 pixels above the effect's position on screen; state 3 frees the slot on arrival. Set on the 16 particles of BattleEffect_RunFallbackObjectTransition. They fly out straight at up to 4 pixels a frame and come back turning at most 1/16 turn a frame.
Used by BattleEffect_RunFallbackObjectTransition.
BattleFx_MarkChildAndRunFallbackTransition
void BattleFx_MarkChildAndRunFallbackTransition(s32 unused)
Pauses the target (scene->child) and runs BattleEffect_RunFallbackObjectTransition. Called by BattleFx_Run and BattleFx_DispatchRequestKind for Halt on a target; sets the target's paused field.
Used by BattleFx_DispatchRequestKind, BattleFx_Run.
BattleEffect_RunFallbackObjectTransition
void BattleEffect_RunFallbackObjectTransition(void)
Throws an object from the caster to the effect's position over 10 frames and scatters it into 16 particles. Halt's visible effect: called by BattleFx_Run when no target with a talk event is near, and through BattleFx_MarkChildAndRunFallbackTransition otherwise. Fills effect slots 0 to 15 and sets scene->y to the caster's height.
Used by BattleFx_MarkChildAndRunFallbackTransition, BattleFx_Run.
BattleEffect_SetRandomTableValueOnObject
void BattleEffect_SetRandomTableValueOnObject(union FieldObject *fieldObject)
Per-frame update of a paused object: gives its sprite one of the table's eight params at random. BattleEffect_PauseObject sets it, and BattleFx_ResumeObject looks for it to know the object was paused this way.
Used by BattleEffect_PauseObject, BattleFx_ResumeObject.
BattleEffect_PauseObject
void BattleEffect_PauseObject(s32 actorId)
Pauses object id, keeping its per-frame update and, if it is animated, its first animation's param in gGameState. Called by BattleFx_Run and BattleFx_DispatchRequestKind for Halt, which then record the id in gGameState.pausedObject, and by the Colosso scenes to stop their operators. Sets gGameState.pausedUpdate and pausedPose, the object's update and paused fields, and stops its animation. gGameState keeps one object's state, so Halt resumes the one it stopped before it stops another; the paused object flickers through random sprite params meanwhile.
Used by BattleFx_DispatchRequestKind, BattleFx_Run, ColossoLog_Initialize, ColossoWall_Initialize, Event_HaltLifts, Event_HaltWall.
BattleFx_ResumeObject
void BattleFx_ResumeObject(s32 actorId)
Resumes object id with the update and param kept by BattleEffect_PauseObject. Called for gGameState.pausedObject by BattleFx_Run and BattleFx_DispatchRequestKind before Halt stops another object, and by Scene_TalkToActor after talking to the paused actor. Clears gGameState.pausedUpdate and the object's paused field, and restarts its animation at speed 16.
Used by BattleFx_DispatchRequestKind, BattleFx_Run, Scene_TalkToActor.
BattleFx_FilterObjectIdByFlags
s32 BattleFx_FilterObjectIdByFlags(s32 id)
Returns id, or -1 (no target) when actor id's sprite has flags 0xff in gBattleFx_DefinitionTable (BattleFx_GetFlags): the 20 rows before the default. Called by BattleFx_Run on the nearest Halt target, so Halt does not stop those actors; an unlisted sprite takes the default row's flags 0.
Used by BattleFx_Run.