Cytopia  0.3
A city building simulation game
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Game.hxx
Go to the documentation of this file.
1 #ifndef GAME_HXX_
2 #define GAME_HXX_
3 
6 #include "util/Meta.hxx"
7 #ifdef USE_AUDIO
9 #endif
10 #include "services/Randomizer.hxx"
11 #include "services/GameClock.hxx"
13 #include "LOG.hxx"
14 #include "Exception.hxx"
15 #include "../game/GamePlay.hxx"
16 
17 #include <thread>
18 
19 using Thread = std::thread;
20 using RuntimeError = std::runtime_error;
21 
22 namespace Cytopia
23 {
24 class Game
25 {
26 public:
31  Game();
32 
36  virtual ~Game() = default;
37 
41  virtual void initialize();
42 
47  virtual void run(bool SkipMenu = false);
48 
50  virtual void shutdown();
51 
52  virtual void newGame(bool generateTerrain);
53  virtual void loadGame(const std::string &fileName);
54 
55 private:
56  void quit();
57  bool m_shutDown = false;
58 
60 };
61 } // namespace Cytopia
62 #endif
Cytopia::Game::loadGame
virtual void loadGame(const std::string &fileName)
Definition: Game.cxx:204
Cytopia::Game::run
virtual void run(bool SkipMenu=false)
begins the game
Definition: Game.cxx:82
LOG.hxx
Cytopia::Game::newGame
virtual void newGame(bool generateTerrain)
Definition: Game.cxx:198
MessageQueue.hxx
ScriptEngine.hxx
Cytopia::Game::m_shutDown
bool m_shutDown
Definition: Game.hxx:57
RuntimeError
std::runtime_error RuntimeError
Definition: Game.hxx:20
Thread
std::thread Thread
Definition: Game.hxx:19
GamePlay
Definition: GamePlay.hxx:8
Meta.hxx
Cytopia::Game::m_GamePlay
GamePlay m_GamePlay
Definition: Game.hxx:59
Randomizer.hxx
Cytopia::Game::Game
Game()
Creates a game.
Definition: Game.cxx:33
Cytopia::Game::quit
void quit()
Definition: Game.cxx:39
Cytopia
Definition: Game.cxx:31
Cytopia::Game
Definition: Game.hxx:24
Cytopia::Game::~Game
virtual ~Game()=default
Destroy a game.
ResourceManager.hxx
Cytopia::Game::shutdown
virtual void shutdown()
ends the game
Definition: Game.cxx:191
Exception.hxx
AudioMixer.hxx
Cytopia::Game::initialize
virtual void initialize()
starts setting up the game
Definition: Game.cxx:55
string
std::string string
Definition: AudioConfig.hxx:14
GameClock.hxx