graphics moved to folder, Make flags updated
[physics.git] / src / main.cpp
index fd14612..629ca9b 100644 (file)
@@ -9,7 +9,8 @@ using std::vector;
 
 #include "game.h"
 #include "ticks.h"
-#include "graphics.h"
+
+#include "graphics/graphics.h"
 #include "input/inputManager.h"
 
 
@@ -83,6 +84,17 @@ void init()
 #endif
 }
 
+void cleanUp()
+{
+#ifdef DEBUGGING
+    cout << "Cleaning up" << endl;
+#endif
+
+    gameClean();
+
+    graphicsCleanUp();
+}
+
 void run()
 {
     is_Running = true;
@@ -97,11 +109,6 @@ void run()
     }
 }
 
-void cleanUp()
-{
-    gameClean();
-}
-
 void blockUpdate()
 {
     long int start = tickCountMicro();
@@ -142,6 +149,9 @@ void updateFPSCounters()
         draw_Count = 0;
 
         last_Second = tickCountMicro();
+
+        //cout << "ups:\t" << ups << endl;
+        //cout << "fps:\t" << fps << endl;
     }
 }
 
@@ -151,7 +161,7 @@ void input()
 
     gameInput();
 
-    if(isPressed(SDLK_ESCAPE))
+    if(wasReleased(SDLK_ESCAPE))
         is_Running = false;
 }