src/scene/shared/sol_sanctum_elemental_star_lights.c
Sol Sanctum's Elemental Star room and its eruption: the ten lights that float in the room, actors in a row from the first the map passes, each pulsing and drifting on its own path, read by its index from the tables of sol_sanctum_elemental_star_light_tables.c: SolSanctumLightDrift, SolSanctumLightSwing, SolSanctumLightDirection, SolSanctumLightMaxScales and SolSanctumLightScaleSteps.
Included by sol_sanctum_elemental_star_room.c and sol_sanctum_eruption.c.
Structures
| Name | Description | |
|---|---|---|
struct | SOL_SANCTUM_LIGHT_ENTRY | One floating light: its actor, its drift and its pulsing scale, and where it is while hidden. |
struct | SOL_SANCTUM_LIGHT_LIST | The floating lights' state in HEAP_SLOT_SOL_SANCTUM_LIGHTS, one entry per light. |
Macros
| Name | Description | |
|---|---|---|
#define | SOL_SANCTUM_LIGHT_STEP_TICKS 3 | A light moves every this many ticks. |
#define | SOL_SANCTUM_LIGHT_HIDDEN_STEPS 24 | Shrunk to a tenth, a light is hidden for this many of its steps while it drifts on unseen, then shows again where it has drifted to. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { SOL_SANCTUM_LIGHT_MAX } | The most lights the event keeps. |
Functions
| Name | Description | |
|---|---|---|
static void | scSolSanctumUpdateFloatingLights (void) | An event: every SOL_SANCTUM_LIGHT_STEP_TICKS each light pulses between a tenth of its size and its largest scale and drifts, swinging about on a sine of its drift speed on each axis it drifts on. |
void | scSolSanctumStartFloatingLights (Sint32 first, Uint32 count) | Starts the floating lights: count actors (at most SOL_SANCTUM_LIGHT_MAX) from first, each drawn translucent and starting at its largest scale. |
Description
Sol Sanctum's Elemental Star room and its eruption: the ten lights that float
in the room, actors in a row from the first the map passes, each pulsing and
drifting on its own path, read by its index from the tables of
sol_sanctum_elemental_star_light_tables.c: SolSanctumLightDrift,
SolSanctumLightSwing, SolSanctumLightDirection, SolSanctumLightMaxScales and
SolSanctumLightScaleSteps.
Macros in detail
SOL_SANCTUM_LIGHT_STEP_TICKS
#define SOL_SANCTUM_LIGHT_STEP_TICKS 3
A light moves every this many ticks.
Referenced by scSolSanctumStartFloatingLights() and scSolSanctumUpdateFloatingLights().
Definition at line 17 of file sol_sanctum_elemental_star_lights.c.
SOL_SANCTUM_LIGHT_HIDDEN_STEPS
#define SOL_SANCTUM_LIGHT_HIDDEN_STEPS 24
Shrunk to a tenth, a light is hidden for this many of its steps while it drifts on unseen, then shows again where it has drifted to.
Referenced by scSolSanctumUpdateFloatingLights().
Definition at line 20 of file sol_sanctum_elemental_star_lights.c.
Enumerations in detail
anonymous enum
enum { SOL_SANCTUM_LIGHT_MAX }
The most lights the event keeps.
| Enumerator | Value | Description |
|---|---|---|
SOL_SANCTUM_LIGHT_MAX | 10 |
Definition at line 11 of file sol_sanctum_elemental_star_lights.c.
Functions in detail
scSolSanctumUpdateFloatingLights
static void scSolSanctumUpdateFloatingLights(void)
An event: every SOL_SANCTUM_LIGHT_STEP_TICKS each light pulses between a
tenth of its size and its largest scale and drifts, swinging about on a sine
of its drift speed on each axis it drifts on.
References Sint32, SolSanctumLightDirection, SolSanctumLightDrift, SolSanctumLightMaxScales, SolSanctumLightScaleSteps, SolSanctumLightSwing, syCos(), syHeapSlotAllocateEWRAM() and sySin().
Referenced by scSolSanctumStartFloatingLights().
Definition at line 53 of file sol_sanctum_elemental_star_lights.c.
scSolSanctumStartFloatingLights
void scSolSanctumStartFloatingLights(Sint32 first, Uint32 count)
Starts the floating lights: count actors (at most SOL_SANCTUM_LIGHT_MAX) from
first, each drawn translucent and starting at its largest scale.
References fdActorGetById(), fdActorSetBlendMode(), scSolSanctumUpdateFloatingLights(), Sint32, SolSanctumLightMaxScales, SolSanctumLightScaleSteps, syHeapSlotAllocateEWRAM() and sySetTickEvent().
Referenced by scInit().
Definition at line 195 of file sol_sanctum_elemental_star_lights.c.