2013-11-16 09:31:46 +00:00
|
|
|
#ifndef GAME_MWSTATE_STATEMANAGER_H
|
|
|
|
#define GAME_MWSTATE_STATEMANAGER_H
|
|
|
|
|
|
|
|
namespace MWBase
|
|
|
|
{
|
|
|
|
/// \brief Interface for game state manager (implemented in MWState)
|
|
|
|
class StateManager
|
|
|
|
{
|
2013-11-18 14:15:47 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
enum State
|
|
|
|
{
|
|
|
|
State_NoGame,
|
|
|
|
State_Ended,
|
|
|
|
State_Running
|
|
|
|
};
|
|
|
|
|
2013-11-16 09:31:46 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
StateManager (const StateManager&);
|
|
|
|
///< not implemented
|
|
|
|
|
|
|
|
StateManager& operator= (const StateManager&);
|
|
|
|
///< not implemented
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
StateManager() {}
|
|
|
|
|
|
|
|
virtual ~StateManager() {}
|
2013-11-16 10:07:23 +00:00
|
|
|
|
|
|
|
virtual void requestQuit() = 0;
|
|
|
|
|
|
|
|
virtual bool hasQuitRequest() const = 0;
|
2013-11-16 11:22:28 +00:00
|
|
|
|
2013-11-18 14:15:47 +00:00
|
|
|
virtual State getState() const = 0;
|
2013-11-16 11:22:28 +00:00
|
|
|
|
|
|
|
virtual void newGame (bool bypass = false) = 0;
|
|
|
|
///< Start a new game.
|
|
|
|
///
|
|
|
|
/// \param bypass Skip new game mechanics.
|
2013-11-18 14:38:08 +00:00
|
|
|
|
|
|
|
virtual void endGame() = 0;
|
2013-11-16 09:31:46 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|