#include "gameengine.h"
#include "introstate.h"
#include <iostream>
#include <string>
#include <sstream>

int main ( int argc, char *argv[] )
{
	CGameEngine game;
    system("PAUSE");
	// initialize the engine
	game.Init( "Engine Test v1.0" );

	// load the intro
	game.ChangeState( CIntroState::Instance() );

	// main loop
	while ( game.Running() )
	{
	    game.time = SDL_GetTicks();
	    game.deltaT = game.time - game.lasttime;
	    game.lasttime = game.time;
		game.HandleEvents();
		game.Update();
		game.Draw();
		SDL_Delay(1);
	}

	// cleanup the engine
	game.Cleanup();

	return 0;
}

