xoreos  0.0.5
nwn2.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_NWN2_H
26 #define ENGINES_NWN2_NWN2_H
27 
28 #include "src/common/scopedptr.h"
29 #include "src/common/ustring.h"
30 
31 #include "src/aurora/types.h"
32 
33 #include "src/engines/engine.h"
34 
35 namespace Engines {
36 
37 class LoadProgress;
38 
39 namespace NWN2 {
40 
41 class Game;
42 
43 class NWN2Engine : public Engines::Engine {
44 public:
45  NWN2Engine();
46  ~NWN2Engine();
47 
48  bool detectLanguages(Aurora::GameID game, const Common::UString &target,
49  Aurora::Platform platform,
50  std::vector<Aurora::Language> &languages) const;
51 
52  bool getLanguage(Aurora::Language &language) const;
53  bool changeLanguage();
54 
56  Game &getGame();
57 
58 
59 protected:
60  void run();
61 
62 
63 private:
65 
66  bool _hasXP1; // Mask of the Betrayer (MotB)
67  bool _hasXP2; // Storm of Zehir (SoZ)
68  bool _hasXP3; // Mysteries of Westgate (MoW)
69 
71 
72 
73  void init();
74  void declareLanguages();
75  void initResources(LoadProgress &progress);
76  void initCursors();
77  void initConfig();
78  void initGameConfig();
79 
80  void deinit();
81 
82  void playIntroVideos();
83 };
84 
85 } // End of namespace NWN2
86 
87 } // End of namespace Engines
88 
89 #endif // ENGINES_NWN2_NWN2_H
GameID
Definition: types.h:393
Generic engine interface.
A class holding an UTF-8 string.
Definition: ustring.h:48
Common::ScopedPtr< Game > _game
Definition: nwn2.h:70
Language
Definition: language.h:46
A simple scoped smart pointer template.
void initResources(LoadProgress &progress)
Definition: nwn2.cpp:183
void run()
Run the game.
Definition: nwn2.cpp:115
bool detectLanguages(Aurora::GameID game, const Common::UString &target, Aurora::Platform platform, std::vector< Aurora::Language > &languages) const
Detect which languages this game instance supports.
Definition: nwn2.cpp:68
Aurora::Language _language
Definition: nwn2.h:64
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
Unicode string handling.
Basic type definitions to handle files used in BioWare&#39;s Aurora engine.
The base class for an engine within BioWare&#39;s Aurora family.
Definition: engine.h:49
Game & getGame()
Return the context running the actual game.
Definition: nwn2.cpp:109
bool getLanguage(Aurora::Language &language) const
Return the game&#39;s current language.
Definition: nwn2.cpp:96
bool changeLanguage()
Change the game&#39;s current language.
Definition: nwn2.cpp:101
Platform
Definition: types.h:429