5 Struct PARTICLE
gullradriel edited this page 2026-10-09 00:55:18 +02:00

PARTICLE

Module: GRAPHICS: 3D particles utilities

Structure of a single particle.

#include "n_particles.h"

Public Attributes

Name
int spr_id
sprite id in library
int size_start
particle size at birth
int size_end
particle size at death
int size
current size of particle
PHYSICS object
particle physical properties
int mode
particle mode: NORMAL_PART,SINUS_PART,PIXEL_PART
int lifetime_max
original lifetime at birth (needed for lerp ratio = age/lifetime_max)
int lifetime
lifetime (counts down, msecs)
struct PARTICLE_EMITTER * emitter
back-pointer to owning emitter (NULL if spawned manually)
int depth_sort
1=depth-sorted with terrain, 0=flat overlay after iso pass
ALLEGRO_COLOR color_start
start color for lerp (set by emitter, ignored if color_start == color_end)
ALLEGRO_COLOR color_end
end color for lerp
ALLEGRO_COLOR color
color of the particle
int age
current age in msecs (incremented by manage_particle_ex)
int additive
1=additive blend, 0=normal alpha

Public Attributes Documentation

variable spr_id

int spr_id;

sprite id in library

variable size_start

int size_start;

particle size at birth

variable size_end

int size_end;

particle size at death

variable size

int size;

current size of particle

variable object

PHYSICS object;

particle physical properties

variable mode

int mode;

particle mode: NORMAL_PART,SINUS_PART,PIXEL_PART

variable lifetime_max

int lifetime_max;

original lifetime at birth (needed for lerp ratio = age/lifetime_max)

variable lifetime

int lifetime;

lifetime (counts down, msecs)

variable emitter

struct PARTICLE_EMITTER * emitter;

back-pointer to owning emitter (NULL if spawned manually)

variable depth_sort

int depth_sort;

1=depth-sorted with terrain, 0=flat overlay after iso pass

variable color_start

ALLEGRO_COLOR color_start;

start color for lerp (set by emitter, ignored if color_start == color_end)

variable color_end

ALLEGRO_COLOR color_end;

end color for lerp

variable color

ALLEGRO_COLOR color;

color of the particle

variable age

int age;

current age in msecs (incremented by manage_particle_ex)

variable additive

int additive;

1=additive blend, 0=normal alpha