xoreos  0.0.5
kotor2.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_KOTOR2_KOTOR2_H
26 #define ENGINES_KOTOR2_KOTOR2_H
27 
28 #include "src/common/scopedptr.h"
29 
30 #include "src/aurora/types.h"
31 
32 #include "src/engines/engine.h"
33 
34 namespace Engines {
35 
36 class LoadProgress;
37 
38 namespace KotOR2 {
39 
40 class Game;
41 
42 class KotOR2Engine : public Engines::Engine {
43 public:
44  KotOR2Engine();
45  ~KotOR2Engine();
46 
47  bool detectLanguages(Aurora::GameID game, const Common::UString &target,
48  Aurora::Platform platform,
49  std::vector<Aurora::Language> &languages) const;
50 
51  bool getLanguage(Aurora::Language &language) const;
52  bool changeLanguage();
53 
55  Game &getGame();
56 
57 
58 protected:
59  void run();
60 
61 
62 private:
64 
66 
67 
68  void init();
69 
70  void initConfig();
71  void declareLanguages();
72  void initResources(LoadProgress &progress);
73  void initCursorsRemap();
74  void initCursors();
75  void initGameConfig();
76 
77  void deinit();
78 
79  void checkConfig();
80 
81  void playIntroVideos();
82 };
83 
84 } // End of namespace KotOR2
85 
86 } // End of namespace Engines
87 
88 #endif // ENGINES_KOTOR2_KOTOR2_H
GameID
Definition: types.h:393
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: kotor2.cpp:64
Generic engine interface.
A class holding an UTF-8 string.
Definition: ustring.h:48
void initResources(LoadProgress &progress)
Definition: kotor2.cpp:191
Language
Definition: language.h:46
A simple scoped smart pointer template.
Game & getGame()
Return the context running the actual game.
Definition: kotor2.cpp:111
bool changeLanguage()
Change the game&#39;s current language.
Definition: kotor2.cpp:103
Aurora::Language _language
Definition: kotor2.h:63
bool getLanguage(Aurora::Language &language) const
Return the game&#39;s current language.
Definition: kotor2.cpp:98
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
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
Common::ScopedPtr< Game > _game
Definition: kotor2.h:65
Platform
Definition: types.h:429
void run()
Run the game.
Definition: kotor2.cpp:117