xoreos  0.0.5
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::Witcher::WitcherEngine Class Reference

#include <witcher.h>

Inheritance diagram for Engines::Witcher::WitcherEngine:
Inheritance graph
[legend]
Collaboration diagram for Engines::Witcher::WitcherEngine:
Collaboration graph
[legend]

Public Member Functions

 WitcherEngine ()
 
 ~WitcherEngine ()
 
bool detectLanguages (Aurora::GameID game, const Common::UString &target, Aurora::Platform platform, std::vector< Aurora::Language > &languagesText, std::vector< Aurora::Language > &languagesVoice) const
 Detect which languages this game instance supports. More...
 
bool getLanguage (Aurora::Language &languageText, Aurora::Language &languageVoice) const
 Return the game's current language. More...
 
bool changeLanguage ()
 Change the game's current language. More...
 
GamegetGame ()
 Return the context running the actual game. More...
 
- Public Member Functions inherited from Engines::Engine
 Engine ()
 
virtual ~Engine ()
 
virtual 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. More...
 
bool detectLanguages (std::vector< Aurora::Language > &languages) const
 
bool detectLanguages (std::vector< Aurora::Language > &languagesText, std::vector< Aurora::Language > &languagesVoice) const
 
virtual bool getLanguage (Aurora::Language &language) const
 Return the game's current language. More...
 
void start (Aurora::GameID game, const Common::UString &target, Aurora::Platform platform)
 
void showFPS ()
 Evaluate the FPS display setting and show/hide the FPS display. More...
 

Protected Member Functions

void run ()
 Run the game. More...
 
- Protected Member Functions inherited from Engines::Engine
bool evaluateLanguage (bool find, Aurora::Language &language) const
 
bool evaluateLanguage (bool find, Aurora::Language &languageVoice, Aurora::Language &languageText) const
 

Private Member Functions

void init ()
 
void declareLanguages ()
 
void initResources (LoadProgress &progress)
 
void initCursors ()
 
void initConfig ()
 
void initGameConfig ()
 
void initLua ()
 
void unloadLanguageFiles ()
 
void loadLanguageFiles (LoadProgress &progress, Aurora::Language langText, Aurora::Language langVoice)
 
void loadLanguageFiles (Aurora::Language langText, Aurora::Language langVoice)
 
void deinit ()
 
void playIntroVideos ()
 

Private Attributes

Aurora::Language _languageText
 
Aurora::Language _languageVoice
 
std::list< Common::ChangeID_languageResources
 
Common::ChangeID _languageTLK
 
Common::ScopedPtr< Game_game
 

Additional Inherited Members

- Protected Attributes inherited from Engines::Engine
Aurora::GameID _game
 
Aurora::Platform _platform
 
Common::UString _target
 
Common::ScopedPtr< Console_console
 
Common::ScopedPtr< Graphics::Aurora::FPS_fps
 

Detailed Description

Definition at line 46 of file witcher.h.

Constructor & Destructor Documentation

◆ WitcherEngine()

Engines::Witcher::WitcherEngine::WitcherEngine ( )

Definition at line 57 of file witcher.cpp.

References Engines::Engine::_console.

◆ ~WitcherEngine()

Engines::Witcher::WitcherEngine::~WitcherEngine ( )

Definition at line 63 of file witcher.cpp.

Member Function Documentation

◆ changeLanguage()

bool Engines::Witcher::WitcherEngine::changeLanguage ( )
virtual

Change the game's current language.

Reimplemented from Engines::Engine.

Definition at line 104 of file witcher.cpp.

References _game, _languageText, _languageVoice, Engines::Engine::evaluateLanguage(), and loadLanguageFiles().

Here is the call graph for this function:

◆ declareLanguages()

void Engines::Witcher::WitcherEngine::declareLanguages ( )
private

◆ deinit()

void Engines::Witcher::WitcherEngine::deinit ( )
private

Definition at line 322 of file witcher.cpp.

References _game, Common::Singleton< ScriptManager >::destroy(), and LuaScriptMan.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ detectLanguages()

bool Engines::Witcher::WitcherEngine::detectLanguages ( Aurora::GameID  game,
const Common::UString target,
Aurora::Platform  platform,
std::vector< Aurora::Language > &  languagesText,
std::vector< Aurora::Language > &  languagesVoice 
) const
virtual

Detect which languages this game instance supports.

Reimplemented from Engines::Engine.

Definition at line 66 of file witcher.cpp.

