summaryrefslogtreecommitdiff
path: root/src/game.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-29 23:59:08 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-29 23:59:08 +0000
commite8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3 (patch)
treee8dc775e12f6b4eb0a6d56448f05286c774bbb8a /src/game.h
parent0e8c09433f3a193b5a94a1ad572d8237113cdfbf (diff)
downloadmana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.gz
mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.bz2
mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.xz
mana-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.zip
Merged trunk changes from revision 2618 to 2716 into the 0.1.0 branch.
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/game.h b/src/game.h
index 7330052a..19a6054a 100644
--- a/src/game.h
+++ b/src/game.h
@@ -27,6 +27,8 @@
#include <iosfwd>
#include <memory>
+#include "configlistener.h"
+
#define SPEECH_TIME 80
#define SPEECH_MAX_TIME 100
@@ -36,7 +38,7 @@ extern std::string map_path;
extern volatile int fps;
extern volatile int tick_time;
-class Game
+class Game : public ConfigListener
{
public:
Game();
@@ -46,7 +48,15 @@ class Game
void handleInput();
- protected:
+ void optionChanged(const std::string &name);
+
+ private:
+ /** Used to determine whether to draw the next frame. */
+ int mDrawTime;
+
+ /** The minimum frame time (used for frame limiting). */
+ int mMinFrameTime;
+
typedef std::auto_ptr<MessageHandler> MessageHandlerPtr;
MessageHandlerPtr mBeingHandler;
MessageHandlerPtr mBuySellHandler;
@@ -61,8 +71,7 @@ class Game
};
/**
- * Returns elapsed time. (Warning: very unsafe function, it supposes the delay
- * is always < 10 seconds)
+ * Returns elapsed time. (Warning: supposes the delay is always < 100 seconds)
*/
int get_elapsed_time(int start_time);