Project Architecture for "Angel Wars"
-------------------------------------

Notes
- This is a live document.  Information in brackets ([]) is preliminary.  All information
	is subject to change.
- Classes marked with - are not yet implemented.  Classes marked with ! are skeletal and
	need lots of work.
- This is really disorganized.  Anyone want to help?

Classes
	+ImageCache
	*Anim
	*Display
	+Actor
	|+ActorDestructible
	||+Bullet
	|||+BulletFirebolt
	||+Enemy
	|||+EnemyMorte
	|||+EnemyBat
	|||+EnemySlave
	||+ActorPlayer
	+Behavior
	|+BehaviorPeriodic
	|+BehaviorWait-
	|+BehaviorLinear
	||+BehaviorSineWave
	||+BehaviorQuadratic
	||+BehaviorFromKeyboard!
	||+BehaviorFollow
	+Event!
	+BoundingBox
	+ActorList
	+Background


ImageCache and Display are platform-dependant.  All other classes are NOT platform-dependant.
(Actor knows Display's public interface through a pointer, but Display's public interface is
platform-independent.  The ONLY class with a platform-dependent public interface is ImageCache.
[Actor and Behavior are abstract base classes.]
Correction: the Event class is also internally platform dependent.  However, its public
interface is platform-independent.



ImageCache
	The ImageCache contains a linked list of bitmap objects, each with a tag to identify itself
	[such as "demonwing00"].  It provides member functions for looking up a bitmap by its tag,
	and for adding and removing bitmaps from the cache, also by tag.  The bitmaps themselves are
	stored in a platform-dependent format.
	[Each image in the cache may eventually contain bounding-box information as well, for purposes
	of collision detection.]

Animation
	The Animation class contains the PARAMETERS for an animation with NO ACTUAL reference to
	the bitmap data; it only lists the tag for each frame, plus any necessary information about
	animation speed and state.  Animation does NOT know ImageCache; it simply stores its tags
	as strings.

Display
	The Display class represents the physical screen; it contains methods for rendering bitmaps
	to the backbuffer, and a function for moving the backbuffer onto the screen.  (The method
	is not defined; it can be double buffering, page flipping, or anything else as long as the
	interface is the same.)  The Display object must be bound to an ImageCache object, which
	will contain the images to be used with that display object.  (Animation objects tell the
	Display which image from the cache to render, and where to render it.)  A Display object's
	public methods may NOT take or return platform-specific information.  (So, for example,
	instead of taking an Allegro BITMAP, a function to show an image would take a string "tag"
	that would be looked up in the display's associated ImageCache.

Behavior
	Behavior objects define a movement path [and possibly other factors] for an Actor.  The
	Behavior class is actually an abstract base class for classes representing individual types
	of behavior/momement, such as static (BehaviorStatic), linear (BehaviorLinear), quadratic,
	and the like.  The program feeds the X and Y coordinates of an Actor to a Behavior, and the
	behavior spits back new coordinates.  (Behavior "knows" no other classes; it can actually be
	contained anywhere--it just needs X and Y coordinates to be provided upon initialization.)
	A Behavior's coordinates can be forced to a new position by the program (should be done only
	if it's off-screen; otherwise weird) and it can be reset.
	Behavior's update() returns a string tag that can be read by its owner.

BehaviorLinear
	A behavior that represents movement along a straight line.  Has dx and dy properties that
	determine the line.  Derived from Behavior.

BehaviorQuadratic
	A behavior that represents movement along a quadratic curve.  Derived from BehaviorLinear.	

BehaviorSineWave
	A clever hack to allow an actor to move along a sine curve without using any trig...well, okay,
	I'm not sure if it's a REAL sine curve, but does it matter?
	
BehaviorFromKeyboard
	A behavior that represents keyboard input.  It must be bound to an Event, and the main program
	must call the event's poll() member BEFORE updating this behavior.  [This should eventually
	be able to change the keys assigned to it.]

BehaviorFollow
	A behavior that contains a pointer to an Actor and tries to follow that actor.

BehaviorWait
	A behavior that contains a pointer to another Behavior; after a specified amount of ticks,
	it switches itself to the new behavior.  [Not sure how to do this.]
	
BeheaviorPeriodic
	A behavior that periodically returns a "fire" signal.

Actor
	Actors are the main objects in Angel Wars; bullets, particles, enemies, and the player are
	all derived from base class Actor.  Actor itself contains information about coordinates, a
	behavior, and a pointer to an animation.
	Actor also contains a static pointer to a Display.  Since there can only be one display at a
	time, all actors use the same display.  A static function allows Actor to be bound to a
	display.
	Actor contains a z-value to control its rendering order.  (i.e., the order in which it is
	inserted into the actor list.
	Actor contains a function to check for collisions with other actors.
	Actor contains information for collisions with other actors.
	Each Actor contains a string 'type' element that identifies which derived class that particular
	Actor belongs to.  They use this internally to make sure their virtual destructors don't
	conflict.
	The Actor's update() method returns a value of type Actor::ActorSignal.  This is a struct that
	contains two pointers.  The first points to a string describing the signal the actor is returning,
	the other contains a pointer to the actor itself.

ActorDestructible
	An actor that has hit points and can be destroyed.  An ActorDestructible's set_anim() method
	should NEVER be used externally; instead, use its set_idle_anim() and set_death_anim() to
	change its animation.

ActorPlayer
	An actor that represents a human player.  Derived from ActorDestructible.	

Event
	The Event class represents the input and event catching system.  As with Display, only one
	Event may be instantiated at a time.  The class contains a series of flags (and the related
	get functions) that determine the states of various aspects of the event.  The program should
	call Event.poll() to set these flags and then may check them as desired.
	This class needs a LOT of work.
	
BoundingBox
	A BoundingBox object represents a square on the screen, used mainly for purposes of collision
	detection.  The BoundingBox class will contain methods for checking collisions, checking if one
	bounding box is entirely inside another, and the like.
	
ActorList
	The ActorList represents a list of all the objects in the game.  It contains objects for
	updating and painting its Actors.  The update function not only calls each Actor's update()
	function, but checks for collisions and damages the Actors involved if necessary.
	
Bullet
	An ActorDestructible that contains a pointer to the Player that created it, and passes points to
	that player when it destroys something.  An enemy killed by a bullet sends the bullet a signal,
	which the bullet passes on to the player, without modifiying its source.  The player receives this
	signal from the bullet and politely asks its source for how many points it is worth, and gives
	itself that many points.

Enemy
	An ActorDestructible with a point value.
	
EnemyMorte
	A cute skull that flies toward you at high speeds.
	
EnemyBat
	A bat that hangs from the ceiling and shoots tracking blobs at you.

EnemySlave
	A harmless miner slave in Hell.
	
Background
	A class representing a layer of background.