kettek2/wiki/games/newsboy/Newsboy_0x00/engine/Particle.h

39 lines
892 B
C

#ifndef PARTICLE_H
#define PARTICLE_H
#include "IdIndex.h"
#include "Index.h"
#include "Animation.h"
#include "AnimData.h"
#include "Phys.h"
#define PART_DIE 1
struct Particle {
struct Phys phys;
struct Phys l_phys;
struct Animation animation;
struct Vector target;
float r;
float g;
float b;
float a;
int flags;
int time; // life time, in ms
};
// TEMP
struct Particle *newParticle();
struct Particle *freeParticle(struct Particle *particle);
int setParticleAnim(struct Particle *particle, struct AnimData* data);
struct Particles {
// live particles
int l_count;
int l_size;
struct Particle **live;
};
struct Particles *newParticles(int l_size);
struct Particles *freeParticles(struct Particles *p);
int addParticle(struct Particles *ps, struct Particle *p);
int remParticle(struct Particles *ps, int id);
int delParticle(struct Particles *ps, int id);
#endif