xoreos
0.0.5
|
#include <console.h>
Public Member Functions | |
Console (NWNEngine &engine) | |
~Console () | |
Public Member Functions inherited from Engines::Console | |
Console (Engine &engine, const Common::UString &font, int fontHeight=0) | |
void | show () |
void | hide () |
bool | isVisible () const |
float | getWidth () const |
float | getHeight () const |
size_t | getLines () const |
size_t | getColumns () const |
bool | processEvent (const Events::Event &event) |
void | disableCommand (const Common::UString &cmd, const Common::UString &reason="") |
void | enableCommand (const Common::UString &cmd) |
void | clear () |
void | print (const Common::UString &line) |
void | printf (const char *s,...) GCC_PRINTF(2 |
Private Types | |
typedef std::map< Common::UString, int, Common::UString::iless > | CampaignMap |
Private Member Functions | |
void | updateCaches () |
void | updateCampaigns () |
void | updateModules () |
void | updateAreas () |
void | updateMusic () |
void | cmdExitModule (const CommandLine &cl) |
void | cmdListCampaigns (const CommandLine &cl) |
void | cmdLoadCampaign (const CommandLine &cl) |
void | cmdListModules (const CommandLine &cl) |
void | cmdLoadModule (const CommandLine &cl) |
void | cmdListAreas (const CommandLine &cl) |
void | cmdGotoArea (const CommandLine &cl) |
void | cmdListMusic (const CommandLine &cl) |
void | cmdStopMusic (const CommandLine &cl) |
void | cmdPlayMusic (const CommandLine &cl) |
Private Attributes | |
NWNEngine * | _engine |
std::vector< Common::UString > | _campaigns |
All known campaigns modules. More... | |
std::vector< Common::UString > | _modules |
All known modules. More... | |
std::vector< Common::UString > | _music |
All known music resources. More... | |
CampaignMap | _campaignModules |
Mapping campaign module file -> campaign module name. More... | |
size_t | _maxSizeMusic |
Additional Inherited Members | |
Protected Types inherited from Engines::Console | |
typedef boost::function< void(const CommandLine &cl)> | CommandCallback |
Protected Member Functions inherited from Engines::Console | |
void | printException (Common::Exception &e, const Common::UString &prefix="ERROR: ") |
bool | registerCommand (const Common::UString &cmd, const CommandCallback &callback, const Common::UString &help) |
void | printCommandHelp (const Common::UString &cmd) |
void | printList (const std::vector< Common::UString > &list, size_t maxSize=0) |
void | setArguments (const Common::UString &cmd, const std::vector< Common::UString > &args) |
void | setArguments (const Common::UString &cmd) |
virtual void | showCallback () |
Static Protected Member Functions inherited from Engines::Console | |
static void | splitArguments (Common::UString argLine, std::vector< Common::UString > &args) |
|
private |
Engines::NWN::Console::Console | ( | NWNEngine & | engine | ) |
Definition at line 62 of file console.cpp.
References cmdExitModule(), cmdGotoArea(), cmdListAreas(), cmdListCampaigns(), cmdListModules(), cmdListMusic(), cmdLoadCampaign(), cmdLoadModule(), cmdPlayMusic(), cmdStopMusic(), and Engines::Console::registerCommand().
|
virtual |
Reimplemented from Engines::Console.
Definition at line 91 of file console.cpp.
|
private |
Definition at line 175 of file console.cpp.
References _engine, Engines::NWN::Module::exit(), Engines::NWN::NWNEngine::getGame(), Engines::NWN::Game::getModule(), and Engines::Console::hide().
Referenced by Console().
|
private |
Definition at line 236 of file console.cpp.
References _engine, Engines::Console::CommandLine::args, Common::UString::c_str(), Engines::Console::CommandLine::cmd, Common::UString::empty(), Aurora::IFOFile::getAreas(), Engines::NWN::NWNEngine::getGame(), Engines::NWN::Module::getIFO(), Engines::NWN::Game::getModule(), Engines::Console::hide(), Engines::NWN::Module::movePC(), Engines::Console::printCommandHelp(), and Engines::Console::printf().
Referenced by Console().
|
private |
Definition at line 228 of file console.cpp.
References _engine, Common::UString::c_str(), Aurora::IFOFile::getAreas(), Engines::NWN::NWNEngine::getGame(), Engines::NWN::Module::getIFO(), Engines::NWN::Game::getModule(), Engines::NWN::Area::getName(), Engines::Console::printf(), and updateAreas().
Referenced by Console().
|
private |
Definition at line 181 of file console.cpp.
References _campaigns, Engines::Console::print(), and updateCampaigns().
Referenced by Console().
|
private |
Definition at line 205 of file console.cpp.
References _modules, Engines::Console::printList(), and updateModules().
Referenced by Console().
|
private |
Definition at line 255 of file console.cpp.
References _maxSizeMusic, _music, Engines::Console::printList(), and updateMusic().
Referenced by Console().
|
private |
Definition at line 187 of file console.cpp.
References _campaignModules, _engine, Engines::Console::CommandLine::args, Common::UString::c_str(), Engines::Console::CommandLine::cmd, Common::UString::empty(), Engines::NWN::NWNEngine::getGame(), Engines::NWN::Game::getModule(), Engines::Console::hide(), kCampaignModules, Engines::NWN::Module::load(), Engines::Console::printCommandHelp(), and Engines::Console::printf().
Referenced by Console().
|
private |
Definition at line 210 of file console.cpp.
References _engine, _modules, Engines::Console::CommandLine::args, Common::UString::c_str(), Engines::Console::CommandLine::cmd, Common::UString::empty(), Engines::NWN::NWNEngine::getGame(), Engines::NWN::Game::getModule(), Engines::Console::hide(), Engines::NWN::Module::load(), Engines::Console::printCommandHelp(), and Engines::Console::printf().
Referenced by Console().
|
private |
Definition at line 264 of file console.cpp.
References _engine, Engines::Console::CommandLine::args, Engines::NWN::NWNEngine::getGame(), and Engines::NWN::Game::playMusic().
Referenced by Console().
|
private |
Definition at line 260 of file console.cpp.
References _engine, Engines::NWN::NWNEngine::getGame(), and Engines::NWN::Game::stopMusic().
Referenced by Console().
|
private |
Definition at line 152 of file console.cpp.
References _engine, Aurora::IFOFile::getAreas(), Engines::NWN::NWNEngine::getGame(), Engines::NWN::Module::getIFO(), Engines::NWN::Game::getModule(), and Engines::Console::setArguments().
Referenced by cmdListAreas(), and updateCaches().
|
privatevirtual |
Reimplemented from Engines::Console.
Definition at line 94 of file console.cpp.
References updateAreas(), Engines::Console::updateCaches(), updateCampaigns(), updateModules(), and updateMusic().
|
private |
Definition at line 103 of file console.cpp.
References _campaignModules, _campaigns, ARRAYSIZE, ConfigMan, Common::UString::findFirst(), kCampaignNames, Engines::Console::setArguments(), TalkMan, Common::UString::trim(), and Common::UString::truncate().
Referenced by cmdListCampaigns(), and updateCaches().
|
private |
Definition at line 146 of file console.cpp.
References _modules, Engines::NWN::Game::getModules(), and Engines::Console::setArguments().
Referenced by cmdListModules(), and updateCaches().
|
private |
Definition at line 156 of file console.cpp.
References _maxSizeMusic, _music, Aurora::kFileTypeBMU, MAX(), ResMan, and Engines::Console::setArguments().
Referenced by cmdListMusic(), and updateCaches().
|
private |
Mapping campaign module file -> campaign module name.
Definition at line 59 of file console.h.
Referenced by cmdLoadCampaign(), and updateCampaigns().
|
private |
All known campaigns modules.
Definition at line 55 of file console.h.
Referenced by cmdListCampaigns(), and updateCampaigns().
|
private |
Definition at line 52 of file console.h.
Referenced by cmdExitModule(), cmdGotoArea(), cmdListAreas(), cmdLoadCampaign(), cmdLoadModule(), cmdPlayMusic(), cmdStopMusic(), and updateAreas().
|
private |
Definition at line 61 of file console.h.
Referenced by cmdListMusic(), and updateMusic().
|
private |
All known modules.
Definition at line 56 of file console.h.
Referenced by cmdListModules(), cmdLoadModule(), and updateModules().
|
private |
All known music resources.
Definition at line 57 of file console.h.
Referenced by cmdListMusic(), and updateMusic().