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_DRAGONAGE_GAME_H
26 #define ENGINES_DRAGONAGE_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 DragonAge {
45 
46 class DragonAgeEngine;
47 
48 class Functions;
49 
50 class Campaigns;
51 
52 class Game {
53 public:
54  Game(DragonAgeEngine &engine, ::Engines::Console &console);
55  ~Game();
56 
59 
60  void run();
61 
63  void loadTalkTables(const Common::UString &dir, uint32 priority, ChangeList &res);
64 
66  static void loadResources (const Common::UString &dir, uint32 priority, ChangeList &res);
69  static void loadTalkTables (const Common::UString &dir, uint32 priority, ChangeList &res,
70  Aurora::Language language);
71  static void loadTexturePack(const Common::UString &dir, uint32 priority, ChangeList &res,
72  TextureQuality quality);
73 
75  static void unloadTalkTables(ChangeList &changes);
76 
77 
78 private:
80 
83 
85 
86 
87  void runCampaigns();
88 
89  static void loadResourceDir(const Common::UString &dir, uint32 priority, ChangeList &changes);
90  static void loadTalkTable (const Common::UString &tlk, Aurora::Language language,
91  uint32 priority, ChangeList &changes);
92 };
93 
94 } // End of namespace DragonAge
95 
96 } // End of namespace Engines
97 
98 #endif // ENGINES_DRAGONAGE_GAME_H
Game(DragonAgeEngine &engine, ::Engines::Console &console)
Definition: game.cpp:48
Generic Aurora engines resource utility functions.
Common::ScopedPtr< Functions > _functions
Definition: game.h:82
static void loadResourceDir(const Common::UString &dir, uint32 priority, ChangeList &changes)
Definition: game.cpp:178
static void loadTexturePack(const Common::UString &dir, uint32 priority, ChangeList &res, TextureQuality quality)
Definition: game.cpp:124
A class holding an UTF-8 string.
Definition: ustring.h:48
Campaigns & getCampaigns()
Return the campaigns context.
Definition: game.cpp:57
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< Campaigns > _campaigns
Definition: game.h:81
Types and functions related to language.
::Engines::Console * _console
Definition: game.h:84
static void loadTalkTable(const Common::UString &tlk, Aurora::Language language, uint32 priority, ChangeList &changes)
Definition: game.cpp:168
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
static void unloadTalkTables(ChangeList &changes)
Unload this set of talk tables.
Definition: game.cpp:192
static void loadResources(const Common::UString &dir, uint32 priority, ChangeList &res)
Load all game resource archives found in this directory.
Definition: game.cpp:105
uint32_t uint32
Definition: types.h:204
Basic Dragon Age: Origins 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:135
DragonAgeEngine * _engine
Definition: game.h:79