Provides camera functionality for world-to-screen coordinate conversion.
Defines the collider system for collision detection.
void ParticleEmitter_UpdateParticles(ParticleEmitter *emitter)
Updates the particles of an emitter.
Definition particles.c:175
void ParticleEmitter_Render(ParticleEmitter *emitter)
Renders the particles of an emitter.
Definition particles.c:106
void ParticleEmitter_SetMaxParticles(ParticleEmitter *emitter, int maxParticles)
Sets the maximum number of particles for an emitter.
Definition particles.c:236
void ParticleEmitter_ActivateOnce(ParticleEmitter *emitter)
Activates the emitter once.
Definition particles.c:296
void ParticleEmitter_DestroyEmitter(ParticleEmitter *emitter)
Destroys the emitter and frees its memory.
Definition particles.c:265
int ParticleEmitter_GetNextReady(ParticleEmitter *emitter)
Gets the next available particle index.
Definition particles.c:250
void ParticleEmitter_Update(ParticleEmitter *emitter)
Updates the emitter.
Definition particles.c:63
void ParticleEmitter_Deactivate(ParticleEmitter *emitter)
Deactivates the emitter.
Definition particles.c:310
void ParticleEmitter_Emit(ParticleEmitter *emitter)
Emits particles from the emitter.
Definition particles.c:135
bool ParticleEmitter_ParticlesAlive(ParticleEmitter *emitter)
Checks if the emitter has any particles alive.
Definition particles.c:281
This struct represents a collider.
Definition colliders.h:96
A struct that represents the configurations of a particle emitter.
Definition particles.h:105
Collider collider
Collider for the emitter (Not implemented)
Definition particles.h:148
Timer * emissionTimer
Timer for emission control.
Definition particles.h:141
float drag
Air resistance factor.
Definition particles.h:138
bool active
Whether the current emitter is active.
Definition particles.h:117
float emissionRate
Time between emissions in seconds.
Definition particles.h:110
int readyIndex
Next available particle index.
Definition particles.h:143
Vec2 direction
Base direction of emission.
Definition particles.h:113
SDL_Color startColor
Initial particle color.
Definition particles.h:130
int maxParticles
Maximum particles this emitter can have.
Definition particles.h:112
struct ParticleEmitter ** selfReference
A double pointer to this emitter.
Definition particles.h:144
float angleRange
Spread angle in degrees (0 - 360).
Definition particles.h:114
int loopCount
Number of times to loop.
Definition particles.h:120
SDL_Texture * particleTexture
Optional texture (NULL = rectangle)
Definition particles.h:134
float emitterAge
How long the emitter has been active in seconds.
Definition particles.h:119
bool useCollider
Whether to use a collider for the emitter.
Definition particles.h:147
float particleLifetime
How long particles live in seconds.
Definition particles.h:125
Vec2 startSize
Initial size of particles in pixels.
Definition particles.h:132
Vec2 position
Position of the emitter.
Definition particles.h:107
bool cameraLocked
If true, particles will appear static on the screen.
Definition particles.h:124
float particleSpeed
Particle movement speed.
Definition particles.h:126
Particle * particles
Array of particles.
Definition particles.h:142
void(* custom_Movement)(Particle *)
Movement behavior function (Will override default movement)
Definition particles.h:127
SDL_Color endColor
Final particle color.
Definition particles.h:131
int emissionNumber
Number of particles to emit per emission.
Definition particles.h:111
float emitterLifetime
How long the emitter is active in seconds.
Definition particles.h:118
Vec2 gravity
Force applied over time.
Definition particles.h:137
bool destroyWhenDone
Destroys emitter when all particles are gone.
Definition particles.h:121
Vec2 endSize
Final size of particles in pixels.
Definition particles.h:133
A struct that represents a particle.
Definition particles.h:62
float speed
Current speed.
Definition particles.h:65
Vec2 size
Current size (can change over lifetime)
Definition particles.h:72
float timeAlive
Time particle has been alive in seconds.
Definition particles.h:68
Vec2 initialSize
Starting size (for reference/reset)
Definition particles.h:84
SDL_Color color
Current color (interpolated between start/end)
Definition particles.h:71
Vec2 direction
Direction of movement.
Definition particles.h:64
float initialSpeed
Starting speed (for reference/reset)
Definition particles.h:82
Collider * collider
Collider for the particle (Not implemented)
Definition particles.h:88
Vec2 acceleration
Current acceleration (affected by gravity)
Definition particles.h:78
SDL_Color initialColor
Starting color (for reference/reset)
Definition particles.h:83
int bounceCount
Track number of bounces (Not implemented)
Definition particles.h:86
Vec2 position
Current position.
Definition particles.h:63
float drag
Individual drag factor.
Definition particles.h:79
float maxLifeTime
Time particle can live in seconds.
Definition particles.h:67
Vec2 velocity
Current velocity vector.
Definition particles.h:77
bool cameraLock
Whether the particle is locked to the camera.
Definition particles.h:85
float rotation
Current rotation angle (Not implemented)
Definition particles.h:73
float rotationSpeed
Speed of rotation (degrees/second) (Not implemented)
Definition particles.h:74
bool alive
Whether the particle is alive.
Definition particles.h:66
The Timer struct used to keep track of time.
Definition timer.h:48
A 2D vector structure.
Definition vec2.h:81
Provides timing functionality for cooldowns, fire rates, animations, and other time-based features.
Provides 2D vector functionality for positions, directions, and transformations.