summaryrefslogtreecommitdiff
path: root/src/game.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-07 19:07:15 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-07 21:56:29 +0300
commit21277ad5c877d90680b757b058a3759e8f8b5559 (patch)
tree71089c982d94f592b27ed690a5d52e013803ae17 /src/game.h
parentae1ba709d91bd59d05da7b3e434658ec652f2355 (diff)
downloadmv-21277ad5c877d90680b757b058a3759e8f8b5559.tar.gz
mv-21277ad5c877d90680b757b058a3759e8f8b5559.tar.bz2
mv-21277ad5c877d90680b757b058a3759e8f8b5559.tar.xz
mv-21277ad5c877d90680b757b058a3759e8f8b5559.zip
Add auto adjust perfomance ability.
Diffstat (limited to 'src/game.h')
-rw-r--r--src/game.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game.h b/src/game.h
index 03c22587d..88dc9166b 100644
--- a/src/game.h
+++ b/src/game.h
@@ -65,6 +65,9 @@ class Game
static Game *instance()
{ return mInstance; }
+ static void clearInstance()
+ { mInstance = 0; }
+
/**
* This method takes the game a small step further. It is called 100
* times per second.
@@ -86,6 +89,13 @@ class Game
void setValidSpeed();
+ void adjustPerfomance();
+
+ void resetAdjustLevel();
+
+ void setAdjustLevel(int n)
+ { mAdjustLevel = n; }
+
private:
void updateHistory(SDL_Event &event);
@@ -104,6 +114,9 @@ class Game
bool mValidSpeed;
int mLastAction;
LastKey mLastKeys[MAX_LASTKEYS];
+ unsigned mNextAdjustTime;
+ int mAdjustLevel;
+ bool mAdjustPerfomance;
static Game *mInstance;
};