Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups
Data Structures | Macros | Typedefs | Functions
n_particles.h File Reference
`#include "n_common.h"`
`#include "n_log.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
struct | PARTICLE_SYSTEM

## Macros

#define | NORMAL_PART 0
#define | SINUS_PART 1
#define | TRANS_PART 2
#define | particle_foreach(__ITEM_, __PARTICLE_SYSTEM_)

## Typedefs

typedef struct PARTICLE | PARTICLE
typedef struct PARTICLE_SYSTEM | PARTICLE_SYSTEM

## Functions

int | init_particle_system (PARTICLE_SYSTEM **psys, int max, double x, double y, double z)
int | add_particle (PARTICLE_SYSTEM *psys, BITMAP *spr, int mode, int off_x, int off_y, int lifetime, int color, double vx, double vy, double vz, double ax, double ay, double az)
int | manage_particle (PARTICLE_SYSTEM *psys)
int | draw_particle (BITMAP *bmp, PARTICLE_SYSTEM *psys)
int | free_particle (PARTICLE_SYSTEM *psys, PARTICLE **ptr)
int | free_particle_system (PARTICLE_SYSTEM **psys)

## Detailed Description

Particle management

Author
  Castagnier Mickaël aka Gull Ra Driel

Version
  1.0

Date
  15/12/2007

Definition in file n_particles.h.

## Macro Definition Documentation

#define NORMAL_PART 0

Definition at line 27 of file n_particles.h.

#define particle_foreach | ( |  | __ITEM_,
|  |  | __PARTICLE_SYSTEM_
| ) |  |

Value:
if( !__PARTICLE_SYSTEM_ ) \
{ \
n_log( LOG_ERR , "Error in particle_foreach, %s is NULL" , #__PARTICLE_SYSTEM_ ); \
} \
else \
for( PARTICLE *__ITEM_ = __PARTICLE_SYSTEM_ -> list_start ; __ITEM_ != NULL; __ITEM_ = __ITEM_ -> next ) \

ForEach macro helper

Definition at line 64 of file n_particles.h.

#define SINUS_PART 1

Definition at line 28 of file n_particles.h.

#define TRANS_PART 2

Definition at line 29 of file n_particles.h.

## Typedef Documentation

typedef struct PARTICLE PARTICLE

typedef struct PARTICLE_SYSTEM PARTICLE_SYSTEM

## Function Documentation

int add_particle | ( | PARTICLE_SYSTEM * | psys,
|  | BITMAP * | spr,
|  | int | mode,
|  | int | off_x,
|  | int | off_y,
|  | int | lifetime,
|  | int | color,
|  | double | vx,
|  | double | vy,
|  | double | vz,
|  | double | ax,
|  | double | ay,
|  | double | az
| ) |  |

Definition at line 37 of file n_particles.c.

int draw_particle | ( | BITMAP * | bmp,
|  | PARTICLE_SYSTEM * | psys
| ) |  |

Definition at line 169 of file n_particles.c.

int free_particle | ( | PARTICLE_SYSTEM * | psys,
|  | PARTICLE ** | ptr
| ) |  |

Definition at line 221 of file n_particles.c.

int free_particle_system | ( | PARTICLE_SYSTEM ** | psys | ) |

Definition at line 264 of file n_particles.c.

int init_particle_system | ( | PARTICLE_SYSTEM ** | psys,
|  | int | max,
|  | double | x,
|  | double | y,
|  | double | z
| ) |  |

Definition at line 18 of file n_particles.c.

Here is the call graph for this function:

int manage_particle | ( | PARTICLE_SYSTEM * | psys | ) |

Definition at line 98 of file n_particles.c.

Here is the call graph for this function: