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

#include <game.h>

Collaboration diagram for Engines::Witcher::Game:
Collaboration graph
[legend]

Public Member Functions

 Game (WitcherEngine &engine, ::Engines::Console &console)
 
 ~Game ()
 
CampaigngetCampaign ()
 Return the campaign context. More...
 
ModulegetModule ()
 Return the module context. More...
 
void playMusic (const Common::UString &music="")
 Overwrite all currently playing music. More...
 
void stopMusic ()
 Force all currently playing music stopped. More...
 
void refreshLocalized ()
 Refresh all localized strings. More...
 
void run ()
 

Static Public Member Functions

static void getCampaigns (std::vector< Common::UString > &campaigns)
 Return a list of all campaigns. More...
 
static void getModules (std::vector< Common::UString > &modules)
 Return a list of all modules. More...
 

Private Member Functions

void runCampaign ()
 

Private Attributes

WitcherEngine_engine
 
Common::ScopedPtr< Campaign_campaign
 
Common::ScopedPtr< Functions_functions
 
Common::ScopedPtr< LuaBindings_bindings
 
::Engines::Console_console
 

Detailed Description

Definition at line 49 of file game.h.

Constructor & Destructor Documentation

◆ Game()

Engines::Witcher::Game::Game ( WitcherEngine engine,
::Engines::Console console 
)

Definition at line 53 of file game.cpp.

References _bindings, and _functions.

◆ ~Game()

Engines::Witcher::Game::~Game ( )

Definition at line 58 of file game.cpp.

Member Function Documentation

◆ getCampaign()

Campaign & Engines::Witcher::Game::getCampaign ( )

Return the campaign context.

Definition at line 61 of file game.cpp.

References _campaign.

Referenced by Engines::Witcher::Console::cmdLoadCampaign(), and Engines::Witcher::Console::cmdLoadModule().

Here is the caller graph for this function:

◆ getCampaigns()

void Engines::Witcher::Game::getCampaigns ( std::vector< Common::UString > &  campaigns)
static

Return a list of all campaigns.

Definition at line 153 of file game.cpp.

References ConfigMan, Common::UString::empty(), Common::UString::equalsIgnoreCase(), Common::FilePath::getExtension(), and Common::FilePath::getStem().

Referenced by Engines::Witcher::Console::updateCampaigns().

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

◆ getModule()

Module & Engines::Witcher::Game::getModule ( )

◆ getModules()

void Engines::Witcher::Game::getModules ( std::vector< Common::UString > &  modules)
static

Return a list of all modules.

Definition at line 172 of file game.cpp.

References ConfigMan, Common::UString::empty(), Common::UString::equalsIgnoreCase(), Common::FilePath::getExtension(), and Common::FilePath::getStem().

Referenced by Engines::Witcher::Functions::startNewModule(), and Engines::Witcher::Console::updateModules().

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

◆ playMusic()

void Engines::Witcher::Game::playMusic ( const Common::UString music = "")

Overwrite all currently playing music.

Definition at line 124 of file game.cpp.

References _campaign, and Engines::Witcher::Area::playAmbientMusic().

Referenced by Engines::Witcher::Console::cmdPlayMusic().

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

◆ refreshLocalized()

void Engines::Witcher::Game::refreshLocalized ( )

Refresh all localized strings.

Definition at line 146 of file game.cpp.

References _campaign.

◆ run()

void Engines::Witcher::Game::run ( )

Definition at line 73 of file game.cpp.

References _campaign, _console, EventMan, LuaScriptMan, and runCampaign().

Here is the call graph for this function:

◆ runCampaign()

void Engines::Witcher::Game::runCampaign ( )
private

Definition at line 97 of file game.cpp.

References _campaign, and EventMan.

Referenced by run().

Here is the caller graph for this function:

◆ stopMusic()

void Engines::Witcher::Game::stopMusic ( )

Force all currently playing music stopped.

Definition at line 135 of file game.cpp.

References _campaign, and Engines::Witcher::Area::stopAmbientMusic().

Referenced by Engines::Witcher::Console::cmdStopMusic().

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

Member Data Documentation

◆ _bindings

Common::ScopedPtr<LuaBindings> Engines::Witcher::Game::_bindings
private

Definition at line 81 of file game.h.

Referenced by Game().

◆ _campaign

Common::ScopedPtr<Campaign> Engines::Witcher::Game::_campaign
private

Definition at line 78 of file game.h.

Referenced by getCampaign(), getModule(), playMusic(), refreshLocalized(), run(), runCampaign(), and stopMusic().

◆ _console

::Engines::Console* Engines::Witcher::Game::_console
private

Definition at line 83 of file game.h.

Referenced by run().

◆ _engine

WitcherEngine* Engines::Witcher::Game::_engine
private

Definition at line 76 of file game.h.

◆ _functions

Common::ScopedPtr<Functions> Engines::Witcher::Game::_functions
private

Definition at line 80 of file game.h.

Referenced by Game().


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