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_NWN2_GAME_H
26 #define ENGINES_NWN2_GAME_H
27 
28 #include <vector>
29 
30 #include "src/common/scopedptr.h"
31 #include "src/common/ustring.h"
32 
33 #include "src/sound/types.h"
34 
35 namespace Engines {
36 
37 class Console;
38 
39 namespace NWN2 {
40 
41 class NWN2Engine;
42 
43 class Functions;
44 
45 class Campaign;
46 class Module;
47 
48 class Game {
49 public:
50  Game(NWN2Engine &engine, ::Engines::Console &console);
51  ~Game();
52 
56  Module &getModule();
57 
59  void playMusic(const Common::UString &music = "");
61  void stopMusic();
62 
63  void run();
64 
66  static void getCampaigns (std::vector<Common::UString> &campaigns);
68  static void getModules (std::vector<Common::UString> &modules);
70  static void getCharacters(std::vector<Common::UString> &characters, bool local);
71 
72 
73 private:
75 
78 
80 
81 
82  void runCampaign();
83 };
84 
85 } // End of namespace NWN2
86 
87 } // End of namespace Engines
88 
89 #endif // ENGINES_NWN2_GAME_H
A class holding an UTF-8 string.
Definition: ustring.h:48
static void getCampaigns(std::vector< Common::UString > &campaigns)
Return a list of all campaigns.
Definition: game.cpp:135
Basic sound types.
::Engines::Console * _console
Definition: game.h:79
A simple scoped smart pointer template.
void playMusic(const Common::UString &music="")
Overwrite all currently playing music.
Definition: game.cpp:113
static void getModules(std::vector< Common::UString > &modules)
Return a list of all modules.
Definition: game.cpp:156
Common::ScopedPtr< Functions > _functions
Definition: game.h:77
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
Common::ScopedPtr< Campaign > _campaign
Definition: game.h:76
NWN2Engine * _engine
Definition: game.h:74
Unicode string handling.
void runCampaign()
Definition: game.cpp:80
Campaign & getCampaign()
Return the campaign context.
Definition: game.cpp:58
void stopMusic()
Force all currently playing music stopped.
Definition: game.cpp:124
static void getCharacters(std::vector< Common::UString > &characters, bool local)
Return a list of local player characters.
Definition: game.cpp:173
Game(NWN2Engine &engine, ::Engines::Console &console)
Definition: game.cpp:49
Module & getModule()
Return the module context.
Definition: game.cpp:64