src/scene/shared/orbit_update.c
Included by airs_rock_inside.c, aqua_rock_inside.c, gaia_rock_inside.c and magma_rock_inside.c.
Macros
| Name | Description | |
|---|---|---|
#define | ORBIT_GROWTH_FULL 141 | An orbiting actor's growth climbs by ORBIT_GROWTH_STEP every other tick, up to ORBIT_GROWTH_FULL, and its circle's radius is the growth times the sine of its phase, in ORBIT_PHASE_UNIT steps. |
#define | ORBIT_GROWTH_STEP 10 | |
#define | ORBIT_PHASE_UNIT (TRIG_TURN / 64) | |
#define | ORBIT_SLOWDOWN 128 |
Functions
| Name | Description | |
|---|---|---|
Bool | scOrbitUpdate (ORBIT *object) | Moves an orbiting actor round its centre as its circle grows, on a circle squashed to half its depth; returns 0 once it has stopped. |
Macros in detail
ORBIT_GROWTH_FULL
#define ORBIT_GROWTH_FULL 141
An orbiting actor's growth climbs by ORBIT_GROWTH_STEP every other tick, up
to ORBIT_GROWTH_FULL, and its circle's radius is the growth times the sine of
its phase, in ORBIT_PHASE_UNIT steps. Once grown it slows by ORBIT_SLOWDOWN a
tick to a stop.
Referenced by scOrbitUpdate().
Definition at line 5 of file orbit_update.c.
ORBIT_GROWTH_STEP
#define ORBIT_GROWTH_STEP 10
Referenced by scOrbitUpdate().
Definition at line 6 of file orbit_update.c.
ORBIT_PHASE_UNIT
#define ORBIT_PHASE_UNIT (TRIG_TURN / 64)
Referenced by scOrbitUpdate().
Definition at line 7 of file orbit_update.c.
ORBIT_SLOWDOWN
#define ORBIT_SLOWDOWN 128
Referenced by scOrbitUpdate().
Definition at line 8 of file orbit_update.c.
Functions in detail
scOrbitUpdate
Bool scOrbitUpdate(ORBIT *object)
Moves an orbiting actor round its centre as its circle grows, on a circle squashed to half its depth; returns 0 once it has stopped.
References syCos(), syIWRAMMulFX(), sySin() and TickCount.
Referenced by LessonSeekingSparkScript and MagmaRockInsideOrbitScript.
Definition at line 12 of file orbit_update.c.