
#define WEATHER_NULL	0
#define WEATHER_BIRDY	1
#define WEATHER_RAIN	2
#define WEATHER_THUNDER	4
#define WEATHER_SNOW	8

void weatherDo(void);


//RAIN+SNOW
#define AMOUNT_OF_RAIN 30 
#define RAIN_X -256
#define RAIN_Y -128


extern SPRITEX *pSnowFlake;
extern SPRITEX *pRipple;
extern SPRITEX *pRain;
extern SPRITEX *pFleck;



typedef struct
{
	SHORT x,y;
}RAINTYPE;


//extern SPRITE*	rainsprpointer;
extern RAINTYPE	*rain;
extern LONG		rainAngle;
extern UBYTE rainbuilt;	//to initialise rain co-ords
extern LONG 	oldRainAngle,rainHeight;
extern UBYTE		amountOfRain,rainType;
//plr 2 rain
//extern LONG		rainAngle2;
//extern LONG  	oldRainAngle2,rainHeight2;


void Rain(UBYTE);
void weatherInitialise(int w);
void weatherCleanUp(void);
void weatherStartEarthquake(int duration, int maxStr, int minStr, int cycles, int flags);
void weatherDoEarthquake(void);

#define RAIN 2
#define SNOW 1

//#define CLOUDSKY	0
//#define DARKSKY		1
//#define SUNSET		2
//#define NIGHTSKY    3

//void ChooseWeather(UBYTE side, UBYTE level);
extern ULONG skytype;		//cloud type
extern  UBYTE	weather;
extern	LONG windangle;

/**********************************************************************/

typedef struct WIND_DEFTAG *WIND_DEFHANDLE;

typedef struct WIND_DEFTAG
{
	WIND_DEFHANDLE next, prev;
	VECTOR pos, size, dir;
	int str;
	int dropOff;
	int active;
	int tag;
	int nParticles;
	int onScreen;
	//WIND_PARTICLE *pParticles;
	VERT *pParticles;
	long *pDepths;
	long *pScrXY;
}WIND_DEFSTR;

typedef struct
{
	WIND_DEFSTR head;
	int numEntries;
}WINDLIST;


void windInitialise(void);
WIND_DEFSTR *windCreate(void);
void windUpdate(void);
void windClearUpMessAfterwards(void);
void windSetValues(int tag, int activeBool);

/**********************************************************************/
typedef struct
{
	LIGHTNING_DEFSTR head;
	int numEntries;
}LIGHTNINGLIST;

void lightningInitialise(void);
LIGHTNING_DEFSTR *lightningCreate(void);
int lightningIsModelInRange(VECTOR *, int);
void lightningDrawAll(void);
void lightningClearUpMessAfterwards(void);
