------------------------------------------------------------------------------
program
	demo.exe scriptname.txt			(defaults to script.txt)

------------------------------------------------------------------------------
script
	demo
		parameters:
			name="q3view"
			width="640"
			height="480"
			bpp="32"
			fullscreen="0"
			vhs="1"				means you can click an FF/REW the demo
		commands:
			create
			load
			run
------------------------------------------------------------------------------
	load
		parameters:
			effect="effectname"

	This is the effect to play while loading is occuring.
	This effect will be loaded first..so best if its small :)

------------------------------------------------------------------------------
	event
		paramaters:
			time="0.0"
			key="a"
			trigger="a"
		commands:
		example:

			<event key="j">
				<flash1><go></go></flash1>
				<logo scax="4" scay="4"></logo>
				<fish1 timeoffset="40"></fish1>
				<logo rotz="180"></logo>
			</event>

			<event time="2.6" trigger="j">
			</event>

			<event time="50">
				<flash2><go></go></flash2>
				<fish1 timeoffset="-80"></fish1>
				<logo rotz="0"></logo>
			</event>

------------------------------------------------------------------------------
	draworder
		paramaters:
			effect="blah1"
			effect="blah2"
			effect="blah3"
		commands:
		example:

			<draworder effect="clear1" effect="ball" effect="bobs"></draworder>

------------------------------------------------------------------------------
	ALL EFFECTS have these:

	xxx
		parameters:
			active="1"				draw+update on/off, even if effect in draworder list
			speed="1.0"				multiplier for speed

	they also all have a GL section:

		<gl restore="1">			this means that after the effect is run it will return
									the original gl values.  this should be used most of time
			<render	active="1"
					flat="0"		use smooth/flat shading
					wire="0"		wireframe
					envmap="0"		environment mapping on/off
					linewidth="1"
					color="1,1,1,1">
			</render>
			<depth	active="1"
					test="0"		test zbuffer...turn this off to draw always
					write="0">		write to zbuffer
			</depth>
			<cull	active="1"
					cull="1"		cull backfacing polgons..or not
					mode="0">		0=back, 1=front
			</cull>
			<alpha	active="1"
					blend="0"		turn blending on/off(1/0)
					blendsrc="1"	there are 10 blend modes, see below for list
					blenddst="1"
					mask="0"		use the texture alpha channel to cutout
					maskvalue="0.5">	0.0->1.0  if alpha channel pixel >= maskvalue then cutout
			</alpha>
			<proj	active="1"
					fov="45"		field of view in degrees
					near="0.1"		near clip plane
					far="400">		far clip plane
			</proj>
			<fog	active="1"
					on="1"
					mode="1"
					density="1.0"
					zstart="0.0"
					zend="50.0"
					color="0xffffffff">
			</fog>
		</gl>

		blend table
		0 GL_ZERO
		1 GL_ONE
		2 GL_SRC_COLOR
		3 GL_ONE_MINUS_SRC_COLOR
		4 GL_SRC_ALPHA
		5 GL_ONE_MINUS_SRC_ALPHA
		6 GL_DST_ALPHA
		7 GL_ONE_MINUS_DST_ALPHA
		8 GL_DST_COLOR
		9 GL_ONE_MINUS_DST_COLOR

------------------------------------------------------------------------------
	clear
		paramaters:
			color="0xff112233"
			trailval="0.0" (0.0->1.0)
		commands:
		example:

			<add type="clear" name="clear1"></add>
			<clear1 color="0xffffffff" trailval="1.0"></clear1>

------------------------------------------------------------------------------

	musicplay
		paramaters:
			filename="*.it,*.xm,*.mod,*.s3m,*.mtm,*.mo3,*.mp3,*.mp2,*.ogg,*.wav"
			volume="1.0"
			flange="0"
			echo="0"
			rotate="1"
			flangespeed="0.0005"
			sample="1"				(only for .wav files, can play multiple times like for sfx)
		commands:
			play
			stop
		example:

			<add type="musicplay" name="track flange="1" echo="0"></add>
			<track filename="data/music/potion.mp3"></track>

------------------------------------------------------------------------------
	flash
		paramaters:
			color="0xff112233"
			attack="1.0"
			sustain="1.0"
			decay="1.0"
			mode="0" (0=additive 1=subtractive 2=negative)
		commands:
			go
		example:

			<add type="flash" name="flash1"></add>
			<flash1 color="0xffffffff" mode="1" attack="0.2" decay="0.2" sustain="1.0"></flash1>

			<event time="5">
				<flash1><go></go></flash1>
			<event>

