src/field/script_commands_reveal.c
Reveal: the world turns grey but for a rippling window round the leader, which ends when the leader walks out of it or its time runs out. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | REVEAL_RADIUS 60 | How far the leader may walk from where Reveal was cast, in screen pixels up and down; sideways x counts at about 0.82 of itself, so the edge is an ellipse about 73 pixels to either side. |
Functions
| Name | Description | |
|---|---|---|
void | fdActorSetRevealSpriteColor (Sint32 value) | Draws every live actor whose sprite shows a rock (SPRITE_ROCK) in the colour mode value: Reveal greys the rocks with the backgrounds as it starts (SPRITE_COLOR_GREY) and gives them back their colours as it ends (SPRITE_COLOR_NORMAL). |
void | fdPsynergyWatchLeaderDistance (void) | Event of the timed Psynergy (FIELD_PSYNERGY_REVEAL): asks for it to end once the leader is REVEAL_RADIUS from its centre or its time has run out. |
void | fdPsynergyReveal (void) | Reveal: the backgrounds turn grey and show only within a rippling ellipse round the leader; runs the scene's Reveal script if there is one, puts markers round the leader and watches how far the leader walks. |
void | fdPsynergyEndReveal (void) | Ends Reveal if it is running: stops its watch, brings the colours back from black over 30 ticks and runs the scene's PSYNERGY_PHASE_FADES script. |
Description
Reveal: the world turns grey but for a rippling window round the leader,
which ends when the leader walks out of it or its time runs out. Part of
script_commands.c.
Macros in detail
REVEAL_RADIUS
#define REVEAL_RADIUS 60
How far the leader may walk from where Reveal was cast, in screen pixels up and down; sideways x counts at about 0.82 of itself, so the edge is an ellipse about 73 pixels to either side.
Referenced by fdPsynergyWatchLeaderDistance().
Definition at line 41 of file script_commands_reveal.c.
Functions in detail
fdActorSetRevealSpriteColor
void fdActorSetRevealSpriteColor(Sint32 value)
Draws every live actor whose sprite shows a rock (SPRITE_ROCK) in the colour
mode value: Reveal greys the rocks with the backgrounds as it starts
(SPRITE_COLOR_GREY) and gives them back their colours as it ends
(SPRITE_COLOR_NORMAL).
References Sint32.
Referenced by fdPsynergyEndReveal() and fdPsynergyReveal().
Definition at line 11 of file script_commands_reveal.c.
fdPsynergyWatchLeaderDistance
void fdPsynergyWatchLeaderDistance(void)
Event of the timed Psynergy (FIELD_PSYNERGY_REVEAL): asks for it to end once
the leader is REVEAL_RADIUS from its centre or its time has run out.
References fdActorLookup(), MainRoutineStateWork, Sint32, state and syMulFX().
Referenced by fdPsynergyEndReveal() and fdPsynergyReveal().
Definition at line 45 of file script_commands_reveal.c.
fdPsynergyReveal
void fdPsynergyReveal(void)
Reveal: the backgrounds turn grey and show only within a rippling ellipse round the leader; runs the scene's Reveal script if there is one, puts markers round the leader and watches how far the leader walks.
References fdActorLookup(), fdActorSetRevealSpriteColor(), fdEffectSpawnRevealMarkers(), fdFindPsynergyCue(), fdPaletteFadeSetSource(), fdPaletteFadeSetTarget(), fdPaletteFadeStartInterpolation(), fdPsynergyWatchLeaderDistance(), fdRunPsynergyScript(), fdScreenTransitionStartHeldWindow(), MainRoutineStateWork, Sint32, state, sySetEvent(), sySoundPlayStub() and sySynch().
Referenced by fdPsynergyDispatch() and fdPsynergyRun().
Definition at line 82 of file script_commands_reveal.c.
fdPsynergyEndReveal
void fdPsynergyEndReveal(void)
Ends Reveal if it is running: stops its watch, brings the colours back from
black over 30 ticks and runs the scene's PSYNERGY_PHASE_FADES script.
References fdActorSetRevealSpriteColor(), fdFindPsynergyCue(), fdPaletteFadeSetSource(), fdPaletteFadeSetTarget(), fdPaletteFadeStartInterpolation(), fdPsynergyWatchLeaderDistance(), fdRunPsynergyScript(), MainRoutineStateWork, Sint32, state, syCloseEvent(), sySoundPlayStub() and sySynch().
Referenced by fdPsynergyDispatch(), fdPsynergyRun() and fdPsynergyRunEnd().
Definition at line 132 of file script_commands_reveal.c.