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

#include <console.h>

Inheritance diagram for Engines::KotOR2::Console:
Inheritance graph
[legend]
Collaboration diagram for Engines::KotOR2::Console:
Collaboration graph
[legend]

Public Member Functions

 Console (KotOR2Engine &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 updateModules ()
 
void updateMusic ()
 
void cmdExitModule (const CommandLine &cl)
 
void cmdListModules (const CommandLine &cl)
 
void cmdLoadModule (const CommandLine &cl)
 
void cmdListMusic (const CommandLine &cl)
 
void cmdStopMusic (const CommandLine &cl)
 
void cmdPlayMusic (const CommandLine &cl)
 
void cmdFlyCam (const CommandLine &cl)
 
void cmdShowWalkmesh (const CommandLine &cl)
 
void cmdShowTriggers (const CommandLine &cl)
 
void cmdGetPCRoom (const CommandLine &cl)
 
void cmdListRoomsVisibleFrom (const CommandLine &cl)
 
void cmdPlayAnim (const CommandLine &cl)
 

Private Attributes

KotOR2Engine_engine
 
std::vector< Common::UString_modules
 All known modules. More...
 
std::vector< Common::UString_music
 All known music resources. 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)
 

Detailed Description

Definition at line 38 of file console.h.

Constructor & Destructor Documentation

◆ Console()

Engines::KotOR2::Console::Console ( KotOR2Engine engine)

◆ ~Console()

Engines::KotOR2::Console::~Console ( )
virtual

Reimplemented from Engines::Console.

Definition at line 81 of file console.cpp.

Member Function Documentation

◆ cmdExitModule()

void Engines::KotOR2::Console::cmdExitModule ( const CommandLine cl)
private

Definition at line 116 of file console.cpp.

References _engine, Engines::KotOR2::Module::exit(), Engines::KotOR2::KotOR2Engine::getGame(), Engines::KotOR2::Game::getModule(), and Engines::Console::hide().

Referenced by Console().

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

◆ cmdFlyCam()

void Engines::KotOR2::Console::cmdFlyCam ( const CommandLine cl)
private

Definition at line 158 of file console.cpp.

References _engine, Engines::KotOR2::KotOR2Engine::getGame(), Engines::KotOR2::Game::getModule(), and Engines::KotOR2::Module::toggleFreeRoamCamera().

Referenced by Console().

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

◆ cmdGetPCRoom()

void Engines::KotOR2::Console::cmdGetPCRoom ( const CommandLine cl)
private

◆ cmdListModules()

void Engines::KotOR2::Console::cmdListModules ( const CommandLine cl)
private

Definition at line 121 of file console.cpp.

References _modules, Common::UString::c_str(), Engines::KotOR2::Module::getName(), Engines::Console::printf(), and updateModules().

Referenced by Console().

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

◆ cmdListMusic()

void Engines::KotOR2::Console::cmdListMusic ( const CommandLine cl)
private

Definition at line 145 of file console.cpp.

References _maxSizeMusic, _music, Engines::Console::printList(), and updateMusic().

Referenced by Console().

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

◆ cmdListRoomsVisibleFrom()

void Engines::KotOR2::Console::cmdListRoomsVisibleFrom ( const CommandLine cl)
private

◆ cmdLoadModule()

void Engines::KotOR2::Console::cmdLoadModule ( const CommandLine cl)
private

◆ cmdPlayAnim()

void Engines::KotOR2::Console::cmdPlayAnim ( const CommandLine cl)
private

◆ cmdPlayMusic()

void Engines::KotOR2::Console::cmdPlayMusic ( const CommandLine cl)
private

Definition at line 154 of file console.cpp.

References _engine, Engines::Console::CommandLine::args, Engines::KotOR2::KotOR2Engine::getGame(), and Engines::KotOR2::Game::playMusic().

Referenced by Console().

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

◆ cmdShowTriggers()

void Engines::KotOR2::Console::cmdShowTriggers ( const CommandLine cl)
private

Definition at line 166 of file console.cpp.

References _engine, Engines::KotOR2::KotOR2Engine::getGame(), Engines::KotOR2::Game::getModule(), and Engines::KotOR2::Module::toggleTriggers().

Referenced by Console().

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

◆ cmdShowWalkmesh()

void Engines::KotOR2::Console::cmdShowWalkmesh ( const CommandLine cl)
private

Definition at line 162 of file console.cpp.

References _engine, Engines::KotOR2::KotOR2Engine::getGame(), Engines::KotOR2::Game::getModule(), and Engines::KotOR2::Module::toggleWalkmesh().

Referenced by Console().

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

◆ cmdStopMusic()

void Engines::KotOR2::Console::cmdStopMusic ( const CommandLine cl)
private

Definition at line 150 of file console.cpp.

References _engine, Engines::KotOR2::KotOR2Engine::getGame(), and Engines::KotOR2::Game::stopMusic().

Referenced by Console().

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

◆ updateCaches()

void Engines::KotOR2::Console::updateCaches ( )
privatevirtual

Reimplemented from Engines::Console.

Definition at line 84 of file console.cpp.

References Engines::Console::updateCaches(), updateModules(), and updateMusic().

Here is the call graph for this function:

◆ updateModules()

void Engines::KotOR2::Console::updateModules ( )
private

Definition at line 91 of file console.cpp.

References _modules, Engines::KotOR2::Game::getModules(), and Engines::Console::setArguments().

Referenced by cmdListModules(), and updateCaches().

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

◆ updateMusic()

void Engines::KotOR2::Console::updateMusic ( )
private

Member Data Documentation

◆ _engine

KotOR2Engine* Engines::KotOR2::Console::_engine
private

◆ _maxSizeMusic

size_t Engines::KotOR2::Console::_maxSizeMusic
private

Definition at line 51 of file console.h.

Referenced by cmdListMusic(), and updateMusic().

◆ _modules

std::vector<Common::UString> Engines::KotOR2::Console::_modules
private

All known modules.

Definition at line 48 of file console.h.

Referenced by cmdListModules(), cmdLoadModule(), and updateModules().

◆ _music

std::vector<Common::UString> Engines::KotOR2::Console::_music
private

All known music resources.

Definition at line 49 of file console.h.

Referenced by cmdListMusic(), and updateMusic().


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