Particle Engine Library


Data Structures

struct  pgeParticle
struct  pgeParticleSystemInfo
struct  pgeParticleSystem

Defines

#define MAX_PARTICLES   500
#define MAX_PSYSTEMS   100

Functions

void pgeParticleSystemInit (pgeParticleSystem *ps, pgeTexture *spritetexture, pgeRect spriterect)
pgeParticleSystempgeParticleSystemCreate (pgeTexture *spritetexture, pgeRect spriterect)
void pgeParticleSystemSetInfoFromMemory (pgeParticleSystem *ps, const char *psi, int sizePsi, pgeTexture *spritetexture)
pgeParticleSystempgeParticleSystemLoadMemory (const char *psi, int sizePsi, pgeTexture *spritetexture)
int pgeParticleSystemSetInfoFromFile (pgeParticleSystem *ps, const char *filename, pgeTexture *spritetexture)
pgeParticleSystempgeParticleSystemLoad (const char *filename, pgeTexture *spritetexture)
void pgeParticleSystemDestroy (pgeParticleSystem *ps)
void pgeParticleSystemRender (pgeParticleSystem *ps)
void pgeParticleSystemFire (pgeParticleSystem *ps)
void pgeParticleSystemFireAt (pgeParticleSystem *ps, float x, float y)
void pgeParticleSystemStop (pgeParticleSystem *ps, int killParticles)
void pgeParticleSystemUpdate (pgeParticleSystem *ps, float deltatime)
void pgeParticleSystemMoveTo (pgeParticleSystem *ps, float x, float y, int moveParticles)
void pgeParticleSystemTranspose (pgeParticleSystem *ps, float x, float y)

Define Documentation

#define MAX_PARTICLES   500

#define MAX_PSYSTEMS   100


Function Documentation

pgeParticleSystem* pgeParticleSystemCreate ( pgeTexture spritetexture,
pgeRect  spriterect 
)

Create a pgeParticleSystem with default values.

Parameters:
spritetexture - Pointer to an existing pgeTexture.
spriterect - a pgeRect describing the region on the spritetexture to be drawn.
Returns:
Pointer to a pgeParticleSystem

void pgeParticleSystemDestroy ( pgeParticleSystem ps  ) 

Destroy a pgeParticleSystem

Parameters:
ps - Pointer to an existing pgeParticleSystem.

void pgeParticleSystemFire ( pgeParticleSystem ps  ) 

Fire a pgeParticleSystem at its current position

Parameters:
ps - Pointer to an existing pgeParticleSystem.

void pgeParticleSystemFireAt ( pgeParticleSystem ps,
float  x,
float  y 
)

Fire a pgeParticleSystem at a given coordinate

Parameters:
ps - Pointer to an existing pgeParticleSystem.
x - x coordinate.
y - y coordinate

void pgeParticleSystemInit ( pgeParticleSystem ps,
pgeTexture spritetexture,
pgeRect  spriterect 
)

Populate a pgeParticleSystem with default values.

Parameters:
spritetexture - Pointer to an existing pgeTexture.
spriterect - a pgeRect describing the region on the spritetexture to be drawn.

pgeParticleSystem* pgeParticleSystemLoad ( const char *  filename,
pgeTexture spritetexture 
)

Create a pgeParticleSystem with values read from file.

Parameters:
filename - the name of the file.
spritetexture - Pointer to an existing pgeTexture.
Returns:
Pointer to a pgeParticleSystem

pgeParticleSystem* pgeParticleSystemLoadMemory ( const char *  psi,
int  sizePsi,
pgeTexture spritetexture 
)

Create a pgeParticleSystem with values from memory.

Parameters:
psi - Pointer to a char array containing the byte representation of pgeParticleSystemInfo.
sizePsi - size of the psi char array.
spritetexture - Pointer to an existing pgeTexture.
Returns:
Pointer to a pgeParticleSystem

void pgeParticleSystemMoveTo ( pgeParticleSystem ps,
float  x,
float  y,
int  moveParticles 
)

Move a pgeParticleSystem to a new position

Parameters:
ps - Pointer to an existing pgeParticleSystem.
x - x coordinate.
y - y coordinate

void pgeParticleSystemRender ( pgeParticleSystem ps  ) 

Render the current state of a pgeParticleSystem

Parameters:
ps - Pointer to an existing pgeParticleSystem.

int pgeParticleSystemSetInfoFromFile ( pgeParticleSystem ps,
const char *  filename,
pgeTexture spritetexture 
)

Populate a pgeParticleSystem with values read from file.

Parameters:
ps - Pointer to an existing pgeParticleSystem.
filename - the name of the file.
spritetexture - Pointer to an existing pgeTexture.
Returns:
1 if file loaded OK, else 0 (the pgeParticleSystem ps is populated with default values in that case).

void pgeParticleSystemSetInfoFromMemory ( pgeParticleSystem ps,
const char *  psi,
int  sizePsi,
pgeTexture spritetexture 
)

Populate a pgeParticleSystem with values from memory.

Parameters:
ps - Pointer to an existing pgeParticleSystem.
psi - Pointer to a char array containing the byte representation of pgeParticleSystemInfo.
sizePsi - size of the psi char array.
spritetexture - Pointer to an existing pgeTexture.

void pgeParticleSystemStop ( pgeParticleSystem ps,
int  killParticles 
)

Stop a pgeParticleSystem from emitting new particles

Parameters:
ps - Pointer to an existing pgeParticleSystem.
killParticles - 1: already fired particles get killed 0: already fired particles stay.

void pgeParticleSystemTranspose ( pgeParticleSystem ps,
float  x,
float  y 
)

Transpose a pgeParticleSystem

Parameters:
ps - Pointer to an existing pgeParticleSystem.
x - x coordinate.
y - y coordinate

void pgeParticleSystemUpdate ( pgeParticleSystem ps,
float  deltatime 
)

Update a pgeParticleSystem

Parameters:
ps - Pointer to an existing pgeParticleSystem.
deltatime - time from last update.


Generated on Mon Sep 22 16:58:14 2008 for Phoenix Game Engine by  doxygen 1.5.5