diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-07 17:15:12 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-07 17:15:12 +0100 |
commit | 057b17859cb9fadf5ce633d31eade2dd75ddbb29 (patch) | |
tree | e756dea8ad0abd213f49140d632032c8074bf297 /src/game.h | |
parent | 3b6c67de81b54d2a6503bd0e9c377b260e4356ac (diff) | |
download | mana-057b17859cb9fadf5ce633d31eade2dd75ddbb29.tar.gz mana-057b17859cb9fadf5ce633d31eade2dd75ddbb29.tar.bz2 mana-057b17859cb9fadf5ce633d31eade2dd75ddbb29.tar.xz mana-057b17859cb9fadf5ce633d31eade2dd75ddbb29.zip |
Use SDL_gfx to limit the framerate
Makes sense if we depend on SDL_gfx anyway, and it seems to do a better
job at it than the code we had.
Diffstat (limited to 'src/game.h')
-rw-r--r-- | src/game.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -23,7 +23,9 @@ #define GAME_H #include "configlistener.h" -#include "SDL.h" + +#include <SDL.h> +#include <SDL_framerate.h> extern std::string map_path; extern volatile int fps; @@ -74,17 +76,14 @@ class Game : public ConfigListener const std::string &getCurrentMapName() { return mMapName; } private: - /** Used to determine whether to draw the next frame. */ - int mDrawTime; - - /** The minimum frame time in ms (used for frame limiting). */ - int mMinFrameTime; - int mLastTarget; SDL_TimerID mLogicCounterId; SDL_TimerID mSecondsCounterId; + bool mLimitFps; + FPSmanager mFpsManager; + WindowMenu *mWindowMenu; Map *mCurrentMap; |