References Common::FileList::addDirectory(), Common::FileList::contains(), Common::UString::empty(), Common::FilePath::findSubDirectory(), Common::UString::format(), Aurora::kLanguageMAX, and LangMan.

Here is the call graph for this function:

◆ getGame()

Game & Engines::Witcher::WitcherEngine::getGame ( )

◆ getLanguage()

bool Engines::Witcher::WitcherEngine::getLanguage ( Aurora::Language languageText,
Aurora::Language languageVoice 
) const
virtual

Return the game's current language.

Reimplemented from Engines::Engine.

Definition at line 97 of file witcher.cpp.

References _languageText, and _languageVoice.

◆ init()

void Engines::Witcher::WitcherEngine::init ( )
private

Definition at line 159 of file witcher.cpp.

References _languageText, _languageVoice, declareLanguages(), Engines::Engine::evaluateLanguage(), EventMan, initConfig(), initCursors(), initGameConfig(), initLua(), initResources(), LangMan, status(), and Engines::LoadProgress::step().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initConfig()

void Engines::Witcher::WitcherEngine::initConfig ( )
private

Definition at line 267 of file witcher.cpp.

Referenced by init().

Here is the caller graph for this function:

◆ initCursors()

void Engines::Witcher::WitcherEngine::initCursors ( )
private

Definition at line 260 of file witcher.cpp.

References CursorMan.

Referenced by init().

Here is the caller graph for this function:

◆ initGameConfig()

void Engines::Witcher::WitcherEngine::initGameConfig ( )
private

Definition at line 270 of file witcher.cpp.

References Engines::Engine::_target, ConfigMan, Common::FilePath::findSubDirectory(), and Common::kConfigRealmGameTemp.

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initLua()

void Engines::Witcher::WitcherEngine::initLua ( )
private

Definition at line 275 of file witcher.cpp.

References LuaScriptMan.

Referenced by init().

Here is the caller graph for this function:

◆ initResources()

void Engines::Witcher::WitcherEngine::initResources ( LoadProgress progress)
private

◆ loadLanguageFiles() [1/2]

void Engines::Witcher::WitcherEngine::loadLanguageFiles ( LoadProgress progress,
Aurora::Language  langText,
Aurora::Language  langVoice 
)
private

Definition at line 289 of file witcher.cpp.

References Common::UString::format(), LangMan, and Engines::LoadProgress::step().

Referenced by changeLanguage(), and initResources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadLanguageFiles() [2/2]

void Engines::Witcher::WitcherEngine::loadLanguageFiles ( Aurora::Language  langText,
Aurora::Language  langVoice 
)
private

◆ playIntroVideos()

void Engines::Witcher::WitcherEngine::playIntroVideos ( )
private

Definition at line 329 of file witcher.cpp.

References Engines::playVideo().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void Engines::Witcher::WitcherEngine::run ( )
protectedvirtual

Run the game.

Implements Engines::Engine.

Definition at line 139 of file witcher.cpp.

References Engines::Engine::_console, _game, CursorMan, deinit(), EventMan, init(), and playIntroVideos().

Here is the call graph for this function:

◆ unloadLanguageFiles()

void Engines::Witcher::WitcherEngine::unloadLanguageFiles ( )
private

Definition at line 279 of file witcher.cpp.

References _languageResources, _languageTLK, Engines::deindexResources(), and TalkMan.

Referenced by loadLanguageFiles().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _game

Common::ScopedPtr<Game> Engines::Witcher::WitcherEngine::_game
private

Definition at line 74 of file witcher.h.

Referenced by changeLanguage(), deinit(), getGame(), and run().

◆ _languageResources

std::list<Common::ChangeID> Engines::Witcher::WitcherEngine::_languageResources
private

Definition at line 71 of file witcher.h.

Referenced by loadLanguageFiles(), and unloadLanguageFiles().

◆ _languageText

Aurora::Language Engines::Witcher::WitcherEngine::_languageText
private

Definition at line 68 of file witcher.h.

Referenced by changeLanguage(), getLanguage(), init(), and initResources().

◆ _languageTLK

Common::ChangeID Engines::Witcher::WitcherEngine::_languageTLK
private

Definition at line 72 of file witcher.h.

Referenced by loadLanguageFiles(), and unloadLanguageFiles().

◆ _languageVoice

Aurora::Language Engines::Witcher::WitcherEngine::_languageVoice
private

Definition at line 69 of file witcher.h.

Referenced by changeLanguage(), getLanguage(), init(), and initResources().


The documentation for this class was generated from the following files: