Nilorea Library
C utilities for networking, threading, graphics
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_SYSTEM
 Structure of a particle system. More...
 

Macros

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

Functions

int add_particle (PARTICLE_SYSTEM *psys, int spr, int mode, int lifetime, int size, ALLEGRO_COLOR color, PHYSICS object)
 add a particle to a particle system More...
 
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 a particle system, all in line version (you have to set the PHYSICS object parameter in the function parameter instead of providing a PHYSICS object) More...
 
int draw_particle (PARTICLE_SYSTEM *psys, double xpos, double ypos, int w, int h, double range)
 draw particles of a particle system More...
 
int free_particle_system (PARTICLE_SYSTEM **psys)
 destroy and free a particle system More...
 
int init_particle_system (PARTICLE_SYSTEM **psys, int max, double x, double y, double z, int max_sprites)
 initialize a particle system More...
 
int manage_particle (PARTICLE_SYSTEM *psys)
 update particles positions usting particle system internal timer More...
 
int manage_particle_ex (PARTICLE_SYSTEM *psys, double delta_t)
 update particles positions usting provided delta time More...
 
int move_particles (PARTICLE_SYSTEM *psys, double vx, double vy, double vz)
 draw particles of a particle system More...
 

Detailed Description

Particles management.

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

Definition in file n_particles.h.