27 #include <boost/bind.hpp> 52 _engine(&engine), _maxSizeMusic(0) {
55 "Usage: exitmodule\nExit the module, returning to the main menu");
57 "Usage: listmodules\nList all modules");
59 "Usage: loadmodule <module>\nLoad and enter the specified module");
61 "Usage: listmusic\nList all available music resources");
63 "Usage: stopmusic\nStop the currently playing music resource");
65 "Usage: playmusic [<music>]\nPlay the specified music resource. " 66 "If none was specified, play the default area music.");
68 "Usage: flycam\nToggle free roam camera mode");
70 "Usage: showwalkmesh\nToggle walkmesh display");
72 "Usage: showtriggers\nToggle triggers display");
74 "Usage: getpcroom\nGet a room PC is in");
76 "Usage: listroomsvisiblefrom <room>\nList rooms that are visible from the specified room");
78 "Usage: playanim <base> [<head>]\nPlay the specified animations on the active object");
124 for (std::vector<Common::UString>::iterator m =
_modules.begin(); m !=
_modules.end(); ++m)
134 for (std::vector<Common::UString>::iterator m =
_modules.begin(); m !=
_modules.end(); ++m) {
135 if (m->equalsIgnoreCase(cl.
args)) {
182 for (std::vector<Common::UString>::const_iterator r = rooms.begin();
183 r != rooms.end(); ++r) {
193 std::vector<Common::UString> anims;
195 size_t animCount = anims.size();
197 animCount >= 2 ? anims[1] :
"");
#define ResMan
Shortcut for accessing the sound manager.
void cmdStopMusic(const CommandLine &cl)
A room within a Star Wars: Knights of the Old Republic II - The Sith Lords area.
Room * getRoom()
Get a room the object is in.
void cmdPlayAnim(const CommandLine &cl)
The context handling the gameplay in Star Wars: Knights of the Old Republic II - The Sith Lords...
static UString getExtension(const UString &p)
Return a file name's extension.
The global config manager.
void playMusic(const Common::UString &music="")
Overwrite all currently playing music.
Area * getCurrentArea()
Return the area the PC is currently in.
void cmdShowWalkmesh(const CommandLine &cl)
bool equalsIgnoreCase(const UString &str) const
std::list< UString >::const_iterator const_iterator
void cmdGetPCRoom(const CommandLine &cl)
The context holding a Star Wars: Knights of the Old Republic II - The Sith Lords area.
void load(const Common::UString &module, const Common::UString &entryLocation="", ObjectType entryLocationType=kObjectTypeAll)
Load a module.
void cmdExitModule(const CommandLine &cl)
const char * c_str() const
Return the (utf8 encoded) string data.
Console(KotOR2Engine &engine)
Game & getGame()
Return the context running the actual game.
Basic Aurora graphics types.
Utility templates and functions.
static void getModules(std::vector< Common::UString > &modules)
Return a list of all modules.
void cmdLoadModule(const CommandLine &cl)
const std::vector< Common::UString > & getRoomsVisibleFrom(const Common::UString &room) const
Module & getModule()
Return the module context.
const char * kSystemFontMono
Identifier used for the monospaced system font.
Creature * getPC()
Return the currently playing PC.
Star Wars: Knights of the Old Republic II - The Sith Lords (debug) console.
void printList(const std::vector< Common::UString > &list, size_t maxSize=0)
bool empty() const
Is the string empty?
void cmdShowTriggers(const CommandLine &cl)
void stopMusic()
Force all currently playing music stopped.
The context needed to run a Star Wars: Knights of the Old Republic II - The Sith Lords module...
std::vector< Common::UString > _modules
All known modules.
static UString getStem(const UString &p)
Return a file name's stem.
Common::UString getResRef() const
void cmdPlayMusic(const CommandLine &cl)
void printf(const char *s,...) GCC_PRINTF(2
const_iterator begin() const
Return a const_iterator pointing to the beginning of the list.
void toggleFreeRoamCamera()
void cmdListMusic(const CommandLine &cl)
const Common::UString & getName() const
Return the module's name.
virtual void updateCaches()
void printCommandHelp(const Common::UString &cmd)
void split(iterator splitPoint, UString &left, UString &right, bool remove=false) const
void cmdListRoomsVisibleFrom(const CommandLine &cl)
std::vector< Common::UString > _music
All known music resources.
void cmdFlyCam(const CommandLine &cl)
void setArguments(const Common::UString &cmd, const std::vector< Common::UString > &args)
void exit()
Exit the currently running module.
Engine class handling Star Wars: Knights of the Old Republic II - The Sith Lords. ...
void playAnimationOnActiveObject(const Common::UString &baseAnim, const Common::UString &headAnim)
bool registerCommand(const Common::UString &cmd, const CommandCallback &callback, const Common::UString &help)
The global resource manager for Aurora resources.
Utility class for manipulating file paths.
void cmdListModules(const CommandLine &cl)
const_iterator end() const
Return a const_iterator pointing past the end of the list.
static UString findSubDirectory(const UString &directory, const UString &subDirectory, bool caseInsensitive=false)
Find a directory's subdirectory.