1 // main.h 2 // 3 // (c) Robert Schuster, 2007 4 // 5 // Licensed under GNU GPL version 2 or, at your option, any later version. 6 7 #ifndef MAIN_H 8 #define MAIN_H 9 10 #include "input.h" 11 12 class Game; 13 class VideoOptions; 14 class GameOptions; 15 class SDLDriver; 16 class MenuManager; 17 18 class Main : public InputHandler 19 { 20 21 public: 22 Main(); 23 ~Main(); 24 25 void startSinglePlayerGame(int, int); 26 27 void startSinglePlayerGame(GameOptions &); 28 29 void showMenu(); 30 31 void applyVideoOptions(VideoOptions &); 32 33 void startSensing(); 34 35 void finishSensing(GameAction, bool); 36 37 void resetGameAction(GameAction); 38 39 void quit(); 40 41 void handle(GameAction, int); 42 43 void run(); 44 getSDLDriver()45 SDLDriver &getSDLDriver() const { return *driver; } 46 47 private: 48 void renderFPS(); 49 50 int lastTicks, fpsCounter, fps; 51 52 Game *game; 53 54 MenuManager *menuManager; 55 56 SDLDriver *driver; 57 58 bool running; 59 60 }; 61 62 #endif 63