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

#include <game.h>

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

Public Member Functions

 Game (KotOR2Engine &engine, ::Engines::Console &console, Aurora::Platform platform)
 
 ~Game ()
 
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 run ()
 

Static Public Member Functions

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

Private Member Functions

void stopMenuMusic ()
 
void playMenuMusic (Common::UString music="")
 
void mainMenu ()
 
void runModule ()
 

Private Attributes

KotOR2Engine_engine
 
Common::ScopedPtr< Module_module
 
Common::ScopedPtr< Functions_functions
 
Aurora::Platform _platform
 
::Engines::Console_console
 
Sound::ChannelHandle _menuMusic
 

Detailed Description

Definition at line 47 of file game.h.

Constructor & Destructor Documentation

◆ Game()

Engines::KotOR2::Game::Game ( KotOR2Engine engine,
::Engines::Console console,
Aurora::Platform  platform 
)

Definition at line 54 of file game.cpp.

References _functions.

◆ ~Game()

Engines::KotOR2::Game::~Game ( )

Definition at line 60 of file game.cpp.

Member Function Documentation

◆ getModule()

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

◆ getModules()

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

Return a list of all modules.

Definition at line 155 of file game.cpp.

References Common::FileList::addDirectory(), Common::FileList::begin(), ConfigMan, Common::UString::empty(), Common::FileList::end(), Common::UString::endsWith(), Common::FilePath::getStem(), Common::UString::size(), Common::UString::toLower(), and Common::UString::truncate().

Referenced by Engines::KotOR2::Console::updateModules().

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

◆ mainMenu()

void Engines::KotOR2::Game::mainMenu ( )
private

Definition at line 139 of file game.cpp.

References _console, _module, Engines::Console::disableCommand(), Engines::Console::enableCommand(), EventMan, Engines::KotOR::GUI::hide(), Engines::GUI::run(), and Engines::KotOR::GUI::show().

Referenced by run().

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

◆ playMenuMusic()

void Engines::KotOR2::Game::playMenuMusic ( Common::UString  music = "")
private

Definition at line 104 of file game.cpp.

References _menuMusic, Common::UString::empty(), Sound::kSoundTypeMusic, Engines::playSound(), and stopMenuMusic().

Referenced by playMusic().

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

◆ playMusic()

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

Overwrite all currently playing music.

Definition at line 117 of file game.cpp.

References _module, Engines::KotOR2::Area::playAmbientMusic(), and playMenuMusic().

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

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

◆ run()

void Engines::KotOR2::Game::run ( )

Definition at line 69 of file game.cpp.

References _console, _module, EventMan, mainMenu(), and runModule().

Here is the call graph for this function:

◆ runModule()

void Engines::KotOR2::Game::runModule ( )
private

Definition at line 80 of file game.cpp.

References _module, and EventMan.

Referenced by run().

Here is the caller graph for this function:

◆ stopMenuMusic()

void Engines::KotOR2::Game::stopMenuMusic ( )
private

Definition at line 113 of file game.cpp.

References _menuMusic, and SoundMan.

Referenced by playMenuMusic(), and stopMusic().

Here is the caller graph for this function:

◆ stopMusic()

void Engines::KotOR2::Game::stopMusic ( )

Force all currently playing music stopped.

Definition at line 129 of file game.cpp.

References _module, Engines::KotOR2::Area::stopAmbientMusic(), and stopMenuMusic().

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

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

Member Data Documentation

◆ _console

::Engines::Console* Engines::KotOR2::Game::_console
private

Definition at line 74 of file game.h.

Referenced by mainMenu(), and run().

◆ _engine

KotOR2Engine* Engines::KotOR2::Game::_engine
private

Definition at line 67 of file game.h.

◆ _functions

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

Definition at line 70 of file game.h.

Referenced by Game().

◆ _menuMusic

Sound::ChannelHandle Engines::KotOR2::Game::_menuMusic
private

Definition at line 76 of file game.h.

Referenced by playMenuMusic(), and stopMenuMusic().

◆ _module

Common::ScopedPtr<Module> Engines::KotOR2::Game::_module
private

Definition at line 69 of file game.h.

Referenced by getModule(), mainMenu(), playMusic(), run(), runModule(), and stopMusic().

◆ _platform

Aurora::Platform Engines::KotOR2::Game::_platform
private

Definition at line 72 of file game.h.


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