author | andyq <andyq> | 2003-01-21 20:37:00 (UTC) |
---|---|---|
committer | andyq <andyq> | 2003-01-21 20:37:00 (UTC) |
commit | 0a6563fcc2f49857c581d9def24407a3a4ef526c (patch) (side-by-side diff) | |
tree | f1b82a4bd7582ef2cb722cffb87eecff1e1f96e6 /noncore/games/sfcave-sdl/sfcave.h | |
parent | 50b5915b48fc5cbacf23e4d2b75d7a266f141a4a (diff) | |
download | opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.zip opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.tar.gz opie-0a6563fcc2f49857c581d9def24407a3a4ef526c.tar.bz2 |
Clean up of code - fixed memory leaks (most of them) and added new custom config menu
Diffstat (limited to 'noncore/games/sfcave-sdl/sfcave.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/sfcave.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/noncore/games/sfcave-sdl/sfcave.h b/noncore/games/sfcave-sdl/sfcave.h index 96c2334..c707919 100644 --- a/noncore/games/sfcave-sdl/sfcave.h +++ b/noncore/games/sfcave-sdl/sfcave.h @@ -1,50 +1,72 @@ #ifndef __SFCAVE_H #define __SFCAVE_H #include "SDL.h" #include "terrain.h" class Game; class Menu; class Help; class SFCave { public: SFCave( int argc, char *argv[] ); ~SFCave(); - void drawGameScreen(); void initSDL( int argc, char *argv[] ); void mainEventLoop(); void setCrashed( bool val ); void changeState( int s ); int getState() { return state; } Game *getCurrentGame() { return currentGame; } int getFPS() { return actualFPS; } bool showFPS() { return showFps; } void setMenuStatusText( string statusText ); void saveSetting( string key, string val ); void saveSetting( string key, int val ); + void saveSetting( string key, long val ); + void saveSetting( string key, double val ); string loadSetting( string key, string defaultVal = "" ); + bool loadBoolSetting( string key, bool defaultVal); + int loadIntSetting( string key, int defaultVal ); + double loadDoubleSetting( string key, double defaultVal ); + private: SDL_Surface *screen; + bool setupOK; Game *currentGame; Menu *menu; Help *help; int state; - int maxFPS; - int actualFPS; bool showFps; string musicPath; string musicType; + bool finish; + + bool limitFPS; + int maxFPS; + int actualFPS; + int FPS; + long time1; + long start; + long end; + + // This is used when the user is setting the custom + // values in the menu + int customPlayerMenuVal; + double origValue; void handleMenuSelect( int menuId ); + void handleGameState(); + void handleEvents(); + void calcFPS(); + void FPSDelay(); }; #endif |