xoreos
0.0.5
|
#include <game.h>
Public Member Functions | |
Game (NWNEngine &engine, ::Engines::Console &console, const Version &version) | |
~Game () | |
const Version & | getVersion () const |
Module & | getModule () |
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... | |
static void | getPremiumModules (std::vector< Common::UString > &modules) |
Return a list of all premium modules. More... | |
static bool | hasPremiumModules () |
Do we actually have any premium modules installed at all? More... | |
static bool | isPremiumModule (const Common::UString &module) |
Is this module file (including extension) a premium module? More... | |
static bool | hasModule (Common::UString &module) |
Does this module exist? More... | |
static void | getCharacters (std::vector< Common::UString > &characters, bool local) |
Return a list of local player characters. More... | |
Private Member Functions | |
void | stopMenuMusic () |
void | playMenuMusic (Common::UString music="") |
void | mainMenu (bool playStartSound, bool showLegal) |
void | runModule () |
Private Attributes | |
NWNEngine * | _engine |
Common::ScopedPtr< Module > | _module |
Common::ScopedPtr< Functions > | _functions |
::Engines::Console * | _console |
const Version * | _version |
Sound::ChannelHandle | _menuMusic |
Engines::NWN::Game::Game | ( | NWNEngine & | engine, |
::Engines::Console & | console, | ||
const Version & | version | ||
) |
Definition at line 57 of file game.cpp.
References _functions.
|
static |
Return a list of local player characters.
Definition at line 190 of file game.cpp.
References Common::FileList::addDirectory(), Common::FileList::begin(), ConfigMan, Common::UString::empty(), Common::FileList::end(), Common::UString::equalsIgnoreCase(), Common::FilePath::getExtension(), and Common::FilePath::getStem().
Referenced by Engines::NWN::CharPremadeMenu::initCharacterList().
Module & Engines::NWN::Game::getModule | ( | ) |
Return the module context.
Definition at line 70 of file game.cpp.
References _module.
Referenced by Engines::NWN::Functions::actionDoCommand(), Engines::NWN::Functions::actionStartConversation(), Engines::NWN::Functions::assignCommand(), Engines::NWN::Functions::beginConversation(), Engines::NWN::Console::cmdExitModule(), Engines::NWN::Console::cmdGotoArea(), Engines::NWN::Console::cmdListAreas(), Engines::NWN::Console::cmdLoadCampaign(), Engines::NWN::Console::cmdLoadModule(), Engines::NWN::Functions::delayCommand(), Engines::NWN::Functions::endGame(), Engines::NWN::Functions::getFirstPC(), Engines::NWN::Functions::getModule(), Engines::NWN::Functions::getNearestCreature(), Engines::NWN::Functions::getNearestObject(), Engines::NWN::Functions::getNearestObjectByTag(), Engines::NWN::Functions::getObjectByTag(), Engines::NWN::Functions::getTag(), Engines::NWN::Functions::getWaypointByTag(), Engines::NWN::Functions::jumpTo(), Engines::NWN::Functions::startNewModule(), and Engines::NWN::Console::updateAreas().
|
static |
Return a list of all modules.
Definition at line 210 of file game.cpp.
References Common::FileList::addDirectory(), Common::FileList::begin(), ConfigMan, Common::UString::empty(), Common::FileList::end(), Common::UString::equalsIgnoreCase(), Common::FilePath::getExtension(), and Common::FilePath::getStem().
Referenced by Engines::NWN::NewModuleMenu::initModuleList(), and Engines::NWN::Console::updateModules().
|
static |
Return a list of all premium modules.
Definition at line 230 of file game.cpp.
References ConfigMan, Common::FilePath::getStem(), and isPremiumModule().
Referenced by hasPremiumModules(), and Engines::NWN::NewPremiumMenu::initModuleList().
const Version & Engines::NWN::Game::getVersion | ( | ) | const |
|
static |
Does this module exist?
Definition at line 266 of file game.cpp.
References ResMan.
Referenced by Engines::NWN::Functions::startNewModule().
|
static |
Do we actually have any premium modules installed at all?
Definition at line 242 of file game.cpp.
References getPremiumModules().
Referenced by Engines::NWN::NewCampMenu::NewCampMenu().
|
static |
Is this module file (including extension) a premium module?
Definition at line 249 of file game.cpp.
References ARRAYSIZE, Common::UString::equalsIgnoreCase(), and Common::FilePath::getFile().
Referenced by getPremiumModules(), and Engines::NWN::Module::preparePremiumModule().
|
private |
Definition at line 150 of file game.cpp.
References _console, _module, Engines::Console::disableCommand(), Engines::Console::enableCommand(), EventMan, Engines::NWN::Legal::fadeIn(), Engines::GUI::hide(), Sound::kSoundTypeSFX, playMenuMusic(), Engines::playSound(), Engines::GUI::run(), Engines::NWN::Legal::show(), Engines::NWN::MainMenu::show(), and stopMenuMusic().
Referenced by run().
|
private |
Definition at line 115 of file game.cpp.
References _menuMusic, ConfigMan, Common::UString::empty(), Sound::kSoundTypeMusic, Engines::playSound(), and stopMenuMusic().
Referenced by mainMenu(), and playMusic().
void Engines::NWN::Game::playMusic | ( | const Common::UString & | music = "" | ) |
Overwrite all currently playing music.
Definition at line 128 of file game.cpp.
References _module, Engines::NWN::Area::playAmbientMusic(), and playMenuMusic().
Referenced by Engines::NWN::Console::cmdPlayMusic().
void Engines::NWN::Game::run | ( | ) |
Definition at line 76 of file game.cpp.
References _console, _module, _version, EventMan, mainMenu(), and runModule().
|
private |
|
private |
Definition at line 124 of file game.cpp.
References _menuMusic, and SoundMan.
Referenced by mainMenu(), playMenuMusic(), and stopMusic().
void Engines::NWN::Game::stopMusic | ( | ) |
Force all currently playing music stopped.
Definition at line 140 of file game.cpp.
References _module, Engines::NWN::Area::stopAmbientMusic(), and stopMenuMusic().
Referenced by Engines::NWN::Console::cmdStopMusic().
|
private |
Definition at line 85 of file game.h.
Referenced by mainMenu(), and run().
|
private |
|
private |
Definition at line 89 of file game.h.
Referenced by playMenuMusic(), and stopMenuMusic().
|
private |
Definition at line 82 of file game.h.
Referenced by getModule(), mainMenu(), playMusic(), run(), runModule(), and stopMusic().
|
private |
Definition at line 87 of file game.h.
Referenced by getVersion(), and run().