game structure --------------------------------------------------------------@/
The game structure contains the following main attributes:
	*	Two players
	*	One ball
	*	stateID : int
	*	stateIDNew : int
	*	wait_timer : int
	*	flash_timer : int
	*	score_wintimer : int
	*	Round timer
		-	minutes : int
		-	seconds : int
		-	frames : int
	*	Graphics handles (via Peach)

The game can be in 3 different states:
	*	Waiting for Round
		-	A round is about to start, so there's a delay before the ball
			starts moving.
	*	Playing
		-	The ball is moving, and the players can move to.
		-	If the ball hits a goal, then the state is then set to Win.
	*	Win
		-	Both players are frozen, and the winning player's score counter
			flickers, to make it more apparent who won. The shaking is
			controlled by the score_wintimer variable.
		-	This lasts for about a second or so, before the state is then set
			to Waiting for Round.

The state upon booting the game is Waiting for Round.

The Round timer is a cosmetic feature, that shows how long the current round's
been going on for, in a mm:ss:ms format.

wait_timer is a frame timer that changes use depending on game state. More on
that later.

positioning -----------------------------------------------------------------@/
All movement units (paddles, balls, etc.) are handled via fixed-point integers.
That is, 256 is treated as 1.0, 128 is treated as 0.5, and so on.

game state ------------------------------------------------------------------@/
game state is handled by two variables:
	*	stateID
	*	stateIDNew

stateID is used to hold the current state. stateIDNew is used to hold the state
that the current state should be changed to, or -1 (GAMESTATE_INVALID) if none.

So, every frame:
	if <stateIDNew != GAMESTATE_INVALID>:
		stateID = stateIDNew;
		stateIDNew = GAMESTATE_INVALID;
		if<stateID == GAMESTATE_BALLWAIT> wait_timer = WAITTIMER_BALLWAIT;
		if<stateID == GAMESTATE_WIN> wait_timer = WAITTIMER_WIN;
	endif
	<state-specific code is then ran>

The state-specific code is then as follows:

if state is GAMESTATE_BALLWAIT:
	-	wait_timer is set to WAITTIMER_BALLWAIT when this state is first set.
	*	the round timer is paused.
	*	This state resets player paddle positions to the centerfor as long as
		it's active. The ball is also stuck in the center of the screen.
	*	wait_timer is decremented after each frame.
	*	if wait_timer hits zero, the ball is able to move again, the game's
		round timer is reset to zero, and the game's state is then changed to
		GAMESTATE_PLAYING.

if state is GAMESTATE_PLAYING:
	*	This state simply allows the game to proceed as normal.
	*	the round timer is resumed.
	*	If the ball hits one of the higher or lower edges of the playfield,
		the game state is set to GAMESTATE_WIN.

if state is GAMESTATE_WIN:
	-	wait_timer is set to WAITTIMER_WIN when this state is first set.
		flash_timer is also reset to 0.
	*	the round timer is paused.
	*	The ball is made invisible, while being placed in the center of the
		playfield. This is so it doesn't collide with anything.
	*	Both players are frozen in place.
	*	flash_timer is incremented every frame.
	*	wait_timer is decremented each frame. When zero, the state is
		changed to GAMESTATE_BALLWAIT.

ball updating ---------------------------------------------------------------@/
The ball has only a few attributes:
	*	X and Y position
	*	X and Y movement
	*	Owner (which player gets the score, if it hits the goal)
	*	Goal flag

The actual per-frame logic is as follows:
	*	Each frame, the ball gets it's movement added to it's position.
	*	If the ball hits the sides of the field, it's X movement goes in the
		opposite direction.
	*	Hitting the ball with a paddle sets the ball's owner to whoever hit it.
	*	If the ball goes into a goal, it's goal flag is set.
	*	If the goal flag is set, then the owner of the ball gets a point, and
		the game state is set to GAMESTATE_WIN.

player movement -------------------------------------------------------------@/
Each player has obvious attributes:
	*	X and Y position
	*	ID (0 if p1, 1 if p2)
	*	Shake timer

The paddle size is stored in a global, so there's no use to store it in
players themselves.

Player 1 moves left/right if A/D is held.
Player 2 moves left/right if J/L is held.

The shake timer is used to determine how long the player's paddle should shake,
after hitting a ball. When the ball is hit, it's reset to a frame counter,
then it decrements until it hits 0, at which the paddle stops shaking.

overview --------------------------------------------------------------------@/
Every frame:
	*	Update:
		*	update players
		*	update ball
			-	if the ball goes into a goal, the ball's goal flag is set.
			-	If the ball hits a paddle, the ball *slightly* increases in
				vertical speed. This is done by just multiplying the speed by
				1.02.
		*	check if the ball's goal flag is set. If true, then set the game's
			state to GAMESTATE_WIN.
		*	increment round timer, if the round timer isn't stopped.
	*	Draw:
		*	draw field background
		*	draw ball
		*	draw players
		*	draw UI elements
			-	score display
			-	round timer
			-	screen flash

