include/field/weather.h
The ground particles and the rain that the weather state holds.
Included by script_commands_internal.h, script_commands_weather.c and dust.h.
Structures
| Name | Description | |
|---|---|---|
struct | WEATHER_PARTICLE | A ground particle: an OAM entry linked by depth, its place (16.16 pixels), its delay and its tick count. |
struct | WEATHER_STATE | The heap slot weather while the ground particles run: their tiles' VRAM cache entry and first tile, and the particles. |
Macros
| Name | Description | |
|---|---|---|
#define | GROUND_PARTICLE_FREED 65535 | WEATHER_PARTICLE.timer after the decrement that counts a live particle down, when it was already free (0): the Uint16 wraps. |
#define | RAIN_SPLASH_FRAMES 16 | The frames of a ground particle's splash (WeatherRainSplashFrames, or a scene's own GroundParticleFrames, five halfwords each), played from the last down to the first. |
#define | WEATHER_PARTICLE_COUNT 64 | WEATHER_STATE.particles. |
#define | RAIN_DROP_TICKS 12 | A raindrop's frames (fdWeatherUpdateRain). |
Functions
| Name | Description | |
|---|---|---|
void | fdGroundParticlesUpdate (void) | The weather and the ground's particles, each tick. |
void | fdMotesUpdate (void) | Event of fdMotesStart: moves and draws the 64 motes in HEAP_SLOT_WEATHER. |
void | fdWeatherUpdateRain (void) | This game's rain each tick (fdWeatherStartRain), outside Mars Lighthouse and on its ledges: each of the 64 streaks falls down and to the right onto a spot on the ground, a pair of WeatherRainStreakOffsets a tick, and then starts again 12 ticks up from a random spot (x within -64 to +192, z within -128 to +128 pixels of the map's focus). |
Description
The ground particles and the rain that the weather state holds.
Macros in detail
GROUND_PARTICLE_FREED
#define GROUND_PARTICLE_FREED 65535
WEATHER_PARTICLE.timer after the decrement that counts a live particle down,
when it was already free (0): the Uint16 wraps.
Referenced by fdGroundParticlesDraw(), fdGroundParticlesUpdate(), fdMotesUpdate() and fdWeatherUpdateRain().
Definition at line 39 of file weather.h.
RAIN_SPLASH_FRAMES
#define RAIN_SPLASH_FRAMES 16
The frames of a ground particle's splash (WeatherRainSplashFrames, or a
scene's own GroundParticleFrames, five halfwords each), played from the last
down to the first.
Referenced by fdGroundParticlesStart() and fdGroundParticlesUpdate().
Definition at line 43 of file weather.h.
WEATHER_PARTICLE_COUNT
#define WEATHER_PARTICLE_COUNT 64
WEATHER_STATE.particles.
Referenced by fdEffectInitSparkles(), fdEffectUpdateSparkles(), fdGroundParticlesStart(), fdGroundParticlesUpdate(), fdMotesStart(), fdMotesUpdate(), fdWeatherStartRain() and fdWeatherUpdateRain().
Definition at line 46 of file weather.h.
RAIN_DROP_TICKS
#define RAIN_DROP_TICKS 12
A raindrop's frames (fdWeatherUpdateRain).
Definition at line 48 of file weather.h.