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

	form*Z by auto*des*sys, Inc.
	Copyright (c) 1989-2004 auto*des*sys, Inc.  All rights reserved.

	File:			rain.h
	Author:			auto*des*sys, Inc.
	Created on:		02/27/04
	Description:	Rain & Snow plugin header.

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

#ifndef __RAIN_H
#define __RAIN_H 1


/************************************************************************
	formZ api headers
*************************************************************************/

/* Required for all plugins */

#include "fzrt_api.h"

/* Required for plugin's created by auto*des*sys, Inc. */

#include "formz_vendor.h"

/* Required for this specific plugin */

#include "fz_rzne_shdr_api.h" /* required for shdr fset */
#include "fz_math_api.h" /* required for math fset */


/************************************************************************
	Globals
*************************************************************************/

/* rain shader plugin identification */
#define RAIN_PLUGIN_UUID				"\x61\x83\x27\xc4\x58\xf2\x4b\x1d\xaf\x54\xf1\xbe\xcb\x17\x42\x78"
#define RAIN_PLUGIN_FSET_UUID			"\x69\xc6\xa4\xf2\x6a\x38\x41\x16\xbe\x9b\x83\x2a\x2a\xc1\x5c\x0e"
#define RAIN_PLUGIN_VERSION				FZPL_VERS_MAKE(6,1,0,0)
/* Usually, start the data io version at 0 and increment by 1 each time the data changes */
#define RAIN_PLUGIN_DATA_IO_VERSION		FZPL_VERS_MAKE(5,5,0,0) /* ONLY UPDATE WHEN SHADER DATA CHANGES */
#define RAIN_PLUGIN_VENDOR				FORMZ_VENDOR
#define RAIN_PLUGIN_URL					FORMZ_VENDOR_URL


/* function set provided by formZ. */
const fzpl_fset_glue_fset* _fset_glue;

/* formZ provided function sets to hold on to */
fz_shdr_fset			_shdr_funcs;
fz_type_fset			_type_funcs;
fz_fzrt_mem_fset		_mem_funcs;
fz_fzrt_base_fset		_base_funcs;
fz_fzrt_file_fset		_file_funcs;
fz_math_fset			_math_funcs;

/* id assigned at run-time */
fzrt_unsigned_int _rain_plugin_runtime_id;

/* localization */
#define STRING_SIZE		256
char _name[STRING_SIZE];
char _short_name[STRING_SIZE];
char _visibility[STRING_SIZE];
char _direction[STRING_SIZE];
char _density[STRING_SIZE];
char _max_dist[STRING_SIZE];


/* used to scale random numbers */
double scale_factor = 1.0 / (double)RAND_MAX;
/* used to scale char values */
double scale_char = 1.0 / 127;


#endif /* __RAIN_H */

