reveal.c
Reveal.
games/tbs/src/object/psynergy_effects/reveal.c on GitHub
Reveal. Part of psynergy_effects.c, compiled only through it.
Functions
ObjectDispatch_ApplyValueToKind200Children
void ObjectDispatch_ApplyValueToKind200Children(s32 value)
Gives every live object of the 64 whose first sprite layer shows sprite 200 the sprite param value, and marks it to be redrawn. Reveal sets 6 as it starts and 0 as it ends.
Used by FieldFx_RunReveal, ResetSceneTransitionEffect.
FieldEffect_WatchLeaderDistance
void FieldEffect_WatchLeaderDistance(void)
Scheduler callback of the timed effect (kind 8): asks for it to end once the leader is 60 pixels from its centre or its time has run out. The centre and the time are in the event work from 0xcb8 on (FieldFx_RunReveal). The time counts only while effectTimerRunning is set, so menus and other effects pause it. It asks every frame until ResetSceneTransitionEffect removes it.
Used by FieldFx_RunReveal, ResetSceneTransitionEffect.
FieldFx_RunReveal
void FieldFx_RunReveal(void)
Starts a screen transition centred on the leader, runs the matching event if there is one, and puts markers round the leader.
Abilities: Reveal (field kind 8).
The transition is window transition mode 8, a wobbling circle round the leader stepped over 19 frames, and the BG colours turn grey. Reveal lasts 600 frames of its own time, or until the leader leaves its circle (FieldEffect_WatchLeaderDistance), and ResetSceneTransitionEffect ends it. Called by BattleFx_Run and BattleFx_DispatchRequestKind.
Used by BattleFx_DispatchRequestKind, BattleFx_Run.
ResetSceneTransitionEffect
void ResetSceneTransitionEffect(void)
Ends Reveal if it is running: stops its watch, brings the colours back from black over 30 frames and runs stage 4 of the Psynergy event. Unless a scene set childOption, the window transition is then reset at once (next mode 0, one frame). Called as Reveal ends (FieldEvent_RunTypeHandler) and before Mind Read starts its own colours.
Used by BattleFx_DispatchRequestKind, BattleFx_Run, FieldEvent_RunTypeHandler.
Macros, without a comment: REVEAL_END_EVENT.