Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
n_particles.h File Reference

Particles management. More...

#include <allegro5/allegro.h>
#include <allegro5/allegro_audio.h>
#include <allegro5/allegro_acodec.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_primitives.h>
#include "n_common.h"
#include "n_log.h"
#include "n_list.h"
#include "n_3d.h"
#include "n_time.h"
+ Include dependency graph for n_particles.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PARTICLE
 Structure of a single particle. More...
 
struct  PARTICLE_EMITTER
 Structure of a particle emitter. More...
 
struct  PARTICLE_SYSTEM
 Structure of a particle system. More...
 

Macros

#define BITMAP_PART   8
 bitmap particle
 
#define CIRCLE_PART   6
 circle particle
 
#define FIRE_PART   4
 fire particle
 
#define NORMAL_PART   0
 classic moving particle
 
#define PIXEL_PART   7
 pixel particle
 
#define SINUS_PART   1
 sinus based moving particle
 
#define SNOW_PART   3
 snow particle
 
#define STAR_PART   5
 star particle
 
#define TEXT_PART   9
 bitmap particle
 
#define TRANS_PART   2
 transparent particle
 

Functions

PARTICLE_EMITTERadd_emitter (PARTICLE_SYSTEM *psys)
 add a new emitter to the particle system.
 
int add_particle (PARTICLE_SYSTEM *psys, int spr, int mode, int lifetime, int size, ALLEGRO_COLOR color, PHYSICS object)
 add a particle to the system
 
int add_particle_at (PARTICLE_SYSTEM *psys, int spr, int mode, double px, double py, double pz, int lifetime, int size_start, int size_end, ALLEGRO_COLOR color_start, ALLEGRO_COLOR color_end, double vx, double vy, double vz, double ax, double ay, double az)
 add a particle at an absolute world position (not relative to psys->source)
 
int add_particle_ex (PARTICLE_SYSTEM *psys, int spr, int mode, int off_x, int off_y, int lifetime, int size, ALLEGRO_COLOR color, double vx, double vy, double vz, double ax, double ay, double az)
 add a particle to the system (extended version)
 
int draw_particle (PARTICLE_SYSTEM *psys, double xpos, double ypos, int w, int h, double range)
 draw particles on screen
 
int free_emitters (PARTICLE_SYSTEM *psys)
 free all emitters in the particle system
 
int free_particle_system (PARTICLE_SYSTEM **psys)
 free a particle system
 
int init_particle_system (PARTICLE_SYSTEM **psys, int max, double x, double y, double z, int max_sprites)
 initialize a particle system
 
int manage_particle (PARTICLE_SYSTEM *psys)
 manage particles using internal timer
 
int manage_particle_ex (PARTICLE_SYSTEM *psys, double delta_t)
 manage particles with custom delta time
 
int move_particles (PARTICLE_SYSTEM *psys, double vx, double vy, double vz)
 move all particles by a velocity offset
 
int remove_emitter (PARTICLE_SYSTEM *psys, const PARTICLE_EMITTER *em)
 remove an emitter from the particle system and free it
 

Detailed Description

Particles management.

Author
Castagnier Mickael aka Gull Ra Driel
Version
1.0
Date
20/12/2012

Definition in file n_particles.h.