#include #include #include #include #include "resource.hpp" #include "global.hpp" #include "game.hpp" #include "states.hpp" using namespace std; int main ( int argc, char ** argv ) { srand ( time ( NULL ) ); game Game; if ( !Game.Init() ) { return 0; } Game.ChangeState ( MenuState::Instance() ); while ( Game.Running() ) { Game.SetStart ( SDL_GetTicks() ); Game.HandleEvents(); Game.Update(); Game.Draw(); Game.ReduceFPS(); } Game.Clean(); return 0; }