coastline 0.0.4
Loading...
Searching...
No Matches
effects.h
Go to the documentation of this file.
1#ifndef COASTLINE_EFFECTS_H
2#define COASTLINE_EFFECTS_H
3
9
10#include <PR/ultratypes.h>
11
12#include "common/tirespray.h"
13#include "common/vecmath.h"
14#include "common/vehicle.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
31
33#define PARTICLES 256
34
46
58
70
82
94
106extern f32 g_afBillboardMatrix[4][4];
107
116extern u8 g_aTireSprayTexture[];
117
130
131#if TGR_PLATFORM == TGR_PLATFORM_N64
143#endif /* TGR_PLATFORM == TGR_PLATFORM_N64 */
144
145#if TGR_PLATFORM == TGR_PLATFORM_N64
156void EmitTireSpray(Vehicle *vehicle);
157#endif /* TGR_PLATFORM == TGR_PLATFORM_N64 */
158
159#if TGR_BOSS_RALLY
167void DrawTireSpray(const RacerSlot *slots);
168#else
178void DrawTireSpray(void);
179#endif /* TGR_BOSS_RALLY */
180
181#if TGR_PLATFORM == TGR_PLATFORM_N64
192void SpawnTireSmoke(Vehicle *vehicle);
193#endif /* TGR_PLATFORM == TGR_PLATFORM_N64 */
194
206
218
230
243
244#if TGR_BOSS_RALLY
257 const ViewportRect *viewports, u32 head, s32 red, s32 green, s32 blue);
258#else
271void RenderBillboardParticles(s32 head, s32 red, s32 green, s32 blue);
272#endif /* TGR_BOSS_RALLY */
273
274#if TGR_BOSS_RALLY
282void RenderTireSmoke(const ViewportRect *viewports);
283#else
294#endif /* TGR_BOSS_RALLY */
295
296#if TGR_BOSS_RALLY
305void RenderExhaustAndTireSpray(const ViewportRect *viewports, const RacerSlot *slots);
306#else
316#endif /* TGR_BOSS_RALLY */
317
318#ifdef __cplusplus
319}
320#endif
321
322#endif /* COASTLINE_EFFECTS_H */
u16 g_wTireSmokeListHead
The list of the tyre smoke off the paved road.
s32 ComputeScreenDepthZ(f32 z, f32 w)
Take a depth to the units of the depth buffer through the viewport.
f32 g_afBillboardMatrix[4][4]
The matrix from the world to the screen of the current view, with the axes of the screen as the puffs...
void DrawTireSpray(void)
Draw the spray of the wheels of every racer, except in the snow away from the tracks that show it the...
u16 g_wExhaustParticleListHead
The list of the exhaust.
void InitParticleSystem(void)
Free every puff of the pool and stop the exhaust of the vehicles.
Particle g_aParticlePool[PARTICLES]
The pool of smoke and exhaust particles linked by index.
#define PARTICLES
The puffs of the pool.
Definition effects.h:33
void EmitTireSpray(Vehicle *vehicle)
Throw the newest segment of the spray of each wheel from the surface under it, while the wheel is on ...
void UpdateAllVehicleEffects(void)
Update the effects of every racer for the weather: the exhaust in the snow, the tyre smoke in the dry...
void UpdateTireSmoke(void)
Drift, grow, and fade the tyre smoke, and free the puffs that have faded or fall too fast.
void SpawnTireSmoke(Vehicle *vehicle)
Count down to the next puff of smoke of each wheel, faster with the speed of the vehicle and the spin...
void SpawnExhaustParticle(Vehicle *vehicle)
Count down to the next puff of exhaust, faster as the engine revs, and blow it out behind the vehicle...
u16 g_wParticleFreeListHead
The list of the free puffs of the pool.
void RenderBillboardParticles(s32 head, s32 red, s32 green, s32 blue)
Draw a list of puffs of the pool as rectangles of the particle texture facing the screen.
void RenderTireSmoke(void)
Set g_afBillboardMatrix for the current view, and draw the tyre smoke in the colours of the track,...
u16 g_wPavedTireSmokeListHead
The list of the tyre smoke on the paved road.
void RenderExhaustAndTireSpray(void)
Draw the exhaust in the snow with the matrix RenderTireSmoke() set, then the spray.
u8 g_aTireSprayTexture[]
The texture of the spray, 32 by 64 texels of 4-bit intensity.
void UpdateExhaustParticles(void)
Drift, grow, and fade the exhaust, and free the puffs that have faded.
A puff of smoke or exhaust, in a list of the pool linked by index.
Definition effects.h:21
f32 size
Definition effects.h:25
Vec3f velocity
Definition effects.h:23
u16 next
Definition effects.h:26
Vec3f position
Definition effects.h:22
u8 fade
Definition effects.h:27
u8 alpha
Definition effects.h:28
A racer of a race.
Definition racerslot.h:28
A point or direction in space.
Definition vecmath.h:17
A vehicle.
Definition vehicle.h:143
The rectangle of the screen a view fills.
Definition render.h:134
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
float f32
Definition ultratypes.h:38
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18
The vector and matrix arithmetic of the game, its arctangent and power, the triangle and segment test...
The vehicles of a race, the cars they are, and their place on the track.