------------------------------------------------------------------------------
	picture (must be >8x8 and even width and height,24/32bpp)
		paramaters:
			filename="*.tga"
			tra="0,0,0"
			rot="0,0,0" (degrees)
			sca="0,0,0"
		commands:
		example:

------------------------------------------------------------------------------
	starspace
		parameters:
		commands:
		example:

		<add type="starspace" name="space1"></add>

------------------------------------------------------------------------------
	teddy
		parameters:
		commands:
		example:

		<add type="teddy" name="teddy1"></add>

------------------------------------------------------------------------------
	ltree
		parameters:
		commands:
		example:

		<add type="ltree" name="tree1"></add>

------------------------------------------------------------------------------
	3dscene
		paramaters:
			filename="blah.zen"
			speed="0.4"
			timeoffset="0.0"
			frame="0.0"
			loopframe="90.0"
			visible="1"
			camera="camera01"
		commands:
			go
		example:
		
			<add type="3dscene" name="ball"></add>
			<ball filename="headlook.zen"></ball>

------------------------------------------------------------------------------
	fontcool
		parameters:
			basefont="arial"	(most windows TTF's)
			extrude="0.1"		(Z amount to extrude, 0 = flat)
			italics="0"
			quality="0.1"		(0 best,slowest -> 1 worst,fastest)
			numtexts="1"		(number of lines of text)
			texture="blah.tga"
		commands:
			<text
				num="0"			(which text line this is)
				active="1"		(draw or not)
				string="hello"
				tra="0,0,0"		(translation)
				rot="0,0,0"		(rotation)
				sca="1,1,1"		(scale)
				trav="0,0,0"	(translation increment)
				rotv="0,0,0"	(rotation increment)
				scav="0,0,0"	(scale increment)
				color="0xffffffff">
		example:

			<add type="fontcool" name="font"></add>
			<font basefont="impact" extrude="0.1" italics="0" quality="0.0" pos="41,42,34" texture="rust_collage.tga" numTexts="2">
				<text num="0" active="1" tra="-0.5,-0.5,-1" trav="-0.001,0,0" scav="0.01,0.01,0" string="H3110">
				</text>
				<text num="1" active="0" tra="0,1,-2" string="1234567890">
				</text>
			</font>

------------------------------------------------------------------------------
	particlebox
		parameters:
			texture="blah.tga"
			number="500"		(number of particleS)
			speed="1"		
			dim="50,50,50"	(dimensions of wrap box)
			spawndim="10,10,10"	(dimension particles can spawn in)
			dirmin="-1,0,0"	(particle XYZ movement direction minrange)
			dirmax="1,0,1"	(particle XYZ movement direction maxrange)
			lifespan="100"	(average particle lifespan, if you don't want a life span, don't write one)
			tra="0,0,0"		(translation)
			rot="0,0,0"		(rotation)
			sca="1,1,1"		(scale)
			trainc="0,0,0"	(ammount to increase translation by each frame)
			rotinc="0,0,0"	(ammount to increase rotation by each frame)
			scainc="0,0,0"	(cmmount to increase scale by each frame)
			pdir="0,0,0"	(direction particles move in)
			prot="0,0,0"	(rotation of particles)
			color="0xff00ff00"
			src="1"			(blend)
			dst="1"			(blend)
		command:
			random			(randomise particles)
			origin			(bring all the origin)
		example:

			<add type="particlebox" name="bobs"></add>
			<bobs	texture="particleblue.tga" 
					number="500"
					dim="150,150,150"
					scainc="0.01,0,0.00"
					pdir="0.01,0.02,0.1"
					prot="0.001,0.002,0.003">
			</bobs>

------------------------------------------------------------------------------
	dogtail
		parameters:
			num="4"
			filename="texture.tga"

		example:
			<add type="dogtail" name="dog"></add>
			<dog filename="rust_collage.tga"></dog>

------------------------------------------------------------------------------
	videoplay
		parameters:
			filename="vid.avi"

		example:
			<add type="videoplay" name="vid1"></add>
			<vid1 filename="video1.avi"></vid1>

------------------------------------------------------------------------------
	skybox
		parameters:
			camera="1"
			file_front="1.tga"
			file_back="2.tga"
			file_top="3.tga"
			file_bot="4.tga"
			file_left="5.tga"
			file_right="6.tga"
		example:

------------------------------------------------------------------------------
