#ifndef PARTICLES_H
#define PARTICLES_H

#define MAXPARTICLES 65536
#define MAXFREEPARTICLES 16384

#include "blobs.h"
#include "render.h"
#include "vector.h"

typedef struct particle
{
	vector pos;
	vector vel;
	vector acl;
	colorARGB col;
	int gfx;
	float life, lifedec;
	bool exists;
}particle;

void DrawZoomParticle(particle *p, blob_bitmap *bg, unsigned int *vram, bool filtering);
void DoParticleExplosion(vector *pos, int number, int gfx, float gravity, float life, float lifedec, float speedmul, colorARGB col, bool randcol);
void DoParticleImpactExplosion(vector *pos, vector *vel, int degrees, int number, int gfx, float gravity, float life, float lifedec, float speedmul, colorARGB col, bool randcol);
void CreateParticle(vector *pos, vector *vel, vector *acl, colorARGB *col, int gfx, float life, float lifedec);
void DoParticles();
void InitParticleGfx();

#endif
