#include <GL/glu.h>
#include <SDL/SDL.h>
-#include <vector>
-using std::vector;
-
#include "debug.h"
+#include "handleSignal.h"
#include "game.h"
#include "ticks.h"
-#include "graphics.h"
+
+#include "graphics/graphics.h"
#include "input/inputManager.h"
+
/// ***** Private Method Headers *****
void init();
+void sighandler( int sig );
+
void run();
void cleanUp();
/// ***** Private Methods *****
void init()
{
+ installSignal();
+
graphicsInit();
gameInit();
- // TODO
- // add a game state
-
#ifdef DEBUGGING
cout << "Initialization Complete" << endl;
#endif
+}
- // create starting entities
-
+void cleanUp()
+{
#ifdef DEBUGGING
- cout << "World Created" << endl;
+ cout << "Cleaning up" << endl;
#endif
+
+ gameClean();
+
+ graphicsCleanUp();
}
void run()
}
}
-void cleanUp()
-{
- gameClean();
-}
-
void blockUpdate()
{
long int start = tickCountMicro();
draw_Count = 0;
last_Second = tickCountMicro();
+
+ //cout << "ups:\t" << ups << endl;
+ //cout << "fps:\t" << fps << endl;
}
}
gameInput();
- if(isPressed(SDLK_ESCAPE))
+ if(wasReleased(SDLK_ESCAPE))
is_Running = false;
}