1 /* 2 Copyright © 2011-2012 kitano 3 Copyright © 2014-2015 Justin Jacobs 4 5 This file is part of FLARE. 6 7 FLARE is free software: you can redistribute it and/or modify it under the terms 8 of the GNU General Public License as published by the Free Software Foundation, 9 either version 3 of the License, or (at your option) any later version. 10 11 FLARE is distributed in the hope that it will be useful, but WITHOUT ANY 12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 PARTICULAR PURPOSE. See the GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License along with 16 FLARE. If not, see http://www.gnu.org/licenses/ 17 */ 18 19 20 #ifndef GAMESTATE_H 21 #define GAMESTATE_H 22 23 #include "CommonIncludes.h" 24 #include "WidgetTooltip.h" 25 26 class GameState { 27 public: 28 GameState(); 29 GameState(const GameState& other); 30 GameState& operator=(const GameState& other); 31 virtual ~GameState(); 32 33 virtual void logic(); 34 virtual void render(); 35 virtual void refreshWidgets(); 36 37 GameState* getRequestedGameState(); 38 void setRequestedGameState(GameState *new_state); isExitRequested()39 bool isExitRequested() { 40 return exitRequested; 41 } 42 void setLoadingFrame(); 43 virtual bool isPaused(); 44 void showLoading(); 45 46 bool hasMusic; 47 bool has_background; 48 bool reload_music; 49 bool reload_backgrounds; 50 bool force_refresh_background; 51 bool save_settings_on_exit; 52 53 int load_counter; 54 55 protected: 56 GameState* requestedGameState; 57 bool exitRequested; 58 WidgetTooltip *loading_tip; 59 TooltipData loading_tip_buf; 60 }; 61 62 #endif 63