]> git.localhorst.tv Git - l2e.git/blobdiff - src/app/State.h
fix bug in Application that caused the program to crash just before it finished
[l2e.git] / src / app / State.h
index 678f2b986d88d69d68366bb829aaebbef47c0124..c74043bf6b7bacc1e2d2f336ed99a42115f261fd 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef APP_APPLICATIONSTATE_H_
 #define APP_APPLICATIONSTATE_H_
 
+#include "Timer.h"
+
 #include <SDL.h>
 
 namespace app {
@@ -36,10 +38,18 @@ public:
        /// adapt the state's graphics to given dimensions
        virtual void Resize(int width, int height) = 0;
 
-       virtual void HandleInput(const Input &) = 0;
+       virtual void HandleEvents(const Input &) = 0;
        virtual void UpdateWorld(float deltaT) = 0;
        virtual void Render(SDL_Surface *) = 0;
 
+public:
+       Timers<Uint32> &GraphicsTimers() { return graphicsTimers; }
+       Timers<float> &PhysicsTimers() { return physicsTimers; }
+
+private:
+       Timers<Uint32> graphicsTimers;
+       Timers<float> physicsTimers;
+
 };
 
 }