xoreos  0.0.5
game.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef ENGINES_WITCHER_GAME_H
26 #define ENGINES_WITCHER_GAME_H
27 
28 #include <vector>
29 
30 #include "src/common/ustring.h"
31 #include "src/common/scopedptr.h"
32 
33 #include "src/sound/types.h"
34 
35 namespace Engines {
36 
37 class Console;
38 
39 namespace Witcher {
40 
41 class WitcherEngine;
42 
43 class Functions;
44 class LuaBindings;
45 
46 class Campaign;
47 class Module;
48 
49 class Game {
50 public:
51  Game(WitcherEngine &engine, ::Engines::Console &console);
52  ~Game();
53 
57  Module &getModule();
58 
60  void playMusic(const Common::UString &music = "");
62  void stopMusic();
63 
65  void refreshLocalized();
66 
67  void run();
68 
70  static void getCampaigns(std::vector<Common::UString> &campaigns);
72  static void getModules (std::vector<Common::UString> &modules);
73 
74 
75 private:
77 
79 
82 
84 
85 
86  void runCampaign();
87 };
88 
89 } // End of namespace Witcher
90 
91 } // End of namespace Engines
92 
93 #endif // ENGINES_WITCHER_GAME_H
A class holding an UTF-8 string.
Definition: ustring.h:48
Common::ScopedPtr< Functions > _functions
Definition: game.h:80
Basic sound types.
static void getCampaigns(std::vector< Common::UString > &campaigns)
Return a list of all campaigns.
Definition: game.cpp:153
Module & getModule()
Return the module context.
Definition: game.cpp:67
A simple scoped smart pointer template.
void refreshLocalized()
Refresh all localized strings.
Definition: game.cpp:146
static void getModules(std::vector< Common::UString > &modules)
Return a list of all modules.
Definition: game.cpp:172
Common::ScopedPtr< LuaBindings > _bindings
Definition: game.h:81
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
void stopMusic()
Force all currently playing music stopped.
Definition: game.cpp:135
Unicode string handling.
Game(WitcherEngine &engine, ::Engines::Console &console)
Definition: game.cpp:53
Campaign & getCampaign()
Return the campaign context.
Definition: game.cpp:61
WitcherEngine * _engine
Definition: game.h:76
::Engines::Console * _console
Definition: game.h:83
void playMusic(const Common::UString &music="")
Overwrite all currently playing music.
Definition: game.cpp:124
Common::ScopedPtr< Campaign > _campaign
Definition: game.h:78