xoreos
0.0.5
|
#include <console.h>
Public Member Functions | |
Console (NWN2Engine &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 Member Functions | |
void | updateCaches () |
void | updateMusic () |
void | updateCampaigns () |
void | updateModules () |
void | updateAreas () |
void | cmdListMusic (const CommandLine &cl) |
void | cmdStopMusic (const CommandLine &cl) |
void | cmdPlayMusic (const CommandLine &cl) |
void | cmdMove (const CommandLine &cl) |
void | cmdListAreas (const CommandLine &cl) |
void | cmdGotoArea (const CommandLine &cl) |
void | cmdListCampaigns (const CommandLine &cl) |
void | cmdLoadCampaign (const CommandLine &cl) |
void | cmdListModules (const CommandLine &cl) |
void | cmdLoadModule (const CommandLine &cl) |
Private Attributes | |
NWN2Engine * | _engine |
std::vector< Common::UString > | _music |
All known music resources. More... | |
std::vector< Common::UString > | _campaigns |
All known campaigns. More... | |
std::vector< Common::UString > | _modules |
All known modules. 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) |
Engines::NWN2::Console::Console | ( | NWN2Engine & | engine | ) |
Definition at line 47 of file console.cpp.
References cmdGotoArea(), cmdListAreas(), cmdListCampaigns(), cmdListModules(), cmdListMusic(), cmdLoadCampaign(), cmdLoadModule(), cmdMove(), cmdPlayMusic(), cmdStopMusic(), and Engines::Console::registerCommand().
|
virtual |
Reimplemented from Engines::Console.
Definition at line 76 of file console.cpp.
|
private |
Definition at line 161 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::NWN2::NWN2Engine::getGame(), Engines::NWN2::Module::getIFO(), Engines::NWN2::Game::getModule(), Engines::Console::hide(), Engines::NWN2::Module::movePC(), Engines::Console::printCommandHelp(), and Engines::Console::printf().
Referenced by Console().
|
private |
Definition at line 153 of file console.cpp.
References _engine, Common::UString::c_str(), Aurora::IFOFile::getAreas(), Engines::NWN2::NWN2Engine::getGame(), Engines::NWN2::Module::getIFO(), Engines::NWN2::Game::getModule(), Engines::NWN2::Area::getName(), Engines::Console::printf(), and updateAreas().
Referenced by Console().
|
private |
Definition at line 178 of file console.cpp.
References _campaigns, Common::UString::c_str(), Engines::NWN2::Campaign::getName(), Engines::Console::printf(), and updateCampaigns().
Referenced by Console().
|
private |
Definition at line 203 of file console.cpp.
References _modules, Common::UString::c_str(), Common::UString::empty(), Engines::NWN2::Module::getName(), Engines::Console::printf(), and updateModules().
Referenced by Console().
|
private |
Definition at line 123 of file console.cpp.
References _maxSizeMusic, _music, Engines::Console::printList(), and updateMusic().
Referenced by Console().
|
private |
Definition at line 185 of file console.cpp.
References _campaigns, _engine, Engines::Console::CommandLine::args, Common::UString::c_str(), Engines::Console::CommandLine::cmd, Common::UString::empty(), Engines::NWN2::Game::getCampaign(), Engines::NWN2::NWN2Engine::getGame(), Engines::Console::hide(), Engines::NWN2::Campaign::load(), Engines::Console::printCommandHelp(), Engines::Console::printf(), and updateCampaigns().
Referenced by Console().
|
private |
Definition at line 216 of file console.cpp.
References _engine, _modules, Engines::Console::CommandLine::args, Common::UString::c_str(), Engines::Console::CommandLine::cmd, Common::UString::empty(), Engines::NWN2::Game::getCampaign(), Engines::NWN2::NWN2Engine::getGame(), Engines::Console::hide(), Engines::NWN2::Campaign::loadModule(), Engines::Console::printCommandHelp(), Engines::Console::printf(), and updateModules().
Referenced by Console().
|
private |
Definition at line 136 of file console.cpp.
References _engine, Engines::Console::CommandLine::args, Engines::Console::CommandLine::cmd, Engines::NWN2::NWN2Engine::getGame(), Engines::NWN2::Game::getModule(), Engines::NWN2::Module::movePC(), Engines::Console::printCommandHelp(), and Engines::Console::splitArguments().
Referenced by Console().
|
private |
Definition at line 132 of file console.cpp.
References _engine, Engines::Console::CommandLine::args, Engines::NWN2::NWN2Engine::getGame(), and Engines::NWN2::Game::playMusic().
Referenced by Console().
|
private |
Definition at line 128 of file console.cpp.
References _engine, Engines::NWN2::NWN2Engine::getGame(), and Engines::NWN2::Game::stopMusic().
Referenced by Console().
|
private |
Definition at line 119 of file console.cpp.
References _engine, Aurora::IFOFile::getAreas(), Engines::NWN2::NWN2Engine::getGame(), Engines::NWN2::Module::getIFO(), Engines::NWN2::Game::getModule(), and Engines::Console::setArguments().
Referenced by cmdListAreas(), and updateCaches().
|
privatevirtual |
Reimplemented from Engines::Console.
Definition at line 79 of file console.cpp.
References updateAreas(), Engines::Console::updateCaches(), updateCampaigns(), updateModules(), and updateMusic().
|
private |
Definition at line 107 of file console.cpp.
References _campaigns, Engines::NWN2::Game::getCampaigns(), and Engines::Console::setArguments().
Referenced by cmdListCampaigns(), cmdLoadCampaign(), and updateCaches().
|
private |
Definition at line 113 of file console.cpp.
References _modules, Engines::NWN2::Game::getModules(), and Engines::Console::setArguments().
Referenced by cmdListModules(), cmdLoadModule(), and updateCaches().
|
private |
Definition at line 88 of file console.cpp.
References _maxSizeMusic, _music, Aurora::kFileTypeBMU, MAX(), ResMan, and Engines::Console::setArguments().
Referenced by cmdListMusic(), and updateCaches().
|
private |
All known campaigns.
Definition at line 49 of file console.h.
Referenced by cmdListCampaigns(), cmdLoadCampaign(), and updateCampaigns().
|
private |
Definition at line 45 of file console.h.
Referenced by cmdGotoArea(), cmdListAreas(), cmdLoadCampaign(), cmdLoadModule(), cmdMove(), cmdPlayMusic(), cmdStopMusic(), and updateAreas().
|
private |
Definition at line 52 of file console.h.
Referenced by cmdListMusic(), and updateMusic().
|
private |
All known modules.
Definition at line 50 of file console.h.
Referenced by cmdListModules(), cmdLoadModule(), and updateModules().
|
private |
All known music resources.
Definition at line 48 of file console.h.
Referenced by cmdListMusic(), and updateMusic().