diff options
Diffstat (limited to 'engines/gargoyle/events.h')
-rw-r--r-- | engines/gargoyle/events.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/gargoyle/events.h b/engines/gargoyle/events.h index f49ef35ac5..4d9e49b55d 100644 --- a/engines/gargoyle/events.h +++ b/engines/gargoyle/events.h @@ -28,6 +28,9 @@ namespace Gargoyle { +#define GAME_FRAME_RATE 100 +#define GAME_FRAME_TIME (1000 / GAME_FRAME_RATE) + class Window; /** @@ -148,8 +151,15 @@ private: EventQueue _eventsLogged; ///< Custom events generated by game code Event *_currentEvent; ///< Event pointer passed during event retrieval bool _timeouts; ///< Timer timeouts flag + uint32 _priorFrameTime; ///< Time of prior game frame + uint32 _frameCounter; ///< Frame counter private: /** + * Checks for whether it's time for the next game frame + */ + bool checkForNextFrameCounter(); + + /** * Dispatches an event */ void dispatchEvent(Event &ev, bool polled); @@ -189,7 +199,7 @@ public: /** * Constructor */ - Events() : _forceClick(false), _currentEvent(nullptr), _timeouts(false) {} + Events(); /** * Get any pending event |