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

#include <nwn.h>

Inheritance diagram for Engines::NWN::NWNEngine:
Inheritance graph
[legend]
Collaboration diagram for Engines::NWN::NWNEngine:
Collaboration graph
[legend]

Public Member Functions

 NWNEngine ()
 
 ~NWNEngine ()
 
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 getLanguage (Aurora::Language &language) 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 > &languagesText, std::vector< Aurora::Language > &languagesVoice) 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 &languageText, Aurora::Language &languageVoice) 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 detectVersion ()
 
void initConfig ()
 
void declareLanguages ()
 
void initResources (LoadProgress &progress)
 
void declareBogusTextures ()
 
void initCursors ()
 
void initGameConfig ()
 
void deinit ()
 
void checkConfig ()
 
void playIntroVideos ()
 

Private Attributes

Common::ScopedPtr< Version_version
 
Aurora::Language _language
 
bool _hasXP1
 
bool _hasXP2
 
bool _hasXP3
 
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 45 of file nwn.h.

Constructor & Destructor Documentation

◆ NWNEngine()

Engines::NWN::NWNEngine::NWNEngine ( )

Definition at line 60 of file nwn.cpp.

References Engines::Engine::_console.

◆ ~NWNEngine()

Engines::NWN::NWNEngine::~NWNEngine ( )

Definition at line 66 of file nwn.cpp.

Member Function Documentation

◆ changeLanguage()

bool Engines::NWN::NWNEngine::changeLanguage ( )
virtual

Change the game's current language.

Reimplemented from Engines::Engine.

Definition at line 102 of file nwn.cpp.

References _language, and Engines::Engine::evaluateLanguage().

Here is the call graph for this function:

◆ checkConfig()

void Engines::NWN::NWNEngine::checkConfig ( )
private

Definition at line 456 of file nwn.cpp.

References Engines::checkConfigInt().

Referenced by init().

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

◆ declareBogusTextures()

void Engines::NWN::NWNEngine::declareBogusTextures ( )
private

Definition at line 287 of file nwn.cpp.

References ARRAYSIZE, and TextureMan.

Referenced by initResources().

Here is the caller graph for this function:

◆ declareLanguages()

void Engines::NWN::NWNEngine::declareLanguages ( )
private

◆ deinit()

void Engines::NWN::NWNEngine::deinit ( )
private

Definition at line 464 of file nwn.cpp.

References _game, _version, and Engines::unregisterModelLoader().

Referenced by run().

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

◆ detectLanguages()

bool Engines::NWN::NWNEngine::detectLanguages ( Aurora::GameID  game,
const Common::UString target,
Aurora::Platform  platform,
std::vector< Aurora::Language > &  languages 
) const
virtual

Detect which languages this game instance supports.

Reimplemented from Engines::Engine.

Definition at line 69 of file nwn.cpp.

References Common::FileList::addDirectory(), Common::UString::empty(), Common::FileList::findFirst(), Aurora::TalkTable_TLK::getLanguageID(), Aurora::kLanguageInvalid, and LangMan.

Here is the call graph for this function:

◆ detectVersion()

void Engines::NWN::NWNEngine::detectVersion ( )
private

Definition at line 176 of file nwn.cpp.

References Engines::Engine::_platform, Engines::Engine::_target, _version, status(), and warning().

Referenced by init().

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

◆ getGame()

Game & Engines::NWN::NWNEngine::getGame ( )

◆ getLanguage()

bool Engines::NWN::NWNEngine::getLanguage ( Aurora::Language language) const
virtual

Return the game's current language.

Reimplemented from Engines::Engine.

Definition at line 97 of file nwn.cpp.

References _language.

◆ init()

void Engines::NWN::NWNEngine::init ( )
private

Definition at line 136 of file nwn.cpp.

References _language, checkConfig(), declareLanguages(), detectVersion(), Engines::Engine::evaluateLanguage(), EventMan, initConfig(), initCursors(), initGameConfig(), initResources(), LangMan, status(), Engines::LoadProgress::step(), and warning().

Referenced by run().

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

◆ initConfig()

void Engines::NWN::NWNEngine::initConfig ( )
private

Definition at line 423 of file nwn.cpp.

References ConfigMan, and Common::kConfigRealmDefault.

Referenced by init().

Here is the caller graph for this function:

◆ initCursors()

void Engines::NWN::NWNEngine::initCursors ( )
private

Definition at line 322 of file nwn.cpp.

References CursorMan.

Referenced by init().

Here is the caller graph for this function:

◆ initGameConfig()

void Engines::NWN::NWNEngine::initGameConfig ( )
private

Definition at line 434 of file nwn.cpp.

References _hasXP1, _hasXP2, _hasXP3, Engines::Engine::_target, ConfigMan, Common::FilePath::findSubDirectory(), Common::kConfigRealmGameTemp, and TokenMan.

Referenced by init().

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

◆ initResources()

void Engines::NWN::NWNEngine::initResources ( LoadProgress progress)
private

◆ playIntroVideos()

void Engines::NWN::NWNEngine::playIntroVideos ( )
private

Definition at line 471 of file nwn.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::NWN::NWNEngine::run ( )
protectedvirtual

Run the game.

Implements Engines::Engine.

Definition at line 116 of file nwn.cpp.

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

Here is the call graph for this function:

Member Data Documentation

◆ _game

Common::ScopedPtr<Game> Engines::NWN::NWNEngine::_game
private

Definition at line 74 of file nwn.h.

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

◆ _hasXP1

bool Engines::NWN::NWNEngine::_hasXP1
private

Definition at line 70 of file nwn.h.

Referenced by initGameConfig(), and initResources().

◆ _hasXP2

bool Engines::NWN::NWNEngine::_hasXP2
private

Definition at line 71 of file nwn.h.

Referenced by initGameConfig(), and initResources().

◆ _hasXP3

bool Engines::NWN::NWNEngine::_hasXP3
private

Definition at line 72 of file nwn.h.

Referenced by initGameConfig(), and initResources().

◆ _language

Aurora::Language Engines::NWN::NWNEngine::_language
private

Definition at line 68 of file nwn.h.

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

◆ _version

Common::ScopedPtr<Version> Engines::NWN::NWNEngine::_version
private

Definition at line 66 of file nwn.h.

Referenced by deinit(), detectVersion(), and run().


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