/******************************************************************************
	ensplash.h
******************************************************************************/

#ifndef ENSPLASH_H
#define ENSPLASH_H

/******************************************************************************
	define constants
******************************************************************************/

/******************************************************************************
	structures
******************************************************************************/
typedef struct {
	float	px, py, pz;
	float	vx, vy, vz;
	float	wx, wy, wz;
	float	ux, uy, uz;
	float	sz, pw;
	int	fg, ct;
} Spsid;

typedef struct {
	float	px, py, pz;
	float	vx, vy, vz;
	float	sz, pw;
	int	fg, ct;
} Spdrp;

typedef Spdrp	Spray;

typedef struct {
	float	lx, ly, lz;
	float	rx, ry, rz;
	float	vx, vy, vz;
	int	fg, ct;
	int	dummy;
} Spout;

typedef struct {
	Spsid	sid[SPSID_MAX];
	Spdrp	drp[SPDRP_MAX];
	Spdrp	ray[SPRAY_MAX];
	Spout	out[SPOUT_MAX];
	
	int	cspsid, cspdrp, cspray;
	int	fonsea, flonsea, fdropsea;
	int	ioutp;
	int	chover_gnd;	/* how long hover is on the ground or in ihe air */
	int	fsperase, fspray, ispray;
	int	finview;
	int	cdrpappear;
	int	fdust;
	int	fcolor;
	int	se_l, se_r;	/* SE parameter */
	
	float	splash_eng, hover_lvl, spout_eng, hover_lvy;
} Splash;

/******************************************************************************
	external variables
******************************************************************************/
extern int	nofsplash;
extern Splash	splash[MACHINE_MAX];

/******************************************************************************
	external functions
******************************************************************************/
extern void InitSplash(void);
extern void DoSplash(void);
extern void DrawSplash(Gfx **ppgfx);
extern void DrawOneSpray(Gfx **ppgfx, float x, float y, float z, float scale, int ianim);
extern void SetSpotSpray(float px, float py, float pz, float size);
extern void SetManSpray(float px, float py, float pz);
extern void SetYukiSpray(float px, float py, float pz);

#endif
