xoreos  0.0.5
nwn.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_NWN_NWN_H
26 #define ENGINES_NWN_NWN_H
27 
28 #include <vector>
29 
30 #include "src/common/scopedptr.h"
31 
32 #include "src/aurora/types.h"
33 
34 #include "src/engines/engine.h"
35 
36 namespace Engines {
37 
38 class LoadProgress;
39 
40 namespace NWN {
41 
42 class Version;
43 class Game;
44 
45 class NWNEngine : public Engines::Engine {
46 public:
47  NWNEngine();
48  ~NWNEngine();
49 
50  bool detectLanguages(Aurora::GameID game, const Common::UString &target,
51  Aurora::Platform platform,
52  std::vector<Aurora::Language> &languages) const;
53 
54  bool getLanguage(Aurora::Language &language) const;
55  bool changeLanguage();
56 
58  Game &getGame();
59 
60 
61 protected:
62  void run();
63 
64 
65 private:
67 
69 
70  bool _hasXP1; // Shadows of Undrentide (SoU)
71  bool _hasXP2; // Hordes of the Underdark (HotU)
72  bool _hasXP3; // Kingmaker (resources also included in the final 1.69 patch)
73 
75 
76 
77  void init();
78 
79  void detectVersion();
80 
81  void initConfig();
82  void declareLanguages();
83  void initResources(LoadProgress &progress);
84  void declareBogusTextures();
85  void initCursors();
86  void initGameConfig();
87 
88  void deinit();
89 
90  void checkConfig();
91 
92  void playIntroVideos();
93 };
94 
95 } // End of namespace NWN
96 
97 } // End of namespace Engines
98 
99 #endif // ENGINES_NWN_NWN_H
bool getLanguage(Aurora::Language &language) const
Return the game&#39;s current language.
Definition: nwn.cpp:97
GameID
Definition: types.h:393
Generic engine interface.
A class holding an UTF-8 string.
Definition: ustring.h:48
Common::ScopedPtr< Game > _game
Definition: nwn.h:74
Game & getGame()
Return the context running the actual game.
Definition: nwn.cpp:110
Language
Definition: language.h:46
Aurora::Language _language
Definition: nwn.h:68
void declareBogusTextures()
Definition: nwn.cpp:287
A simple scoped smart pointer template.
void initResources(LoadProgress &progress)
Definition: nwn.cpp:213
bool changeLanguage()
Change the game&#39;s current language.
Definition: nwn.cpp:102
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: nwn.cpp:69
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
Common::ScopedPtr< Version > _version
Definition: nwn.h:66
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
void run()
Run the game.
Definition: nwn.cpp:116
void playIntroVideos()
Definition: nwn.cpp:471
void declareLanguages()
Definition: nwn.cpp:196
Platform
Definition: types.h:429