Scripting
---------

Levels in the game are controlled by plain-text script files.  These
files specify what background images the level uses and which image list
files to load images from.  After this preliminary information, the
script files contains a series of positions and actions.



Action Reference
----------------

spawn_dumb_morte - a stupid skull
	x							x position
	y							y position
	dx						x speed
	dy						y speed
	d2x						x acceleration
	d2y						y acceleration


spawn_smart_morte - a smart skull that follows you
	x							x position
	y							y position
	impulse				acceleration
	max_speed			maximum speed

spawn_sine_morte - a skull that follows a sine wave
	x							x position
	y							y position (determines amplitude)
	dx							x speed
	baseline						center of motion (horizontal line)
	impulse							acceleration

spawn_bat - a bat turret
	x							x position
	y							y position
	dx						x speed (should by synched with background)
	period				ticks between attacks

spawn_slave - a miner slave
	x							x position
	y							y position
	dx							x speed (should be synched with background)

spawn_fatboy - a fat demon
	x							x pos
	y							y pos
	dx							x speed
	period				attack frequency (ticks between attacks)
	baseline			baseline of sine curve
	impulse				acceleration

								
A sample script follows.  Note that the comments in the right column should
NOT be in the actual file; the script interpreter does not know how to skip
them (yet).
																
								

Sample Script File
------------------
2200												# position at which to end the level

/usr/share/games/angelwars/images//usr/share/games/angelwars/levels/level00a1.bmp 1						# opaque background image, speed
/usr/share/games/angelwars/images//usr/share/games/angelwars/levels/level00b1.bmp 2						# masked background image, speed

/usr/share/games/angelwars/images/demon.txt									# a list of image list files to load
/usr/share/games/angelwars/images/firebolt.txt
/usr/share/games/angelwars/images/skull.txt
/usr/share/games/angelwars/images/bat.txt
<done>											# tell the game the list is over

/usr/share/games/angelwars/sounds/shots.txt				# list of sounds
<done>

100 spawn_smart_morte 320 50 .1 2
200 spawn_smart_morte 320 180 .1 2
250 spawn_smart_morte 320 50 .1 2
500 spawn_smart_morte 320 50 .1 2
510 spawn_smart_morte 320 60 .1 2
520 spawn_smart_morte 320 70 .1 2
530 spawn_smart_morte 320 80 .1 2
540 spawn_smart_morte 320 90 .1 2
600 spawn_dumb_morte 320 150 -1 0 -.2 0
600 spawn_dumb_morte 320 60 -1 0 -.2 0
600 spawn_dumb_morte 320 100 -1 0 -.2 0
600 spawn_dumb_morte 320 170 -1 0 -.2 0
