ScummVM
LastExpress::Debugger Class Reference

#include <debug.h>

+ Inheritance diagram for LastExpress::Debugger:
+ Collaboration diagram for LastExpress::Debugger:

Public Member Functions

 Debugger (LastExpressEngine *engine)
 
 ~Debugger () override
 
bool hasCommand () const
 
void callCommand ()
 
- Public Member Functions inherited from GUI::Debugger
 Debugger ()
 
int getCharsPerLine ()
 
int debugPrintf (const char *format,...) GCC_PRINTF(2
 
int void debugPrintColumns (const Common::StringArray &list)
 
virtual void onFrame ()
 The onFrame() method should be invoked by the engine at regular intervals (usually once per main loop iteration) whenever the debugger is attached. More...
 
virtual void attach (const char *entry=nullptr)
 'Attach' the debugger. More...
 
bool isActive () const
 Return true if the debugger is currently active (i.e. More...
 
char * readlineComplete (const char *input, int state)
 

Private Member Functions

bool cmdHelp (int argc, const char **argv)
 
bool cmdListFiles (int argc, const char **argv)
 Command: list files in archive. More...
 
bool cmdDumpFiles (int argc, const char **argv)
 Command: Dump the list of files in the archive. More...
 
bool cmdShowFrame (int argc, const char **argv)
 Command: Shows a frame. More...
 
bool cmdShowBg (int argc, const char **argv)
 Command: shows a background. More...
 
bool cmdPlaySeq (int argc, const char **argv)
 Command: plays a sequence. More...
 
bool cmdPlaySnd (int argc, const char **argv)
 Command: plays a sound. More...
 
bool cmdPlaySbe (int argc, const char **argv)
 Command: plays subtitles. More...
 
bool cmdPlayNis (int argc, const char **argv)
 Command: plays a NIS animation sequence. More...
 
bool cmdLoadScene (int argc, const char **argv)
 Command: loads a scene. More...
 
bool cmdFight (int argc, const char **argv)
 Command: starts a fight sequence. More...
 
bool cmdBeetle (int argc, const char **argv)
 Command: starts the beetle sequence. More...
 
bool cmdTimeDelta (int argc, const char **argv)
 Command: adjusts the time delta. More...
 
bool cmdTime (int argc, const char **argv)
 Command: Convert between in-game time and human readable time. More...
 
bool cmdShow (int argc, const char **argv)
 Command: show game logic data. More...
 
bool cmdEntity (int argc, const char **argv)
 Command: shows entity data. More...
 
bool cmdSwitchChapter (int argc, const char **argv)
 Command: switch to a specific chapter. More...
 
bool cmdClear (int argc, const char **argv)
 Command: clears the screen. More...
 
void resetCommand ()
 
void copyCommand (int argc, const char **argv)
 
int getNumber (const char *arg) const
 
bool loadArchive (int index)
 
void restoreArchive () const
 

Private Attributes

LastExpressEngine_engine
 
Debuglet_command
 
int _numParams
 
char ** _commandParams
 
StreamedSound_soundStream
 

Additional Inherited Members

- Protected Types inherited from GUI::Debugger
enum  VarType {
  DVAR_BYTE, DVAR_INT, DVAR_BOOL, DVAR_INTARRAY,
  DVAR_STRING
}
 
typedef Common::Functor2< int, const char **, bool > Debuglet
 
- Protected Member Functions inherited from GUI::Debugger
void registerVar (const Common::String &varname, byte *variable)
 
void registerVar (const Common::String &varname, int *variable)
 
void registerVar (const Common::String &varname, bool *variable)
 
void registerVar (const Common::String &varname, int32 **variable, int arraySize)
 
void registerVar (const Common::String &varname, Common::String *variable)
 
void registerCmd (const Common::String &cmdname, Debuglet *debuglet)
 
virtual void preEnter ()
 Hook for subclasses which is called just before enter() is run. More...
 
virtual void postEnter ()
 Hook for subclasses which is called just after enter() was run. More...
 
virtual bool handleCommand (int argc, const char **argv, bool &keepRunning)
 Process the given command line. More...
 
void detach ()
 Subclasses should invoke the detach() method in their cmdFOO methods if that command will resume execution of the program (as opposed to executing, say, a "single step through code" command). More...
 
bool cmdExit (int argc, const char **argv)
 
bool cmdHelp (int argc, const char **argv)
 
bool cmdOpenLog (int argc, const char **argv)
 
bool cmdMd5 (int argc, const char **argv)
 
bool cmdMd5Mac (int argc, const char **argv)
 
bool cmdDebugLevel (int argc, const char **argv)
 
bool cmdDebugFlagsList (int argc, const char **argv)
 
bool cmdDebugFlagEnable (int argc, const char **argv)
 
bool cmdDebugFlagDisable (int argc, const char **argv)
 

Detailed Description

Definition at line 48 of file debug.h.

Constructor & Destructor Documentation

◆ Debugger()

LastExpress::Debugger::Debugger ( LastExpressEngine engine)

Definition at line 57 of file debug.cpp.

◆ ~Debugger()

LastExpress::Debugger::~Debugger ( )
overridevirtual

Reimplemented from GUI::Debugger.

Definition at line 96 of file debug.cpp.

Member Function Documentation

◆ callCommand()

void LastExpress::Debugger::callCommand ( )

Definition at line 152 of file debug.cpp.

◆ cmdBeetle()

bool LastExpress::Debugger::cmdBeetle ( int  argc,
const char **  argv 
)
private

Command: starts the beetle sequence.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 853 of file debug.cpp.

◆ cmdClear()

bool LastExpress::Debugger::cmdClear ( int  argc,
const char **  argv 
)
private

Command: clears the screen.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 1170 of file debug.cpp.

◆ cmdDumpFiles()

bool LastExpress::Debugger::cmdDumpFiles ( int  argc,
const char **  argv 
)
private

Command: Dump the list of files in the archive.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 277 of file debug.cpp.

◆ cmdEntity()

bool LastExpress::Debugger::cmdEntity ( int  argc,
const char **  argv 
)
private

Command: shows entity data.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 1093 of file debug.cpp.

◆ cmdFight()

bool LastExpress::Debugger::cmdFight ( int  argc,
const char **  argv 
)
private

Command: starts a fight sequence.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 770 of file debug.cpp.

◆ cmdHelp()

bool LastExpress::Debugger::cmdHelp ( int  argc,
const char **  argv 
)
private

Definition at line 200 of file debug.cpp.

◆ cmdListFiles()

bool LastExpress::Debugger::cmdListFiles ( int  argc,
const char **  argv 
)
private

Command: list files in archive.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 242 of file debug.cpp.

◆ cmdLoadScene()

bool LastExpress::Debugger::cmdLoadScene ( int  argc,
const char **  argv 
)
private

Command: loads a scene.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 684 of file debug.cpp.

◆ cmdPlayNis()

bool LastExpress::Debugger::cmdPlayNis ( int  argc,
const char **  argv 
)
private

Command: plays a NIS animation sequence.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 628 of file debug.cpp.

◆ cmdPlaySbe()

bool LastExpress::Debugger::cmdPlaySbe ( int  argc,
const char **  argv 
)
private

Command: plays subtitles.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 561 of file debug.cpp.

◆ cmdPlaySeq()

bool LastExpress::Debugger::cmdPlaySeq ( int  argc,
const char **  argv 
)
private

Command: plays a sequence.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 445 of file debug.cpp.

◆ cmdPlaySnd()

bool LastExpress::Debugger::cmdPlaySnd ( int  argc,
const char **  argv 
)
private

Command: plays a sound.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 523 of file debug.cpp.

◆ cmdShow()

bool LastExpress::Debugger::cmdShow ( int  argc,
const char **  argv 
)
private

Command: show game logic data.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 1039 of file debug.cpp.

◆ cmdShowBg()

bool LastExpress::Debugger::cmdShowBg ( int  argc,
const char **  argv 
)
private

Command: shows a background.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 391 of file debug.cpp.

◆ cmdShowFrame()

bool LastExpress::Debugger::cmdShowFrame ( int  argc,
const char **  argv 
)
private

Command: Shows a frame.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 328 of file debug.cpp.

◆ cmdSwitchChapter()

bool LastExpress::Debugger::cmdSwitchChapter ( int  argc,
const char **  argv 
)
private

Command: switch to a specific chapter.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 1133 of file debug.cpp.

◆ cmdTime()

bool LastExpress::Debugger::cmdTime ( int  argc,
const char **  argv 
)
private

Command: Convert between in-game time and human readable time.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 1010 of file debug.cpp.

◆ cmdTimeDelta()

bool LastExpress::Debugger::cmdTimeDelta ( int  argc,
const char **  argv 
)
private

Command: adjusts the time delta.

Parameters
argcThe argument count.
argvThe values.
Returns
true if it was handled, false otherwise

Definition at line 986 of file debug.cpp.

◆ copyCommand()

void LastExpress::Debugger::copyCommand ( int  argc,
const char **  argv 
)
private

Definition at line 132 of file debug.cpp.

◆ getNumber()

int LastExpress::Debugger::getNumber ( const char *  arg) const
private

Definition at line 128 of file debug.cpp.

◆ hasCommand()

bool LastExpress::Debugger::hasCommand ( ) const

Definition at line 112 of file debug.cpp.

◆ loadArchive()

bool LastExpress::Debugger::loadArchive ( int  index)
private

Definition at line 157 of file debug.cpp.

◆ resetCommand()

void LastExpress::Debugger::resetCommand ( )
private

Definition at line 116 of file debug.cpp.

◆ restoreArchive()

void LastExpress::Debugger::restoreArchive ( ) const
private

Definition at line 172 of file debug.cpp.

Member Data Documentation

◆ _command

Debuglet* LastExpress::Debugger::_command
private

Definition at line 90 of file debug.h.

◆ _commandParams

char** LastExpress::Debugger::_commandParams
private

Definition at line 92 of file debug.h.

◆ _engine

LastExpressEngine* LastExpress::Debugger::_engine
private

Definition at line 57 of file debug.h.

◆ _numParams

int LastExpress::Debugger::_numParams
private

Definition at line 91 of file debug.h.

◆ _soundStream

StreamedSound* LastExpress::Debugger::_soundStream
private

Definition at line 95 of file debug.h.


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