Diffstat (limited to 'noncore/games/sfcave-sdl/game.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/game.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/noncore/games/sfcave-sdl/game.h b/noncore/games/sfcave-sdl/game.h index 56fa6a1..087f848 100644 --- a/noncore/games/sfcave-sdl/game.h +++ b/noncore/games/sfcave-sdl/game.h | |||
@@ -22,35 +22,36 @@ public: | |||
22 | 22 | ||
23 | virtual void stateChanged( int from, int to ); | 23 | virtual void stateChanged( int from, int to ); |
24 | 24 | ||
25 | void setReplay( bool val ) { replay = val; } | 25 | void setReplay( bool val ) { replay = val; } |
26 | 26 | ||
27 | void handleKeys( SDL_KeyboardEvent &key ); | 27 | void handleKeys( SDL_KeyboardEvent &key ); |
28 | QString getGameName() { return gameName; } | 28 | string getGameName() { return gameName; } |
29 | int getDifficulty() { return difficulty; } | 29 | int getDifficulty() { return difficulty; } |
30 | QString getGameDifficultyText(); | 30 | string getGameDifficultyText(); |
31 | void setDifficulty( int diff ) { difficulty = diff; } | 31 | void setDifficulty( int diff ); |
32 | void setDifficulty( string diff ); | 32 | void setDifficulty( string diff ); |
33 | 33 | ||
34 | long getScore() { return score; } | 34 | long getScore() { return score; } |
35 | long getHighScore() { return highScore; } | 35 | long getHighScore() { return highScore; } |
36 | void increaseScore( long val ) { score += val; } | 36 | void increaseScore( long val ) { score += val; } |
37 | void clearScore() { score = 0; } | 37 | void clearScore() { score = 0; } |
38 | bool gotHighScore() { return (score >= highScore); } | 38 | bool gotHighScore() { return (score >= highScore); } |
39 | bool isReplayAvailable() { return replayList.size() > 0; } | 39 | bool isReplayAvailable() { return replayList.size() > 0; } |
40 | 40 | ||
41 | Terrain *getTerrain() { return terrain; } | 41 | Terrain *getTerrain() { return terrain; } |
42 | Player *getPlayer() { return player; } | ||
42 | 43 | ||
43 | void setSeed( int seed ); | 44 | void setSeed( int seed ); |
44 | void loadReplay( QString file ); | 45 | void loadReplay( string file ); |
45 | void saveReplay( QString file ); | 46 | void saveReplay( string file ); |
46 | 47 | ||
47 | static Game *createGame( SFCave *p, int w, int h, string game, string difficulty ); | 48 | static Game *createGame( SFCave *p, int w, int h, string game, string difficulty ); |
48 | 49 | ||
49 | protected: | 50 | protected: |
50 | QString gameName; | 51 | string gameName; |
51 | 52 | ||
52 | int thrustChannel; | 53 | int thrustChannel; |
53 | 54 | ||
54 | int difficulty; | 55 | int difficulty; |
55 | 56 | ||
56 | SFCave *parent; | 57 | SFCave *parent; |
@@ -66,17 +67,15 @@ protected: | |||
66 | long score; | 67 | long score; |
67 | long highScore; | 68 | long highScore; |
68 | 69 | ||
69 | // Stuff for the replays | 70 | // Stuff for the replays |
70 | int currentSeed; | 71 | int currentSeed; |
71 | 72 | ||
72 | // QListIterator<int> *replayIt; | ||
73 | list<int> replayList; | 73 | list<int> replayList; |
74 | list<int>::iterator replayIt; | 74 | list<int>::iterator replayIt; |
75 | //QList<int> replayList; | ||
76 | bool replay; | 75 | bool replay; |
77 | QString replayFile; | 76 | string replayFile; |
78 | 77 | ||
79 | private: | 78 | private: |
80 | }; | 79 | }; |
81 | 80 | ||
82 | #endif | 81 | #endif |