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_DRAGONAGE2_GAME_H
26 #define ENGINES_DRAGONAGE2_GAME_H
27 
28 #include <vector>
29 
30 #include "src/common/scopedptr.h"
31 
32 #include "src/aurora/language.h"
33 
34 #include "src/sound/types.h"
35 
37 
39 
40 namespace Engines {
41 
42 class Console;
43 
44 namespace DragonAge2 {
45 
46 class DragonAge2Engine;
47 
48 class Functions;
49 
50 class Campaigns;
51 
52 class Game {
53 public:
54  Game(DragonAge2Engine &engine, ::Engines::Console &console);
55  ~Game();
56 
59 
60  void run();
61 
63  void loadResources(const Common::UString &dir, uint32 priority, ChangeList &res);
65  void loadTalkTables(const Common::UString &dir, uint32 priority, ChangeList &res);
66 
68  static void loadResources (const Common::UString &dir, uint32 priority, ChangeList &res,
69  Aurora::Language language);
72  static void loadTalkTables (const Common::UString &dir, uint32 priority, ChangeList &res,
73  Aurora::Language language);
74  static void loadTexturePack(const Common::UString &dir, uint32 priority, ChangeList &res,
75  TextureQuality quality);
76 
78  static void unloadTalkTables(ChangeList &changes);
79 
80 
81 private:
83 
86 
88 
89 
90  void runCampaigns();
91 
92  static void loadResourceDir(const Common::UString &dir, uint32 priority, ChangeList &changes);
93  static void loadTalkTable (const Common::UString &tlk, const Common::UString &suffix,
94  Aurora::Language language, uint32 priority, ChangeList &changes);
95 };
96 
97 } // End of namespace DragonAge2
98 
99 } // End of namespace Engines
100 
101 #endif // ENGINES_DRAGONAGE2_GAME_H
Campaigns & getCampaigns()
Return the campaigns context.
Definition: game.cpp:57
Game(DragonAge2Engine &engine, ::Engines::Console &console)
Definition: game.cpp:48
static void loadResourceDir(const Common::UString &dir, uint32 priority, ChangeList &changes)
Definition: game.cpp:205
Generic Aurora engines resource utility functions.
static void unloadTalkTables(ChangeList &changes)
Unload this set of talk tables.
Definition: game.cpp:220
A class holding an UTF-8 string.
Definition: ustring.h:48
::Engines::Console * _console
Definition: game.h:87
Basic sound types.
Language
Definition: language.h:46
A simple scoped smart pointer template.
std::list< Common::ChangeID > ChangeList
Definition: resources.h:41
Common::ScopedPtr< Functions > _functions
Definition: game.h:85
static void loadTexturePack(const Common::UString &dir, uint32 priority, ChangeList &res, TextureQuality quality)
Definition: game.cpp:139
Types and functions related to language.
DragonAge2Engine * _engine
Definition: game.h:82
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
uint32_t uint32
Definition: types.h:204
static void loadTalkTable(const Common::UString &tlk, const Common::UString &suffix, Aurora::Language language, uint32 priority, ChangeList &changes)
Definition: game.cpp:195
Common::ScopedPtr< Campaigns > _campaigns
Definition: game.h:84
Basic Dragon Age II type definitions.
void loadTalkTables(const Common::UString &dir, uint32 priority, ChangeList &res)
Load all talk tables in the current language found in this directory.
Definition: game.cpp:157
void loadResources(const Common::UString &dir, uint32 priority, ChangeList &res)
Load all game resource archives in the current language found in this directory.
Definition: game.cpp:150