#ifndef _particle_h
#define _particle_h

enum particletype
{
	P_FLAME = 0,
	P_DUST,
	P_SMOKE,
	P_AIRTRAIL,
	P_SEATRAIL,
	P_HORIZONTAL,
	P_FADETEXT,
	P_SHOCKWAVE,
	P_TELEPORT,
	P_SHOTHIT,
	P_CASH,
	P_FIRE,
	P_NUKEBOOM,
	P_REPAIR,
	P_QUADSPIRAL,
	P_LOGO,
	P_SHIELDWAVE,
	P_SHIELDSPARK,
	P_SHIELDGLOW
};

typedef struct _particle
{
	short life;
	short type;
	short exists;
	//short delay;
	int color;
	float x, y, xv, yv, xa, ya;
	string text;
	void create(int x, int y, particletype type, int c, string text = "");
	void draw();
	void move();

	_particle() :
		life (0),
		type (-1),
		exists (0),
		color (0),
		x (-1),
		y (-1),
		xv (0),
		yv (0),
		xa (0),
		ya (0),
		text ("")
	{}
} _particle;

void create_particle(int x, int y, particletype type);
void create_particle(int x, int y, particletype type, int color, string text = "");
void do_particles();
void clear_nonunit_particles();
void clear_particles();

#endif
