summaryrefslogtreecommitdiff
path: root/src/game.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-07 17:15:12 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-07 17:15:12 +0100
commit057b17859cb9fadf5ce633d31eade2dd75ddbb29 (patch)
treee756dea8ad0abd213f49140d632032c8074bf297 /src/game.h
parent3b6c67de81b54d2a6503bd0e9c377b260e4356ac (diff)
downloadMana-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.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/game.h b/src/game.h
index 0ae6f167..31e4f369 100644
--- a/src/game.h
+++ b/src/game.h
@@ -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;