[Scummvm-cvs-logs] scummvm master -> 63ccd85baae74a59f9cc720bef5ca58224ab8dd5
lordhoto
lordhoto at gmail.com
Tue May 27 02:08:31 CEST 2014
This automated email contains information about 10 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf.
0adca2c579 ALL: Rename Debugger::DVar_Register to Debugger::registerVar.
ae4ffe01f0 ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd.
07c9fea9cb GUI: Slight naming cleanup in Debugger.
30d64edac4 ALL: Make Debugger command function names conform to our guidelines.
75a78c89fa GUI: Don't endorse function naming against our guidelines in docu.
3dccfda1cf VOYEUR: Don't overwrite "exit" command in the debugger.
96a901d1fb KYRA: Adpot debugger command function naming to match our guidelines.
8b7672b64c ALL: Introduce typesafe Debugger::registerVar functions.
63ccd85baa GRAPHICS: colour -> color in VectorRendererSpec code.
Commit: daa8d57a866e2866369e432cf1d624179edc8875
https://github.com/scummvm/scummvm/commit/daa8d57a866e2866369e432cf1d624179edc8875
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:07+02:00
Commit Message:
ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf.
Changed paths:
engines/agi/console.cpp
engines/agi/preagi_mickey.cpp
engines/agi/preagi_winnie.cpp
engines/agos/debugger.cpp
engines/avalanche/console.cpp
engines/cge/console.cpp
engines/cruise/debugger.cpp
engines/drascula/console.cpp
engines/fullpipe/console.cpp
engines/gob/cheater_geisha.cpp
engines/gob/console.cpp
engines/groovie/debug.cpp
engines/hopkins/debugger.cpp
engines/hugo/console.cpp
engines/kyra/debugger.cpp
engines/lastexpress/debug.cpp
engines/lure/debugger.cpp
engines/mads/debugger.cpp
engines/mohawk/console.cpp
engines/neverhood/console.cpp
engines/neverhood/gamevars.cpp
engines/neverhood/scene.cpp
engines/parallaction/debug.cpp
engines/pegasus/console.cpp
engines/queen/debug.cpp
engines/saga/actor_walk.cpp
engines/saga/animation.cpp
engines/saga/console.cpp
engines/saga/objectmap.cpp
engines/saga/scene.cpp
engines/saga/sfuncs.cpp
engines/sci/console.cpp
engines/sci/engine/kevent.cpp
engines/sci/engine/scriptdebug.cpp
engines/sci/graphics/animate.cpp
engines/sci/graphics/frameout.cpp
engines/sci/graphics/ports.cpp
engines/sci/parser/grammar.cpp
engines/sci/parser/vocabulary.cpp
engines/sci/sound/music.cpp
engines/scumm/debugger.cpp
engines/sky/debug.cpp
engines/sword2/console.cpp
engines/sword2/resman.cpp
engines/sword2/sound.cpp
engines/teenagent/console.cpp
engines/tinsel/debugger.cpp
engines/toltecs/console.cpp
engines/tony/debugger.cpp
engines/touche/console.cpp
engines/tsage/debugger.cpp
engines/voyeur/debugger.cpp
engines/wintermute/debugger.cpp
engines/zvision/core/console.cpp
gui/debugger.cpp
gui/debugger.h
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index 5f222ad..dce85b9 100644
--- a/engines/agi/console.cpp
+++ b/engines/agi/console.cpp
@@ -52,7 +52,7 @@ Console::Console(AgiEngine *vm) : GUI::Debugger() {
bool Console::Cmd_SetVar(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Usage: setvar <varnum> <value>\n");
+ debugPrintf("Usage: setvar <varnum> <value>\n");
return true;
}
int p1 = (int)atoi(argv[1]);
@@ -64,7 +64,7 @@ bool Console::Cmd_SetVar(int argc, const char **argv) {
bool Console::Cmd_SetFlag(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Usage: setvar <varnum> <value>\n");
+ debugPrintf("Usage: setvar <varnum> <value>\n");
return true;
}
int p1 = (int)atoi(argv[1]);
@@ -76,7 +76,7 @@ bool Console::Cmd_SetFlag(int argc, const char **argv) {
bool Console::Cmd_SetObj(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Usage: setvar <varnum> <value>\n");
+ debugPrintf("Usage: setvar <varnum> <value>\n");
return true;
}
int p1 = (int)atoi(argv[1]);
@@ -88,7 +88,7 @@ bool Console::Cmd_SetObj(int argc, const char **argv) {
bool Console::Cmd_RunOpcode(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: runopcode <name> <parameter0> ....\n");
+ debugPrintf("Usage: runopcode <name> <parameter0> ....\n");
return true;
}
@@ -96,7 +96,7 @@ bool Console::Cmd_RunOpcode(int argc, const char **argv) {
if (!strcmp(argv[1], logicNamesCmd[i].name)) {
uint8 p[16];
if ((argc - 2) != logicNamesCmd[i].argumentsLength()) {
- DebugPrintf("AGI command wants %d arguments\n", logicNamesCmd[i].argumentsLength());
+ debugPrintf("AGI command wants %d arguments\n", logicNamesCmd[i].argumentsLength());
return 0;
}
p[0] = argv[2] ? (char)strtoul(argv[2], NULL, 0) : 0;
@@ -113,7 +113,7 @@ bool Console::Cmd_RunOpcode(int argc, const char **argv) {
}
}
- DebugPrintf("Unknown opcode\n");
+ debugPrintf("Unknown opcode\n");
return true;
}
@@ -125,7 +125,7 @@ bool Console::Cmd_Agiver(int argc, const char **argv) {
maj = (ver >> 12) & 0xf;
min = ver & 0xfff;
- DebugPrintf(maj <= 2 ? "%x.%03x\n" : "%x.002.%03x\n", maj, min);
+ debugPrintf(maj <= 2 ? "%x.%03x\n" : "%x.002.%03x\n", maj, min);
return true;
}
@@ -133,17 +133,17 @@ bool Console::Cmd_Agiver(int argc, const char **argv) {
bool Console::Cmd_Flags(int argc, const char **argv) {
int i, j;
- DebugPrintf(" ");
+ debugPrintf(" ");
for (j = 0; j < 10; j++)
- DebugPrintf("%d ", j);
- DebugPrintf("\n");
+ debugPrintf("%d ", j);
+ debugPrintf("\n");
for (i = 0; i < 255;) {
- DebugPrintf("%3d ", i);
+ debugPrintf("%3d ", i);
for (j = 0; j < 10; j++, i++) {
- DebugPrintf("%c ", _vm->getflag(i) ? 'T' : 'F');
+ debugPrintf("%c ", _vm->getflag(i) ? 'T' : 'F');
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
return true;
@@ -154,9 +154,9 @@ bool Console::Cmd_Vars(int argc, const char **argv) {
for (i = 0; i < 255;) {
for (j = 0; j < 5; j++, i++) {
- DebugPrintf("%03d:%3d ", i, _vm->getvar(i));
+ debugPrintf("%03d:%3d ", i, _vm->getvar(i));
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
return true;
@@ -166,7 +166,7 @@ bool Console::Cmd_Objs(int argc, const char **argv) {
unsigned int i;
for (i = 0; i < _vm->_game.numObjects; i++) {
- DebugPrintf("%3d]%-24s(%3d)\n", i, _vm->objectName(i), _vm->objectGetLocation(i));
+ debugPrintf("%3d]%-24s(%3d)\n", i, _vm->objectName(i), _vm->objectGetLocation(i));
}
return true;
@@ -174,7 +174,7 @@ bool Console::Cmd_Objs(int argc, const char **argv) {
bool Console::Cmd_Opcode(int argc, const char **argv) {
if (argc != 2 || (strcmp(argv[1], "on") && strcmp(argv[1], "off"))) {
- DebugPrintf("Usage: opcode on|off\n");
+ debugPrintf("Usage: opcode on|off\n");
return true;
}
@@ -185,7 +185,7 @@ bool Console::Cmd_Opcode(int argc, const char **argv) {
bool Console::Cmd_Logic0(int argc, const char **argv) {
if (argc != 2 || (strcmp(argv[1], "on") && strcmp(argv[1], "off"))) {
- DebugPrintf("Usage: logic0 on|off\n");
+ debugPrintf("Usage: logic0 on|off\n");
return true;
}
@@ -196,7 +196,7 @@ bool Console::Cmd_Logic0(int argc, const char **argv) {
bool Console::Cmd_Trigger(int argc, const char **argv) {
if (argc != 2 || (strcmp(argv[1], "on") && strcmp(argv[1], "off"))) {
- DebugPrintf("Usage: trigger on|off\n");
+ debugPrintf("Usage: trigger on|off\n");
return true;
}
_vm->_debug.ignoretriggers = strcmp (argv[1], "on");
@@ -236,13 +236,13 @@ bool Console::Cmd_Room(int argc, const char **argv) {
_vm->newRoom(strtoul(argv[1], NULL, 0));
}
- DebugPrintf("Current room: %d\n", _vm->getvar(0));
+ debugPrintf("Current room: %d\n", _vm->getvar(0));
return true;
}
bool Console::Cmd_BT(int argc, const char **argv) {
- DebugPrintf("Current script: %d\nStack depth: %d\n", _vm->_game.lognum, _vm->_game.execStack.size());
+ debugPrintf("Current script: %d\nStack depth: %d\n", _vm->_game.lognum, _vm->_game.execStack.size());
uint8 *code = NULL;
uint8 op = 0;
@@ -257,12 +257,12 @@ bool Console::Cmd_BT(int argc, const char **argv) {
memmove(p, &code[it->curIP], num);
memset(p + num, 0, CMD_BSIZE - num);
- DebugPrintf("%d(%d): %s(", it->script, it->curIP, logicNamesCmd[op].name);
+ debugPrintf("%d(%d): %s(", it->script, it->curIP, logicNamesCmd[op].name);
for (int i = 0; i < num; i++)
- DebugPrintf("%d, ", p[i]);
+ debugPrintf("%d, ", p[i]);
- DebugPrintf(")\n");
+ debugPrintf(")\n");
}
return true;
@@ -287,7 +287,7 @@ bool MickeyConsole::Cmd_Room(int argc, const char **argv) {
bool MickeyConsole::Cmd_DrawPic(int argc, const char **argv) {
if (argc != 2)
- DebugPrintf("Usage: %s <Picture number>\n", argv[0]);
+ debugPrintf("Usage: %s <Picture number>\n", argv[0]);
else
_mickey->drawPic(atoi(argv[1]));
return true;
@@ -295,7 +295,7 @@ bool MickeyConsole::Cmd_DrawPic(int argc, const char **argv) {
bool MickeyConsole::Cmd_DrawObj(int argc, const char **argv) {
if (argc != 2)
- DebugPrintf("Usage: %s <Object number>\n", argv[0]);
+ debugPrintf("Usage: %s <Object number>\n", argv[0]);
else
_mickey->drawObj((ENUM_MSA_OBJECT)atoi(argv[1]), 0, 0);
return true;
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index 561b56d..4ca8d00 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -2228,10 +2228,10 @@ void MickeyEngine::waitAnyKey(bool anim) {
// Console-related functions
void MickeyEngine::debugCurRoom() {
- _console->DebugPrintf("Current Room = %d\n", _gameStateMickey.iRoom);
+ _console->debugPrintf("Current Room = %d\n", _gameStateMickey.iRoom);
if (_gameStateMickey.iRmObj[_gameStateMickey.iRoom] != IDI_MSA_OBJECT_NONE) {
- _console->DebugPrintf("Object %d is in the room\n", _gameStateMickey.iRmObj[_gameStateMickey.iRoom]);
+ _console->debugPrintf("Object %d is in the room\n", _gameStateMickey.iRmObj[_gameStateMickey.iRoom]);
}
}
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index d5ae0b5..a91ad24 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -1308,7 +1308,7 @@ void WinnieEngine::printStrWinnie(char *szMsg) {
// Console-related functions
void WinnieEngine::debugCurRoom() {
- _console->DebugPrintf("Current Room = %d\n", _room);
+ _console->debugPrintf("Current Room = %d\n", _room);
}
WinnieEngine::WinnieEngine(OSystem *syst, const AGIGameDescription *gameDesc) : PreAgiEngine(syst, gameDesc) {
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp
index b5233be..99ea8a1 100644
--- a/engines/agos/debugger.cpp
+++ b/engines/agos/debugger.cpp
@@ -60,9 +60,9 @@ bool Debugger::Cmd_PlayMusic(int argc, const char **argv) {
_vm->playMusic(music, 0);
}
} else
- DebugPrintf("Music out of range (0 - %d)\n", _vm->_numMusic);
+ debugPrintf("Music out of range (0 - %d)\n", _vm->_numMusic);
} else
- DebugPrintf("Syntax: music <musicnum>\n");
+ debugPrintf("Syntax: music <musicnum>\n");
return true;
}
@@ -73,9 +73,9 @@ bool Debugger::Cmd_PlaySound(int argc, const char **argv) {
if (sound <= _vm->_numSFX)
_vm->_sound->playEffects(sound);
else
- DebugPrintf("Sound out of range (0 - %d)\n", _vm->_numSFX);
+ debugPrintf("Sound out of range (0 - %d)\n", _vm->_numSFX);
} else
- DebugPrintf("Syntax: sound <soundnum>\n");
+ debugPrintf("Syntax: sound <soundnum>\n");
return true;
}
@@ -86,9 +86,9 @@ bool Debugger::Cmd_PlayVoice(int argc, const char **argv) {
if (voice <= _vm->_numSpeech)
_vm->_sound->playVoice(voice);
else
- DebugPrintf("Voice out of range (0 - %d)\n", _vm->_numSpeech);
+ debugPrintf("Voice out of range (0 - %d)\n", _vm->_numSpeech);
} else
- DebugPrintf("Syntax: voice <voicenum>\n");
+ debugPrintf("Syntax: voice <voicenum>\n");
return true;
}
@@ -100,15 +100,15 @@ bool Debugger::Cmd_SetBit(int argc, const char **argv) {
value = atoi(argv[2]);
if (value <= 1) {
_vm->setBitFlag(bit, value != 0);
- DebugPrintf("Set bit %d to %d\n", bit, value);
+ debugPrintf("Set bit %d to %d\n", bit, value);
} else
- DebugPrintf("Bit value out of range (0 - 1)\n");
+ debugPrintf("Bit value out of range (0 - 1)\n");
} else if (argc > 1) {
bit = atoi(argv[1]);
value = _vm->getBitFlag(bit);
- DebugPrintf("Bit %d is %d\n", bit, value);
+ debugPrintf("Bit %d is %d\n", bit, value);
} else
- DebugPrintf("Syntax: bit <bitnum> <value>\n");
+ debugPrintf("Syntax: bit <bitnum> <value>\n");
return true;
}
@@ -120,18 +120,18 @@ bool Debugger::Cmd_SetBit2(int argc, const char **argv) {
value = atoi(argv[2]);
if (value == 0) {
_vm->_bitArrayTwo[bit / 16] &= ~(1 << (bit & 15));
- DebugPrintf("Set bit2 %d to %d\n", bit, value);
+ debugPrintf("Set bit2 %d to %d\n", bit, value);
} else if (value == 1) {
_vm->_bitArrayTwo[bit / 16] |= (1 << (bit & 15));
- DebugPrintf("Set bit2 %d to %d\n", bit, value);
+ debugPrintf("Set bit2 %d to %d\n", bit, value);
} else
- DebugPrintf("Bit2 value out of range (0 - 1)\n");
+ debugPrintf("Bit2 value out of range (0 - 1)\n");
} else if (argc > 1) {
bit = atoi(argv[1]);
value = (_vm->_bitArrayTwo[bit / 16] & (1 << (bit & 15))) != 0;
- DebugPrintf("Bit2 %d is %d\n", bit, value);
+ debugPrintf("Bit2 %d is %d\n", bit, value);
} else
- DebugPrintf("Syntax: bit2 <bitnum> <value>\n");
+ debugPrintf("Syntax: bit2 <bitnum> <value>\n");
return true;
}
@@ -143,18 +143,18 @@ bool Debugger::Cmd_SetBit3(int argc, const char **argv) {
value = atoi(argv[2]);
if (value == 0) {
_vm->_bitArrayThree[bit / 16] &= ~(1 << (bit & 15));
- DebugPrintf("Set bit3 %d to %d\n", bit, value);
+ debugPrintf("Set bit3 %d to %d\n", bit, value);
} else if (value == 1) {
_vm->_bitArrayThree[bit / 16] |= (1 << (bit & 15));
- DebugPrintf("Set bit3 %d to %d\n", bit, value);
+ debugPrintf("Set bit3 %d to %d\n", bit, value);
} else
- DebugPrintf("Bit3 value out of range (0 - 1)\n");
+ debugPrintf("Bit3 value out of range (0 - 1)\n");
} else if (argc > 1) {
bit = atoi(argv[1]);
value = (_vm->_bitArrayThree[bit / 16] & (1 << (bit & 15))) != 0;
- DebugPrintf("Bit3 %d is %d\n", bit, value);
+ debugPrintf("Bit3 %d is %d\n", bit, value);
} else
- DebugPrintf("Syntax: bit3 <bitnum> <value>\n");
+ debugPrintf("Syntax: bit3 <bitnum> <value>\n");
return true;
}
@@ -167,15 +167,15 @@ bool Debugger::Cmd_SetVar(int argc, const char **argv) {
if (argc > 2) {
value = atoi(argv[2]);
_vm->writeVariable(var, value);
- DebugPrintf("Set var %d to %d\n", var, value);
+ debugPrintf("Set var %d to %d\n", var, value);
} else {
value = _vm->readVariable(var);
- DebugPrintf("Var %d is %d\n", var, value);
+ debugPrintf("Var %d is %d\n", var, value);
}
} else
- DebugPrintf("Var out of range (0 - %d)\n", _vm->_numVars - 1);
+ debugPrintf("Var out of range (0 - %d)\n", _vm->_numVars - 1);
} else
- DebugPrintf("Syntax: var <varnum> <value>\n");
+ debugPrintf("Syntax: var <varnum> <value>\n");
return true;
}
@@ -194,22 +194,22 @@ bool Debugger::Cmd_SetObjectFlag(int argc, const char **argv) {
if (argc > 3) {
value = atoi(argv[3]);
o->objectFlagValue[offs] = value;
- DebugPrintf("Object %d Flag %d set to %d\n", obj, prop, value);
+ debugPrintf("Object %d Flag %d set to %d\n", obj, prop, value);
} else {
value = o->objectFlagValue[offs];
- DebugPrintf("Object %d Flag %d is %d\n", obj, prop, value);
+ debugPrintf("Object %d Flag %d is %d\n", obj, prop, value);
}
} else {
- DebugPrintf("Object flag out of range\n");
+ debugPrintf("Object flag out of range\n");
}
} else {
- DebugPrintf("Item isn't an object\n");
+ debugPrintf("Item isn't an object\n");
}
} else {
- DebugPrintf("Item out of range (1 - %d)\n", _vm->_itemArraySize - 1);
+ debugPrintf("Item out of range (1 - %d)\n", _vm->_itemArraySize - 1);
}
} else {
- DebugPrintf("Syntax: obj <itemnum> <flag> <value>\n");
+ debugPrintf("Syntax: obj <itemnum> <flag> <value>\n");
}
return true;
@@ -223,7 +223,7 @@ bool Debugger::Cmd_StartSubroutine(int argc, const char **argv) {
if (sub != NULL)
_vm->startSubroutine(sub);
} else
- DebugPrintf("Subroutine %d\n", _vm->_currentTable->id);
+ debugPrintf("Subroutine %d\n", _vm->_currentTable->id);
return true;
}
@@ -236,11 +236,11 @@ bool Debugger::Cmd_dumpImage(int argc, const char **argv) {
if (vpe->vgaFile2 != NULL) {
_vm->dumpVgaBitmaps(zoneNum);
} else {
- DebugPrintf("Invalid Zone Number %d\n", zoneNum);
+ debugPrintf("Invalid Zone Number %d\n", zoneNum);
}
} else
- DebugPrintf("Syntax: dumpimage <zonenum>\n");
+ debugPrintf("Syntax: dumpimage <zonenum>\n");
return true;
}
@@ -253,11 +253,11 @@ bool Debugger::Cmd_dumpScript(int argc, const char **argv) {
if (vpe->vgaFile1 != NULL) {
_vm->dumpVgaFile(vpe->vgaFile1);
} else {
- DebugPrintf("Invalid Zone Number %d\n", zoneNum);
+ debugPrintf("Invalid Zone Number %d\n", zoneNum);
}
} else
- DebugPrintf("Syntax: dumpscript <zonenum>\n");
+ debugPrintf("Syntax: dumpscript <zonenum>\n");
return true;
}
diff --git a/engines/avalanche/console.cpp b/engines/avalanche/console.cpp
index 29ae5cf..639ad63 100644
--- a/engines/avalanche/console.cpp
+++ b/engines/avalanche/console.cpp
@@ -42,7 +42,7 @@ AvalancheConsole::~AvalancheConsole() {
*/
bool AvalancheConsole::Cmd_MagicLines(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
diff --git a/engines/cge/console.cpp b/engines/cge/console.cpp
index 447875c..3d281df 100644
--- a/engines/cge/console.cpp
+++ b/engines/cge/console.cpp
@@ -37,7 +37,7 @@ CGEConsole::~CGEConsole() {
*/
bool CGEConsole::Cmd_boundaries(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
diff --git a/engines/cruise/debugger.cpp b/engines/cruise/debugger.cpp
index 4ef66ee..0bda44d 100644
--- a/engines/cruise/debugger.cpp
+++ b/engines/cruise/debugger.cpp
@@ -70,7 +70,7 @@ bool Debugger::cmd_hotspots(int argc, const char **argv) {
if (*pObjectName) {
getMultipleObjectParam(currentObject->overlay, currentObject->idx, ¶ms);
- DebugPrintf("%s %s - %d,%d\n", pObjectName, pObjType, params.X, params.Y);
+ debugPrintf("%s %s - %d,%d\n", pObjectName, pObjType, params.X, params.Y);
}
}
@@ -96,7 +96,7 @@ bool Debugger::cmd_items(int argc, const char **argv) {
getSingleObjectParam(i, j, 5, &returnVar);
if (returnVar < -1)
- DebugPrintf("%s\n", getObjectName(j, pOvlData->arrayNameObj));
+ debugPrintf("%s\n", getObjectName(j, pOvlData->arrayNameObj));
}
}
}
diff --git a/engines/drascula/console.cpp b/engines/drascula/console.cpp
index 50e96c8..4c14fb7 100644
--- a/engines/drascula/console.cpp
+++ b/engines/drascula/console.cpp
@@ -35,7 +35,7 @@ Console::~Console() {
bool Console::Cmd_Room(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: room <number>\n");
+ debugPrintf("Usage: room <number>\n");
return true;
}
diff --git a/engines/fullpipe/console.cpp b/engines/fullpipe/console.cpp
index cb76345..3ff84da 100644
--- a/engines/fullpipe/console.cpp
+++ b/engines/fullpipe/console.cpp
@@ -34,8 +34,8 @@ Console::Console(FullpipeEngine *vm) : GUI::Debugger(), _vm(vm) {
bool Console::Cmd_Scene(int argc, const char **argv) {
if (argc != 2) {
int sceneTag = _vm->_currentScene->_sceneId;
- DebugPrintf("Current scene: %d (scene tag: %d)\n", _vm->getSceneFromTag(sceneTag), sceneTag);
- DebugPrintf("Use %s <scene> to change the current scene\n", argv[0]);
+ debugPrintf("Current scene: %d (scene tag: %d)\n", _vm->getSceneFromTag(sceneTag), sceneTag);
+ debugPrintf("Use %s <scene> to change the current scene\n", argv[0]);
return true;
} else {
int scene = _vm->convertScene(atoi(argv[1]));
diff --git a/engines/gob/cheater_geisha.cpp b/engines/gob/cheater_geisha.cpp
index 8c4deec..ec6fe09 100644
--- a/engines/gob/cheater_geisha.cpp
+++ b/engines/gob/cheater_geisha.cpp
@@ -61,7 +61,7 @@ bool Cheater_Geisha::cheat(GUI::Debugger &console) {
uint32 digit5 = READ_VARO_UINT32(0x778);
if (digit1 && digit2 && digit3 && digit4 && digit5)
- console.DebugPrintf("Mastermind solution: %d %d %d %d %d\n",
+ console.debugPrintf("Mastermind solution: %d %d %d %d %d\n",
digit1, digit2, digit3, digit4, digit5);
return true;
diff --git a/engines/gob/console.cpp b/engines/gob/console.cpp
index b0f6006..303c59c 100644
--- a/engines/gob/console.cpp
+++ b/engines/gob/console.cpp
@@ -51,7 +51,7 @@ void GobConsole::unregisterCheater() {
}
bool GobConsole::cmd_varSize(int argc, const char **argv) {
- DebugPrintf("Size of the variable space: %d bytes\n", _vm->_inter->_variables->getSize());
+ debugPrintf("Size of the variable space: %d bytes\n", _vm->_inter->_variables->getSize());
return true;
}
@@ -74,14 +74,14 @@ bool GobConsole::cmd_dumpVars(int argc, const char **argv) {
bool GobConsole::cmd_var8(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: var8 <var offset> (<value>)\n");
+ debugPrintf("Usage: var8 <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if (varNum >= _vm->_inter->_variables->getSize()) {
- DebugPrintf("Variable offset out of range\n");
+ debugPrintf("Variable offset out of range\n");
return true;
}
@@ -90,21 +90,21 @@ bool GobConsole::cmd_var8(int argc, const char **argv) {
_vm->_inter->_variables->writeOff8(varNum, varVal);
}
- DebugPrintf("var8_%d = %d\n", varNum, _vm->_inter->_variables->readOff8(varNum));
+ debugPrintf("var8_%d = %d\n", varNum, _vm->_inter->_variables->readOff8(varNum));
return true;
}
bool GobConsole::cmd_var16(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: var16 <var offset> (<value>)\n");
+ debugPrintf("Usage: var16 <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if ((varNum + 1) >= _vm->_inter->_variables->getSize()) {
- DebugPrintf("Variable offset out of range\n");
+ debugPrintf("Variable offset out of range\n");
return true;
}
@@ -113,21 +113,21 @@ bool GobConsole::cmd_var16(int argc, const char **argv) {
_vm->_inter->_variables->writeOff16(varNum, varVal);
}
- DebugPrintf("var16_%d = %d\n", varNum, _vm->_inter->_variables->readOff16(varNum));
+ debugPrintf("var16_%d = %d\n", varNum, _vm->_inter->_variables->readOff16(varNum));
return true;
}
bool GobConsole::cmd_var32(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: var32 <var offset> (<value>)\n");
+ debugPrintf("Usage: var32 <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if ((varNum + 3) >= _vm->_inter->_variables->getSize()) {
- DebugPrintf("Variable offset out of range\n");
+ debugPrintf("Variable offset out of range\n");
return true;
}
@@ -136,21 +136,21 @@ bool GobConsole::cmd_var32(int argc, const char **argv) {
_vm->_inter->_variables->writeOff32(varNum, varVal);
}
- DebugPrintf("var8_%d = %d\n", varNum, _vm->_inter->_variables->readOff32(varNum));
+ debugPrintf("var8_%d = %d\n", varNum, _vm->_inter->_variables->readOff32(varNum));
return true;
}
bool GobConsole::cmd_varString(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: varString <var offset> (<value>)\n");
+ debugPrintf("Usage: varString <var offset> (<value>)\n");
return true;
}
uint32 varNum = atoi(argv[1]);
if (varNum >= _vm->_inter->_variables->getSize()) {
- DebugPrintf("Variable offset out of range\n");
+ debugPrintf("Variable offset out of range\n");
return true;
}
@@ -160,7 +160,7 @@ bool GobConsole::cmd_varString(int argc, const char **argv) {
Common::strlcpy(_vm->_inter->_variables->getAddressOffString(varNum), argv[2], maxLength);
}
- DebugPrintf("varString_%d = \"%s\"\n", varNum, _vm->_inter->_variables->getAddressOffString(varNum));
+ debugPrintf("varString_%d = \"%s\"\n", varNum, _vm->_inter->_variables->getAddressOffString(varNum));
return true;
}
@@ -177,11 +177,11 @@ bool GobConsole::cmd_listArchives(int argc, const char **argv) {
_vm->_dataIO->getArchiveInfo(info);
- DebugPrintf(" Archive | Base | FileCount\n");
- DebugPrintf("--------------------------------\n");
+ debugPrintf(" Archive | Base | FileCount\n");
+ debugPrintf("--------------------------------\n");
for (Common::Array<ArchiveInfo>::const_iterator it = info.begin(); it != info.end(); ++it)
if (!it->name.empty())
- DebugPrintf("%13s | %d | %d\n", it->name.c_str(), it->base, it->fileCount);
+ debugPrintf("%13s | %d | %d\n", it->name.c_str(), it->base, it->fileCount);
return true;
}
diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp
index 8103e4f..85b9b87 100644
--- a/engines/groovie/debug.cpp
+++ b/engines/groovie/debug.cpp
@@ -81,7 +81,7 @@ bool Debugger::cmd_pc(int argc, const char **argv) {
int val = getNumber(argv[1]);
_script->_currentInstruction = val;
}
- DebugPrintf("pc = 0x%04X (%d)\n", _script->_currentInstruction, _script->_currentInstruction);
+ debugPrintf("pc = 0x%04X (%d)\n", _script->_currentInstruction, _script->_currentInstruction);
return true;
}
@@ -97,9 +97,9 @@ bool Debugger::cmd_mem(int argc, const char **argv) {
// Get
val = _script->_variables[pos];
}
- DebugPrintf("mem[0x%04X] = 0x%02X\n", pos, val);
+ debugPrintf("mem[0x%04X] = 0x%02X\n", pos, val);
} else {
- DebugPrintf("Syntax: mem <addr> [<val>]\n");
+ debugPrintf("Syntax: mem <addr> [<val>]\n");
}
return true;
}
@@ -109,7 +109,7 @@ bool Debugger::cmd_loadgame(int argc, const char **argv) {
int slot = getNumber(argv[1]);
_script->loadgame(slot);
} else {
- DebugPrintf("Syntax: load <slot>\n");
+ debugPrintf("Syntax: load <slot>\n");
}
return true;
}
@@ -119,7 +119,7 @@ bool Debugger::cmd_savegame(int argc, const char **argv) {
int slot = getNumber(argv[1]);
_script->savegame(slot);
} else {
- DebugPrintf("Syntax: save <slot>\n");
+ debugPrintf("Syntax: save <slot>\n");
}
return true;
}
@@ -129,7 +129,7 @@ bool Debugger::cmd_playref(int argc, const char **argv) {
int ref = getNumber(argv[1]);
_script->playvideofromref(ref);
} else {
- DebugPrintf("Syntax: playref <videorefnum>\n");
+ debugPrintf("Syntax: playref <videorefnum>\n");
}
return true;
}
@@ -140,7 +140,7 @@ bool Debugger::cmd_dumppal(int argc, const char **argv) {
_vm->_system->getPaletteManager()->grabPalette(palettedump, 0, 256);
for (i = 0; i < 256; i++) {
- DebugPrintf("%3d: %3d,%3d,%3d\n", i, palettedump[(i * 3)], palettedump[(i * 3) + 1], palettedump[(i * 3) + 2]);
+ debugPrintf("%3d: %3d,%3d,%3d\n", i, palettedump[(i * 3)], palettedump[(i * 3) + 1], palettedump[(i * 3) + 2]);
}
return true;
}
diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp
index 14b1c18..e5c1984 100644
--- a/engines/hopkins/debugger.cpp
+++ b/engines/hopkins/debugger.cpp
@@ -41,7 +41,7 @@ Debugger::Debugger(HopkinsEngine *vm) : GUI::Debugger() {
// Turns dirty rects on or off
bool Debugger::cmd_DirtyRects(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("%s: [on | off]\n", argv[0]);
+ debugPrintf("%s: [on | off]\n", argv[0]);
return true;
} else {
_vm->_graphicsMan->_showDirtyRects = !strcmp(argv[1], "on");
@@ -52,7 +52,7 @@ bool Debugger::cmd_DirtyRects(int argc, const char **argv) {
// Change room number
bool Debugger::cmd_Teleport(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("%s: [Room number]\n", argv[0]);
+ debugPrintf("%s: [Room number]\n", argv[0]);
return true;
} else {
_vm->_globals->_exitId = atoi(argv[1]);
@@ -62,13 +62,13 @@ bool Debugger::cmd_Teleport(int argc, const char **argv) {
// Display room number
bool Debugger::cmd_ShowCurrentRoom(int argc, const char **argv) {
- DebugPrintf("Current room: %d\n", _vm->_globals->_curRoomNum);
+ debugPrintf("Current room: %d\n", _vm->_globals->_curRoomNum);
return true;
}
bool Debugger::cmd_Zones(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("%s: [on | off]\n", argv[0]);
+ debugPrintf("%s: [on | off]\n", argv[0]);
return true;
} else {
_vm->_graphicsMan->_showZones = !strcmp(argv[1], "on");
@@ -78,7 +78,7 @@ if (argc != 2) {
bool Debugger::cmd_Lines(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("%s: [on | off]\n", argv[0]);
+ debugPrintf("%s: [on | off]\n", argv[0]);
return true;
} else {
_vm->_graphicsMan->_showLines = !strcmp(argv[1], "on");
diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 56025bf..529fa4f 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -62,7 +62,7 @@ static int strToInt(const char *s) {
*/
bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
if ((argc != 2) || (strToInt(argv[1]) > _vm->_numScreens)){
- DebugPrintf("Usage: %s <screen number>\n", argv[0]);
+ debugPrintf("Usage: %s <screen number>\n", argv[0]);
return true;
}
@@ -75,13 +75,13 @@ bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
*/
bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
- DebugPrintf("Available screens for this game are:\n");
+ debugPrintf("Available screens for this game are:\n");
for (int i = 0; i < _vm->_numScreens; i++)
- DebugPrintf("%2d - %s\n", i, _vm->_text->getScreenNames(i));
+ debugPrintf("%2d - %s\n", i, _vm->_text->getScreenNames(i));
return true;
}
@@ -90,14 +90,14 @@ bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
*/
bool HugoConsole::Cmd_listObjects(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
- DebugPrintf("Available objects for this game are:\n");
+ debugPrintf("Available objects for this game are:\n");
for (int i = 0; i < _vm->_object->_numObj; i++) {
if (_vm->_object->_objects[i]._genericCmd & TAKE)
- DebugPrintf("%2d - %s\n", i, _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 2));
+ debugPrintf("%2d - %s\n", i, _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 2));
}
return true;
}
@@ -107,14 +107,14 @@ bool HugoConsole::Cmd_listObjects(int argc, const char **argv) {
*/
bool HugoConsole::Cmd_getObject(int argc, const char **argv) {
if ((argc != 2) || (strToInt(argv[1]) > _vm->_object->_numObj)) {
- DebugPrintf("Usage: %s <object number>\n", argv[0]);
+ debugPrintf("Usage: %s <object number>\n", argv[0]);
return true;
}
if (_vm->_object->_objects[strToInt(argv[1])]._genericCmd & TAKE)
_vm->_parser->takeObject(&_vm->_object->_objects[strToInt(argv[1])]);
else
- DebugPrintf("Object not available\n");
+ debugPrintf("Object not available\n");
return true;
}
@@ -124,7 +124,7 @@ bool HugoConsole::Cmd_getObject(int argc, const char **argv) {
*/
bool HugoConsole::Cmd_getAllObjects(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
@@ -141,7 +141,7 @@ bool HugoConsole::Cmd_getAllObjects(int argc, const char **argv) {
*/
bool HugoConsole::Cmd_boundaries(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index e4806af..598eb1c 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -59,10 +59,10 @@ bool Debugger::cmd_setScreenDebug(int argc, const char **argv) {
else if (scumm_stricmp(argv[1], "disable") == 0)
_vm->screen()->enableScreenDebug(false);
else
- DebugPrintf("Use screen_debug_mode <enable/disable> to enable or disable it.\n");
+ debugPrintf("Use screen_debug_mode <enable/disable> to enable or disable it.\n");
} else {
- DebugPrintf("Screen debug mode is %s.\n", (_vm->screen()->queryScreenDebug() ? "enabled" : "disabled"));
- DebugPrintf("Use screen_debug_mode <enable/disable> to enable or disable it.\n");
+ debugPrintf("Screen debug mode is %s.\n", (_vm->screen()->queryScreenDebug() ? "enabled" : "disabled"));
+ debugPrintf("Use screen_debug_mode <enable/disable> to enable or disable it.\n");
}
return true;
}
@@ -71,14 +71,14 @@ bool Debugger::cmd_loadPalette(int argc, const char **argv) {
Palette palette(_vm->screen()->getPalette(0).getNumColors());
if (argc <= 1) {
- DebugPrintf("Use load_palette <file> [start_col] [end_col]\n");
+ debugPrintf("Use load_palette <file> [start_col] [end_col]\n");
return true;
}
if (_vm->game() != GI_KYRA1 && _vm->resource()->getFileSize(argv[1]) != 768) {
uint8 *buffer = new uint8[320 * 200 * sizeof(uint8)];
if (!buffer) {
- DebugPrintf("ERROR: Cannot allocate buffer for screen region!\n");
+ debugPrintf("ERROR: Cannot allocate buffer for screen region!\n");
return true;
}
@@ -89,7 +89,7 @@ bool Debugger::cmd_loadPalette(int argc, const char **argv) {
delete[] buffer;
} else if (!_vm->screen()->loadPalette(argv[1], palette)) {
- DebugPrintf("ERROR: Palette '%s' not found!\n", argv[1]);
+ debugPrintf("ERROR: Palette '%s' not found!\n", argv[1]);
return true;
}
@@ -112,12 +112,12 @@ bool Debugger::cmd_loadPalette(int argc, const char **argv) {
}
bool Debugger::cmd_showFacings(int argc, const char **argv) {
- DebugPrintf("Facing directions:\n");
- DebugPrintf("7 0 1\n");
- DebugPrintf(" \\ | / \n");
- DebugPrintf("6--*--2\n");
- DebugPrintf(" / | \\\n");
- DebugPrintf("5 4 3\n");
+ debugPrintf("Facing directions:\n");
+ debugPrintf("7 0 1\n");
+ debugPrintf(" \\ | / \n");
+ debugPrintf("6--*--2\n");
+ debugPrintf(" / | \\\n");
+ debugPrintf("5 4 3\n");
return true;
}
@@ -126,13 +126,13 @@ bool Debugger::cmd_gameSpeed(int argc, const char **argv) {
int val = atoi(argv[1]);
if (val < 1 || val > 1000) {
- DebugPrintf("speed must lie between 1 and 1000 (default: 60)\n");
+ debugPrintf("speed must lie between 1 and 1000 (default: 60)\n");
return true;
}
_vm->_tickLength = (uint8)(1000.0 / val);
} else {
- DebugPrintf("Syntax: gamespeed <value>\n");
+ debugPrintf("Syntax: gamespeed <value>\n");
}
return true;
@@ -140,13 +140,13 @@ bool Debugger::cmd_gameSpeed(int argc, const char **argv) {
bool Debugger::cmd_listFlags(int argc, const char **argv) {
for (int i = 0, p = 0; i < (int)sizeof(_vm->_flagsTable) * 8; i++, ++p) {
- DebugPrintf("(%-3i): %-2i", i, _vm->queryGameFlag(i));
+ debugPrintf("(%-3i): %-2i", i, _vm->queryGameFlag(i));
if (p == 5) {
- DebugPrintf("\n");
+ debugPrintf("\n");
p -= 6;
}
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -157,9 +157,9 @@ bool Debugger::cmd_toggleFlag(int argc, const char **argv) {
_vm->resetGameFlag(flag);
else
_vm->setGameFlag(flag);
- DebugPrintf("Flag %i is now %i\n", flag, _vm->queryGameFlag(flag));
+ debugPrintf("Flag %i is now %i\n", flag, _vm->queryGameFlag(flag));
} else {
- DebugPrintf("Syntax: toggleflag <flag>\n");
+ debugPrintf("Syntax: toggleflag <flag>\n");
}
return true;
@@ -168,18 +168,18 @@ bool Debugger::cmd_toggleFlag(int argc, const char **argv) {
bool Debugger::cmd_queryFlag(int argc, const char **argv) {
if (argc > 1) {
uint flag = atoi(argv[1]);
- DebugPrintf("Flag %i is %i\n", flag, _vm->queryGameFlag(flag));
+ debugPrintf("Flag %i is %i\n", flag, _vm->queryGameFlag(flag));
} else {
- DebugPrintf("Syntax: queryflag <flag>\n");
+ debugPrintf("Syntax: queryflag <flag>\n");
}
return true;
}
bool Debugger::cmd_listTimers(int argc, const char **argv) {
- DebugPrintf("Current time: %-8u\n", g_system->getMillis());
+ debugPrintf("Current time: %-8u\n", g_system->getMillis());
for (int i = 0; i < _vm->timer()->count(); i++)
- DebugPrintf("Timer %-2i: Active: %-3s Countdown: %-6i %-8u\n", i, _vm->timer()->isEnabled(i) ? "Yes" : "No", _vm->timer()->getDelay(i), _vm->timer()->getNextRun(i));
+ debugPrintf("Timer %-2i: Active: %-3s Countdown: %-6i %-8u\n", i, _vm->timer()->isEnabled(i) ? "Yes" : "No", _vm->timer()->getDelay(i), _vm->timer()->getNextRun(i));
return true;
}
@@ -189,9 +189,9 @@ bool Debugger::cmd_setTimerCountdown(int argc, const char **argv) {
uint timer = atoi(argv[1]);
uint countdown = atoi(argv[2]);
_vm->timer()->setCountdown(timer, countdown);
- DebugPrintf("Timer %i now has countdown %i\n", timer, _vm->timer()->getDelay(timer));
+ debugPrintf("Timer %i now has countdown %i\n", timer, _vm->timer()->getDelay(timer));
} else {
- DebugPrintf("Syntax: settimercountdown <timer> <countdown>\n");
+ debugPrintf("Syntax: settimercountdown <timer> <countdown>\n");
}
return true;
@@ -218,7 +218,7 @@ bool Debugger_LoK::cmd_enterRoom(int argc, const char **argv) {
// game will crash if entering a non-existent room
if (room >= _vm->_roomTableSize) {
- DebugPrintf("room number must be any value between (including) 0 and %d\n", _vm->_roomTableSize - 1);
+ debugPrintf("room number must be any value between (including) 0 and %d\n", _vm->_roomTableSize - 1);
return true;
}
@@ -246,18 +246,18 @@ bool Debugger_LoK::cmd_enterRoom(int argc, const char **argv) {
return false;
}
- DebugPrintf("Syntax: room <roomnum> <direction>\n");
+ debugPrintf("Syntax: room <roomnum> <direction>\n");
return true;
}
bool Debugger_LoK::cmd_listScenes(int argc, const char **argv) {
for (int i = 0; i < _vm->_roomTableSize; i++) {
- DebugPrintf("%-3i: %-10s", i, _vm->_roomFilenameTable[_vm->_roomTable[i].nameIndex]);
+ debugPrintf("%-3i: %-10s", i, _vm->_roomFilenameTable[_vm->_roomTable[i].nameIndex]);
if (!(i % 8))
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf("\n");
- DebugPrintf("Current room: %i\n", _vm->_currentRoom);
+ debugPrintf("\n");
+ debugPrintf("Current room: %i\n", _vm->_currentRoom);
return true;
}
@@ -267,23 +267,23 @@ bool Debugger_LoK::cmd_giveItem(int argc, const char **argv) {
// Kyrandia 1 has only 108 items (-1 to 106), otherwise it will crash
if (item < -1 || item > 106) {
- DebugPrintf("'itemid' must be any value between (including) -1 and 106\n");
+ debugPrintf("'itemid' must be any value between (including) -1 and 106\n");
return true;
}
_vm->setMouseItem(item);
_vm->_itemInHand = item;
} else {
- DebugPrintf("Syntax: give <itemid>\n");
+ debugPrintf("Syntax: give <itemid>\n");
}
return true;
}
bool Debugger_LoK::cmd_listBirthstones(int argc, const char **argv) {
- DebugPrintf("Needed birthstone gems:\n");
+ debugPrintf("Needed birthstone gems:\n");
for (int i = 0; i < ARRAYSIZE(_vm->_birthstoneGemTable); ++i)
- DebugPrintf("%-3d '%s'\n", _vm->_birthstoneGemTable[i], _vm->_itemList[_vm->_birthstoneGemTable[i]]);
+ debugPrintf("%-3d '%s'\n", _vm->_birthstoneGemTable[i], _vm->_itemList[_vm->_birthstoneGemTable[i]]);
return true;
}
@@ -309,7 +309,7 @@ bool Debugger_v2::cmd_enterScene(int argc, const char **argv) {
// game will crash if entering a non-existent scene
if (scene >= _vm->_sceneListSize) {
- DebugPrintf("scene number must be any value between (including) 0 and %d\n", _vm->_sceneListSize - 1);
+ debugPrintf("scene number must be any value between (including) 0 and %d\n", _vm->_sceneListSize - 1);
return true;
}
@@ -337,7 +337,7 @@ bool Debugger_v2::cmd_enterScene(int argc, const char **argv) {
return false;
}
- DebugPrintf("Syntax: %s <scenenum> <direction>\n", argv[0]);
+ debugPrintf("Syntax: %s <scenenum> <direction>\n", argv[0]);
return true;
}
@@ -345,32 +345,32 @@ bool Debugger_v2::cmd_listScenes(int argc, const char **argv) {
int shown = 1;
for (int i = 0; i < _vm->_sceneListSize; ++i) {
if (_vm->_sceneList[i].filename1[0]) {
- DebugPrintf("%-2i: %-10s", i, _vm->_sceneList[i].filename1);
+ debugPrintf("%-2i: %-10s", i, _vm->_sceneList[i].filename1);
if (!(shown % 5))
- DebugPrintf("\n");
+ debugPrintf("\n");
++shown;
}
}
- DebugPrintf("\n");
- DebugPrintf("Current scene: %i\n", _vm->_currentScene);
+ debugPrintf("\n");
+ debugPrintf("Current scene: %i\n", _vm->_currentScene);
return true;
}
bool Debugger_v2::cmd_sceneInfo(int argc, const char **argv) {
- DebugPrintf("Current scene: %d '%s'\n", _vm->_currentScene, _vm->_sceneList[_vm->_currentScene].filename1);
- DebugPrintf("\n");
- DebugPrintf("Exit information:\n");
- DebugPrintf("Exit1: leads to %d, position %dx%d\n", int16(_vm->_sceneExit1), _vm->_sceneEnterX1, _vm->_sceneEnterY1);
- DebugPrintf("Exit2: leads to %d, position %dx%d\n", int16(_vm->_sceneExit2), _vm->_sceneEnterX2, _vm->_sceneEnterY2);
- DebugPrintf("Exit3: leads to %d, position %dx%d\n", int16(_vm->_sceneExit3), _vm->_sceneEnterX3, _vm->_sceneEnterY3);
- DebugPrintf("Exit4: leads to %d, position %dx%d\n", int16(_vm->_sceneExit4), _vm->_sceneEnterX4, _vm->_sceneEnterY4);
- DebugPrintf("Special exit information:\n");
+ debugPrintf("Current scene: %d '%s'\n", _vm->_currentScene, _vm->_sceneList[_vm->_currentScene].filename1);
+ debugPrintf("\n");
+ debugPrintf("Exit information:\n");
+ debugPrintf("Exit1: leads to %d, position %dx%d\n", int16(_vm->_sceneExit1), _vm->_sceneEnterX1, _vm->_sceneEnterY1);
+ debugPrintf("Exit2: leads to %d, position %dx%d\n", int16(_vm->_sceneExit2), _vm->_sceneEnterX2, _vm->_sceneEnterY2);
+ debugPrintf("Exit3: leads to %d, position %dx%d\n", int16(_vm->_sceneExit3), _vm->_sceneEnterX3, _vm->_sceneEnterY3);
+ debugPrintf("Exit4: leads to %d, position %dx%d\n", int16(_vm->_sceneExit4), _vm->_sceneEnterX4, _vm->_sceneEnterY4);
+ debugPrintf("Special exit information:\n");
if (!_vm->_specialExitCount) {
- DebugPrintf("No special exits.\n");
+ debugPrintf("No special exits.\n");
} else {
- DebugPrintf("This scene has %d special exits.\n", _vm->_specialExitCount);
+ debugPrintf("This scene has %d special exits.\n", _vm->_specialExitCount);
for (int i = 0; i < _vm->_specialExitCount; ++i) {
- DebugPrintf("SpecialExit%d: facing %d, position (x1/y1/x2/y2): %d/%d/%d/%d\n", i,
+ debugPrintf("SpecialExit%d: facing %d, position (x1/y1/x2/y2): %d/%d/%d/%d\n", i,
_vm->_specialExitTable[20 + i], _vm->_specialExitTable[0 + i], _vm->_specialExitTable[5 + i],
_vm->_specialExitTable[10 + i], _vm->_specialExitTable[15 + i]);
}
@@ -380,14 +380,14 @@ bool Debugger_v2::cmd_sceneInfo(int argc, const char **argv) {
}
bool Debugger_v2::cmd_characterInfo(int argc, const char **argv) {
- DebugPrintf("Main character is in scene: %d '%s'\n", _vm->_mainCharacter.sceneId, _vm->_sceneList[_vm->_mainCharacter.sceneId].filename1);
- DebugPrintf("Position: %dx%d\n", _vm->_mainCharacter.x1, _vm->_mainCharacter.y1);
- DebugPrintf("Facing: %d\n", _vm->_mainCharacter.facing);
- DebugPrintf("Inventory:\n");
+ debugPrintf("Main character is in scene: %d '%s'\n", _vm->_mainCharacter.sceneId, _vm->_sceneList[_vm->_mainCharacter.sceneId].filename1);
+ debugPrintf("Position: %dx%d\n", _vm->_mainCharacter.x1, _vm->_mainCharacter.y1);
+ debugPrintf("Facing: %d\n", _vm->_mainCharacter.facing);
+ debugPrintf("Inventory:\n");
for (int i = 0; i < 20; ++i) {
- DebugPrintf("%-2d ", int8(_vm->_mainCharacter.inventory[i]));
+ debugPrintf("%-2d ", int8(_vm->_mainCharacter.inventory[i]));
if (i == 9 || i == 19)
- DebugPrintf("\n");
+ debugPrintf("\n");
}
return true;
}
@@ -418,9 +418,9 @@ bool Debugger_v2::cmd_sceneToFacing(int argc, const char **argv) {
break;
}
- DebugPrintf("Exit to facing %d leads to room %d.\n", facing, exit);
+ debugPrintf("Exit to facing %d leads to room %d.\n", facing, exit);
} else {
- DebugPrintf("Usage: %s <facing>\n", argv[0]);
+ debugPrintf("Usage: %s <facing>\n", argv[0]);
}
return true;
@@ -431,13 +431,13 @@ bool Debugger_v2::cmd_giveItem(int argc, const char **argv) {
int item = atoi(argv[1]);
if (item < -1 || item > _vm->engineDesc().maxItemId) {
- DebugPrintf("itemid must be any value between (including) -1 and %d\n", _vm->engineDesc().maxItemId);
+ debugPrintf("itemid must be any value between (including) -1 and %d\n", _vm->engineDesc().maxItemId);
return true;
}
_vm->setHandItem(item);
} else {
- DebugPrintf("Syntax: give <itemid>\n");
+ debugPrintf("Syntax: give <itemid>\n");
}
return true;
@@ -458,13 +458,13 @@ bool Debugger_HoF::cmd_passcodes(int argc, const char **argv) {
int val = atoi(argv[1]);
if (val < 0 || val > 1) {
- DebugPrintf("value must be either 1 (on) or 0 (off)\n");
+ debugPrintf("value must be either 1 (on) or 0 (off)\n");
return true;
}
_vm->_dbgPass = val;
} else {
- DebugPrintf("Syntax: pass_codes <0/1>\n");
+ debugPrintf("Syntax: pass_codes <0/1>\n");
}
return true;
@@ -496,21 +496,21 @@ void Debugger_EoB::initialize() {
bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
if (!_vm->_allowImport) {
- DebugPrintf("This command only works from the main menu.\n");
+ debugPrintf("This command only works from the main menu.\n");
return true;
}
if (argc == 3) {
int slot = atoi(argv[1]);
if (slot < -1 || slot > 989) {
- DebugPrintf("slot must be between (including) -1 and 989 \n");
+ debugPrintf("slot must be between (including) -1 and 989 \n");
return true;
}
- DebugPrintf(_vm->importOriginalSaveFile(slot, argv[2]) ? "Success.\n" : "Failure.\n");
+ debugPrintf(_vm->importOriginalSaveFile(slot, argv[2]) ? "Success.\n" : "Failure.\n");
_vm->loadItemDefs();
} else {
- DebugPrintf("Syntax: import_savefile <dest slot> <source file>\n (Imports source save game file to dest slot.)\n import_savefile -1\n (Imports all original save game files found and puts them into the first available slots.)\n\n");
+ debugPrintf("Syntax: import_savefile <dest slot> <source file>\n (Imports source save game file to dest slot.)\n import_savefile -1\n (Imports all original save game files found and puts them into the first available slots.)\n\n");
}
return true;
@@ -518,7 +518,7 @@ bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
bool Debugger_EoB::cmd_saveOriginal(int argc, const char **argv) {
if (!_vm->_runFlag) {
- DebugPrintf("This command doesn't work during intro or outro sequences,\nfrom the main menu or from the character generation.\n");
+ debugPrintf("This command doesn't work during intro or outro sequences,\nfrom the main menu or from the character generation.\n");
return true;
}
@@ -535,53 +535,53 @@ bool Debugger_EoB::cmd_saveOriginal(int argc, const char **argv) {
if (_vm->saveAsOriginalSaveFile()) {
Common::FSNode nf = nd.getChild(Common::String::format("EOBDATA.SAV"));
if (nf.isReadable())
- DebugPrintf("Saved to file: %s\n\n", nf.getPath().c_str());
+ debugPrintf("Saved to file: %s\n\n", nf.getPath().c_str());
else
- DebugPrintf("Failure.\n");
+ debugPrintf("Failure.\n");
} else {
- DebugPrintf("Failure.\n");
+ debugPrintf("Failure.\n");
}
} else {
- DebugPrintf("Syntax: save_original\n (Saves game in original file format to a file which can be used with the orginal game executable.)\n\n");
+ debugPrintf("Syntax: save_original\n (Saves game in original file format to a file which can be used with the orginal game executable.)\n\n");
}
return true;
} else if (argc == 2) {
int slot = atoi(argv[1]);
if (slot < 0 || slot > 5) {
- DebugPrintf("Slot must be between (including) 0 and 5.\n");
+ debugPrintf("Slot must be between (including) 0 and 5.\n");
} else if (_vm->saveAsOriginalSaveFile(slot)) {
Common::FSNode nf = nd.getChild(Common::String::format("EOBDATA%d.SAV", slot));
if (nf.isReadable())
- DebugPrintf("Saved to file: %s\n\n", nf.getPath().c_str());
+ debugPrintf("Saved to file: %s\n\n", nf.getPath().c_str());
else
- DebugPrintf("Failure.\n");
+ debugPrintf("Failure.\n");
} else {
- DebugPrintf("Failure.\n");
+ debugPrintf("Failure.\n");
}
return true;
}
- DebugPrintf("Syntax: save_original <slot>\n (Saves game in original file format to a file which can be used with the orginal game executable.\n A save slot between 0 and 5 must be specified.)\n\n");
+ debugPrintf("Syntax: save_original <slot>\n (Saves game in original file format to a file which can be used with the orginal game executable.\n A save slot between 0 and 5 must be specified.)\n\n");
return true;
}
bool Debugger_EoB::cmd_listMonsters(int, const char **) {
- DebugPrintf("\nCurrent level: %d\n----------------------\n\n", _vm->_currentLevel);
- DebugPrintf("Id Type Unit Block Position Direction Sub Level Mode Dst.block HP Flags\n--------------------------------------------------------------------------------------------------------------\n");
+ debugPrintf("\nCurrent level: %d\n----------------------\n\n", _vm->_currentLevel);
+ debugPrintf("Id Type Unit Block Position Direction Sub Level Mode Dst.block HP Flags\n--------------------------------------------------------------------------------------------------------------\n");
for (int i = 0; i < 30; i++) {
EoBMonsterInPlay *m = &_vm->_monsters[i];
- DebugPrintf("%.02d %.02d %.02d 0x%.04x %d %d %d %.02d 0x%.04x %.03d/%.03d 0x%.02x\n", i, m->type, m->unit, m->block, m->pos, m->dir, m->sub, m->mode, m->dest, m->hitPointsCur, m->hitPointsMax, m->flags);
+ debugPrintf("%.02d %.02d %.02d 0x%.04x %d %d %d %.02d 0x%.04x %.03d/%.03d 0x%.02x\n", i, m->type, m->unit, m->block, m->pos, m->dir, m->sub, m->mode, m->dest, m->hitPointsCur, m->hitPointsMax, m->flags);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
bool Debugger_EoB::cmd_showPosition(int, const char **) {
- DebugPrintf("\nCurrent level: %d\nCurrent Sub Level: %d\nCurrent block: %d (0x%.04x)\nNext block: %d (0x%.04x)\nCurrent direction: %d\n\n", _vm->_currentLevel, _vm->_currentSub, _vm->_currentBlock, _vm->_currentBlock, _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->_currentDirection);
+ debugPrintf("\nCurrent level: %d\nCurrent Sub Level: %d\nCurrent block: %d (0x%.04x)\nNext block: %d (0x%.04x)\nCurrent direction: %d\n\n", _vm->_currentLevel, _vm->_currentSub, _vm->_currentBlock, _vm->_currentBlock, _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->_currentDirection);
return true;
}
@@ -593,7 +593,7 @@ bool Debugger_EoB::cmd_setPosition(int argc, const char **argv) {
int maxLevel = (_vm->game() == GI_EOB1) ? 12 : 16;
if (level < 1 || level > maxLevel) {
- DebugPrintf("<level> must be a value from 1 to %d.\n\n", maxLevel);
+ debugPrintf("<level> must be a value from 1 to %d.\n\n", maxLevel);
return true;
}
@@ -613,66 +613,66 @@ bool Debugger_EoB::cmd_setPosition(int argc, const char **argv) {
_vm->_sceneUpdateRequired = true;
_vm->gui_drawAllCharPortraitsWithStats();
- DebugPrintf("Success.\n\n");
+ debugPrintf("Success.\n\n");
} else {
- DebugPrintf("Syntax: set_position <level>, <sub level>, <block>\n");
- DebugPrintf(" (Warning: The sub level and block position parameters will not be checked. Invalid parameters may cause problems.)\n\n");
+ debugPrintf("Syntax: set_position <level>, <sub level>, <block>\n");
+ debugPrintf(" (Warning: The sub level and block position parameters will not be checked. Invalid parameters may cause problems.)\n\n");
}
return true;
}
bool Debugger_EoB::cmd_openDoor(int, const char **) {
- DebugPrintf("Warning: Using this command may cause glitches.\n");
+ debugPrintf("Warning: Using this command may cause glitches.\n");
uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
int v = _vm->_levelBlockProperties[block].walls[c];
int flg = (_vm->_flags.gameID == GI_EOB1) ? 1 : 0x10;
if (_vm->_wllWallFlags[v] & flg) {
- DebugPrintf("Couldn't open any door. Make sure you're facing the door you wish to open and standing right in front of it.\n\n");
+ debugPrintf("Couldn't open any door. Make sure you're facing the door you wish to open and standing right in front of it.\n\n");
} else {
_vm->openDoor(block);
- DebugPrintf("Trying to open door at block %d.\n\n", block);
+ debugPrintf("Trying to open door at block %d.\n\n", block);
}
return true;
}
bool Debugger_EoB::cmd_closeDoor(int, const char **) {
- DebugPrintf("Warning: Using this command may cause glitches.\n");
+ debugPrintf("Warning: Using this command may cause glitches.\n");
uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
int v = _vm->_levelBlockProperties[block].walls[c];
if ((_vm->_flags.gameID == GI_EOB1 && !(_vm->_wllWallFlags[v] & 1)) || (_vm->_flags.gameID == GI_EOB2 && (_vm->_wllWallFlags[v] & 0x20))) {
- DebugPrintf("Couldn't close any door. Make sure you're facing the door you wish to close and standing right in front of it.\n\n");
+ debugPrintf("Couldn't close any door. Make sure you're facing the door you wish to close and standing right in front of it.\n\n");
} else {
_vm->closeDoor(block);
- DebugPrintf("Trying to close door at block %d.\n\n", block);
+ debugPrintf("Trying to close door at block %d.\n\n", block);
}
return true;
}
bool Debugger_EoB::cmd_listFlags(int, const char **) {
- DebugPrintf("Flag Status\n----------------------\n\n");
+ debugPrintf("Flag Status\n----------------------\n\n");
for (int i = 0; i < 32; i++) {
uint32 flag = 1 << i;
- DebugPrintf("%.2d %s\n", i, _vm->checkScriptFlags(flag) ? "TRUE" : "FALSE");
+ debugPrintf("%.2d %s\n", i, _vm->checkScriptFlags(flag) ? "TRUE" : "FALSE");
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
bool Debugger_EoB::cmd_setFlag(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Syntax: set_flag <flag>\n\n");
+ debugPrintf("Syntax: set_flag <flag>\n\n");
return true;
}
int flag = atoi(argv[1]);
if (flag < 0 || flag > 31) {
- DebugPrintf("<flag> must be a value from 0 to 31.\n\n");
+ debugPrintf("<flag> must be a value from 0 to 31.\n\n");
} else {
_vm->setScriptFlags(1 << flag);
- DebugPrintf("Flag '%.2d' has been set.\n\n", flag);
+ debugPrintf("Flag '%.2d' has been set.\n\n", flag);
}
return true;
@@ -680,16 +680,16 @@ bool Debugger_EoB::cmd_setFlag(int argc, const char **argv) {
bool Debugger_EoB::cmd_clearFlag(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Syntax: clear_flag <flag>\n\n");
+ debugPrintf("Syntax: clear_flag <flag>\n\n");
return true;
}
int flag = atoi(argv[1]);
if (flag < 0 || flag > 31) {
- DebugPrintf("<flag> must be a value from 0 to 31.\n\n");
+ debugPrintf("<flag> must be a value from 0 to 31.\n\n");
} else {
_vm->clearScriptFlags(1 << flag);
- DebugPrintf("Flag '%.2d' has been cleared.\n\n", flag);
+ debugPrintf("Flag '%.2d' has been cleared.\n\n", flag);
}
return true;
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 6c2d833..e13a2f6 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -156,7 +156,7 @@ void Debugger::callCommand() {
bool Debugger::loadArchive(int index) {
if (index < 1 || index > 3) {
- DebugPrintf("Invalid cd number (was: %d, valid: [1-3])\n", index);
+ debugPrintf("Invalid cd number (was: %d, valid: [1-3])\n", index);
return false;
}
@@ -198,36 +198,36 @@ void Debugger::restoreArchive() const {
// Debugger commands
//////////////////////////////////////////////////////////////////////////
bool Debugger::cmdHelp(int, const char **) {
- DebugPrintf("Debug flags\n");
- DebugPrintf("-----------\n");
- DebugPrintf(" debugflag_list - Lists the available debug flags and their status\n");
- DebugPrintf(" debugflag_enable - Enables a debug flag\n");
- DebugPrintf(" debugflag_disable - Disables a debug flag\n");
- DebugPrintf("\n");
- DebugPrintf("Commands\n");
- DebugPrintf("--------\n");
- DebugPrintf(" ls - list files in the archive\n");
- DebugPrintf(" dump - dump a list of files in all archives\n");
- DebugPrintf("\n");
- DebugPrintf(" showframe - show a frame from a sequence\n");
- DebugPrintf(" showbg - show a background\n");
- DebugPrintf(" playseq - play a sequence\n");
- DebugPrintf(" playsnd - play a sound\n");
- DebugPrintf(" playsbe - play a subtitle\n");
- DebugPrintf(" playnis - play an animation\n");
- DebugPrintf("\n");
- DebugPrintf(" loadscene - load a scene\n");
- DebugPrintf(" fight - start a fight\n");
- DebugPrintf(" beetle - start the beetle game\n");
- DebugPrintf("\n");
- DebugPrintf(" delta - Adjust the time delta\n");
- DebugPrintf(" show - show game data\n");
- DebugPrintf(" entity - show entity data\n");
- DebugPrintf("\n");
- DebugPrintf(" loadgame - load a saved game\n");
- DebugPrintf(" chapter - switch to a specific chapter\n");
- DebugPrintf(" clear - clear the screen\n");
- DebugPrintf("\n");
+ debugPrintf("Debug flags\n");
+ debugPrintf("-----------\n");
+ debugPrintf(" debugflag_list - Lists the available debug flags and their status\n");
+ debugPrintf(" debugflag_enable - Enables a debug flag\n");
+ debugPrintf(" debugflag_disable - Disables a debug flag\n");
+ debugPrintf("\n");
+ debugPrintf("Commands\n");
+ debugPrintf("--------\n");
+ debugPrintf(" ls - list files in the archive\n");
+ debugPrintf(" dump - dump a list of files in all archives\n");
+ debugPrintf("\n");
+ debugPrintf(" showframe - show a frame from a sequence\n");
+ debugPrintf(" showbg - show a background\n");
+ debugPrintf(" playseq - play a sequence\n");
+ debugPrintf(" playsnd - play a sound\n");
+ debugPrintf(" playsbe - play a subtitle\n");
+ debugPrintf(" playnis - play an animation\n");
+ debugPrintf("\n");
+ debugPrintf(" loadscene - load a scene\n");
+ debugPrintf(" fight - start a fight\n");
+ debugPrintf(" beetle - start the beetle game\n");
+ debugPrintf("\n");
+ debugPrintf(" delta - Adjust the time delta\n");
+ debugPrintf(" show - show game data\n");
+ debugPrintf(" entity - show entity data\n");
+ debugPrintf("\n");
+ debugPrintf(" loadgame - load a saved game\n");
+ debugPrintf(" chapter - switch to a specific chapter\n");
+ debugPrintf(" clear - clear the screen\n");
+ debugPrintf("\n");
return true;
}
@@ -252,15 +252,15 @@ bool Debugger::cmdListFiles(int argc, const char **argv) {
Common::ArchiveMemberList list;
int count = _engine->getResourceManager()->listMatchingMembers(list, filter);
- DebugPrintf("Number of matches: %d\n", count);
+ debugPrintf("Number of matches: %d\n", count);
for (Common::ArchiveMemberList::iterator it = list.begin(); it != list.end(); ++it)
- DebugPrintf(" %s\n", (*it)->getName().c_str());
+ debugPrintf(" %s\n", (*it)->getName().c_str());
// Restore archive
if (argc == 3)
restoreArchive();
} else {
- DebugPrintf("Syntax: ls <filter> (use * for all) (<cd number>)\n");
+ debugPrintf("Syntax: ls <filter> (use * for all) (<cd number>)\n");
}
return true;
@@ -287,7 +287,7 @@ bool Debugger::cmdDumpFiles(int argc, const char **) {
for (Common::ArchiveMemberList::iterator it = list.begin(); it != list.end(); ++it) { \
Common::SeekableReadStream *stream = getArchive((*it)->getName()); \
if (!stream) { \
- DebugPrintf("ERROR: Cannot create stream for file: %s\n", (*it)->getName().c_str()); \
+ debugPrintf("ERROR: Cannot create stream for file: %s\n", (*it)->getName().c_str()); \
restoreArchive(); \
return true; \
} \
@@ -311,7 +311,7 @@ bool Debugger::cmdDumpFiles(int argc, const char **) {
// Restore current loaded archive
restoreArchive();
} else {
- DebugPrintf("Syntax: dump");
+ debugPrintf("Syntax: dump");
}
return true;
@@ -336,7 +336,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) {
}
if (!_engine->getResourceManager()->hasFile(filename)) {
- DebugPrintf("Cannot find file: %s\n", filename.c_str());
+ debugPrintf("Cannot find file: %s\n", filename.c_str());
return true;
}
@@ -354,7 +354,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) {
AnimFrame *frame = sequence.getFrame((uint16)getNumber(argv[2]));
if (!frame) {
- DebugPrintf("Invalid frame index '%s'\n", argv[2]);
+ debugPrintf("Invalid frame index '%s'\n", argv[2]);
resetCommand();
return true;
}
@@ -375,7 +375,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) {
restoreArchive();
}
} else {
- DebugPrintf("Syntax: cmd_showframe <seqname> <index> (<cd number>)\n");
+ debugPrintf("Syntax: cmd_showframe <seqname> <index> (<cd number>)\n");
}
return true;
}
@@ -398,7 +398,7 @@ bool Debugger::cmdShowBg(int argc, const char **argv) {
}
if (!_engine->getResourceManager()->hasFile(filename + ".BG")) {
- DebugPrintf("Cannot find file: %s\n", (filename + ".BG").c_str());
+ debugPrintf("Cannot find file: %s\n", (filename + ".BG").c_str());
return true;
}
@@ -429,7 +429,7 @@ bool Debugger::cmdShowBg(int argc, const char **argv) {
resetCommand();
}
} else {
- DebugPrintf("Syntax: showbg <bgname> (<cd number>)\n");
+ debugPrintf("Syntax: showbg <bgname> (<cd number>)\n");
}
return true;
}
@@ -453,7 +453,7 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) {
}
if (!_engine->getResourceManager()->hasFile(filename)) {
- DebugPrintf("Cannot find file: %s\n", filename.c_str());
+ debugPrintf("Cannot find file: %s\n", filename.c_str());
return true;
}
@@ -510,7 +510,7 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) {
restoreArchive();
}
} else {
- DebugPrintf("Syntax: playseq <seqname> (<cd number>)\n");
+ debugPrintf("Syntax: playseq <seqname> (<cd number>)\n");
}
return true;
}
@@ -537,7 +537,7 @@ bool Debugger::cmdPlaySnd(int argc, const char **argv) {
name += ".SND";
if (!_engine->getResourceManager()->hasFile(name)) {
- DebugPrintf("Cannot find file: %s\n", name.c_str());
+ debugPrintf("Cannot find file: %s\n", name.c_str());
return true;
}
@@ -548,7 +548,7 @@ bool Debugger::cmdPlaySnd(int argc, const char **argv) {
if (argc == 3)
restoreArchive();
} else {
- DebugPrintf("Syntax: playsnd <sndname> (<cd number>)\n");
+ debugPrintf("Syntax: playsnd <sndname> (<cd number>)\n");
}
return true;
}
@@ -573,7 +573,7 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) {
filename += ".sbe";
if (!_engine->getResourceManager()->hasFile(filename)) {
- DebugPrintf("Cannot find file: %s\n", filename.c_str());
+ debugPrintf("Cannot find file: %s\n", filename.c_str());
return true;
}
@@ -615,7 +615,7 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) {
resetCommand();
}
} else {
- DebugPrintf("Syntax: playsbe <sbename> (<cd number>)\n");
+ debugPrintf("Syntax: playsbe <sbename> (<cd number>)\n");
}
return true;
}
@@ -639,7 +639,7 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) {
// If we got a nis filename, check that the file exists
if (name.contains('.') && !_engine->getResourceManager()->hasFile(name)) {
- DebugPrintf("Cannot find file: %s\n", name.c_str());
+ debugPrintf("Cannot find file: %s\n", name.c_str());
return true;
}
@@ -672,7 +672,7 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) {
resetCommand();
}
} else {
- DebugPrintf("Syntax: playnis <nisname.nis or animation index> (<cd number>)\n");
+ debugPrintf("Syntax: playnis <nisname.nis or animation index> (<cd number>)\n");
}
return true;
}
@@ -697,7 +697,7 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) {
}
if (index > 2500) {
- DebugPrintf("Error: invalid index value (0-2500)");
+ debugPrintf("Error: invalid index value (0-2500)");
return true;
}
@@ -718,7 +718,7 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) {
// loadSceneObject(scene, i);
// if (scene.getHeader() && scene.getHeader()->car == 5 && scene.getHeader()->position == 81) {
- // DebugPrintf("Found scene: %d", i);
+ // debugPrintf("Found scene: %d", i);
// // Draw scene found
// _engine->getGraphicsManager()->draw(&scene, GraphicsManager::kBackgroundC);
@@ -738,7 +738,7 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) {
/*********************************************/
Scene *scene = getScenes()->get(index);
if (!scene) {
- DebugPrintf("Cannot load scene %i from CD %i", index, cd);
+ debugPrintf("Cannot load scene %i from CD %i", index, cd);
resetCommand();
return true;
@@ -758,7 +758,7 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) {
resetCommand();
}
} else {
- DebugPrintf("Syntax: loadscene <scene index> (<cd number>)\n");
+ debugPrintf("Syntax: loadscene <scene index> (<cd number>)\n");
}
return true;
}
@@ -814,7 +814,7 @@ bool Debugger::cmdFight(int argc, const char **argv) {
SceneIndex lastScene = getState()->scene;
- getFight()->setup(type) ? DebugPrintf("Lost fight!\n") : DebugPrintf("Won fight!\n");
+ getFight()->setup(type) ? debugPrintf("Lost fight!\n") : debugPrintf("Won fight!\n");
// Pause for a second to be able to see the final scene
_engine->_system->delayMillis(1000);
@@ -837,7 +837,7 @@ bool Debugger::cmdFight(int argc, const char **argv) {
}
} else {
error:
- DebugPrintf("Syntax: fight <id> (id=2001-2005)\n");
+ debugPrintf("Syntax: fight <id> (id=2001-2005)\n");
}
return true;
@@ -968,7 +968,7 @@ bool Debugger::cmdBeetle(int argc, const char **argv) {
resetCommand();
}
} else {
- DebugPrintf("Syntax: beetle\n");
+ debugPrintf("Syntax: beetle\n");
}
return true;
@@ -992,7 +992,7 @@ bool Debugger::cmdTimeDelta(int argc, const char **argv) {
getState()->timeDelta = (uint)delta;
} else {
label_error:
- DebugPrintf("Syntax: delta <time delta> (delta=1-500)\n");
+ debugPrintf("Syntax: delta <time delta> (delta=1-500)\n");
}
return true;
@@ -1018,10 +1018,10 @@ bool Debugger::cmdTime(int argc, const char **argv) {
uint8 minutes = 0;
State::getHourMinutes((uint32)time, &hours, &minutes);
- DebugPrintf("%02d:%02d\n", hours, minutes);
+ debugPrintf("%02d:%02d\n", hours, minutes);
} else {
label_error:
- DebugPrintf("Syntax: time <time to convert> (time=0-INT_MAX)\n");
+ debugPrintf("Syntax: time <time to convert> (time=0-INT_MAX)\n");
}
return true;
@@ -1037,10 +1037,10 @@ label_error:
*/
bool Debugger::cmdShow(int argc, const char **argv) {
#define OUTPUT_DUMP(name, text) \
- DebugPrintf(#name "\n"); \
- DebugPrintf("--------------------------------------------------------------------\n\n"); \
- DebugPrintf("%s", text); \
- DebugPrintf("\n");
+ debugPrintf(#name "\n"); \
+ debugPrintf("--------------------------------------------------------------------\n\n"); \
+ debugPrintf("%s", text); \
+ debugPrintf("\n");
if (argc == 2) {
@@ -1066,14 +1066,14 @@ bool Debugger::cmdShow(int argc, const char **argv) {
} else {
label_error:
- DebugPrintf("Syntax: state <option>\n");
- DebugPrintf(" state / st\n");
- DebugPrintf(" progress / pr\n");
- DebugPrintf(" flags / fl\n");
- DebugPrintf(" inventory / inv\n");
- DebugPrintf(" objects / obj\n");
- DebugPrintf(" savepoints / pt\n");
- DebugPrintf(" scene / sc\n");
+ debugPrintf("Syntax: state <option>\n");
+ debugPrintf(" state / st\n");
+ debugPrintf(" progress / pr\n");
+ debugPrintf(" flags / fl\n");
+ debugPrintf(" inventory / inv\n");
+ debugPrintf(" objects / obj\n");
+ debugPrintf(" savepoints / pt\n");
+ debugPrintf(" scene / sc\n");
}
return true;
@@ -1096,26 +1096,26 @@ bool Debugger::cmdEntity(int argc, const char **argv) {
if (index > 39)
goto label_error;
- DebugPrintf("Entity %s\n", ENTITY_NAME(index));
- DebugPrintf("--------------------------------------------------------------------\n\n");
- DebugPrintf("%s", getEntities()->getData(index)->toString().c_str());
+ debugPrintf("Entity %s\n", ENTITY_NAME(index));
+ debugPrintf("--------------------------------------------------------------------\n\n");
+ debugPrintf("%s", getEntities()->getData(index)->toString().c_str());
// The Player entity does not have any callback data
if (index != kEntityPlayer) {
EntityData *data = getEntities()->get(index)->getParamData();
for (uint callback = 0; callback < 9; callback++) {
- DebugPrintf("Call parameters %d:\n", callback);
+ debugPrintf("Call parameters %d:\n", callback);
for (byte ix = 0; ix < 4; ix++)
- DebugPrintf(" %s", data->getParameters(callback, ix)->toString().c_str());
+ debugPrintf(" %s", data->getParameters(callback, ix)->toString().c_str());
}
}
- DebugPrintf("\n");
+ debugPrintf("\n");
} else {
label_error:
- DebugPrintf("Syntax: entity <index>\n");
+ debugPrintf("Syntax: entity <index>\n");
for (int i = 0; i < 40; i += 4)
- DebugPrintf(" %s - %d %s - %d %s - %d %s - %d\n", ENTITY_NAME(i), i, ENTITY_NAME(i+1), i+1, ENTITY_NAME(i+2), i+2, ENTITY_NAME(i+3), i+3);
+ debugPrintf(" %s - %d %s - %d %s - %d %s - %d\n", ENTITY_NAME(i), i, ENTITY_NAME(i+1), i+1, ENTITY_NAME(i+2), i+2, ENTITY_NAME(i+3), i+3);
}
return true;
@@ -1152,7 +1152,7 @@ bool Debugger::cmdSwitchChapter(int argc, const char **argv) {
}
} else {
error:
- DebugPrintf("Syntax: chapter <id> (id=2-6)\n");
+ debugPrintf("Syntax: chapter <id> (id=2-6)\n");
}
return true;
@@ -1172,7 +1172,7 @@ bool Debugger::cmdClear(int argc, const char **) {
askForRedraw();
redrawScreen();
} else {
- DebugPrintf("Syntax: clear - clear the screen\n");
+ debugPrintf("Syntax: clear - clear the screen\n");
}
return true;
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index bbaa68b..d2b0cd4 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -88,7 +88,7 @@ bool Debugger::cmd_enterRoom(int argc, const char **argv) {
// Validate that it's an existing room
if (res.getRoom(roomNumber) == NULL) {
- DebugPrintf("specified number was not a valid room\n");
+ debugPrintf("specified number was not a valid room\n");
return true;
}
@@ -105,9 +105,9 @@ bool Debugger::cmd_enterRoom(int argc, const char **argv) {
return false;
}
- DebugPrintf("Syntax: room <roomnum> [<remoteview>]\n");
- DebugPrintf("A non-zero value for reomteview will change the room without ");
- DebugPrintf("moving the player.\n");
+ debugPrintf("Syntax: room <roomnum> [<remoteview>]\n");
+ debugPrintf("A non-zero value for reomteview will change the room without ");
+ debugPrintf("moving the player.\n");
return true;
}
@@ -117,7 +117,7 @@ bool Debugger::cmd_listRooms(int argc, const char **argv) {
char buffer[MAX_DESC_SIZE];
int ctr = 0;
- DebugPrintf("Available rooms are:\n");
+ debugPrintf("Available rooms are:\n");
for (RoomDataList::iterator i = rooms.begin(); i != rooms.end(); ++i) {
RoomData const &room = **i;
// Explictly note the second drawbridge room as "Alt"
@@ -128,20 +128,20 @@ bool Debugger::cmd_listRooms(int argc, const char **argv) {
strings.getString(room.roomNumber, buffer);
}
- DebugPrintf("#%d - %s", room.roomNumber, buffer);
+ debugPrintf("#%d - %s", room.roomNumber, buffer);
- if (++ctr % 3 == 0) DebugPrintf("\n");
+ if (++ctr % 3 == 0) debugPrintf("\n");
else {
// Write out spaces between columns
int numSpaces = 25 - strlen(buffer) - (room.roomNumber >= 10 ? 2 : 1);
char *s = buffer;
while (numSpaces-- > 0) *s++ = ' ';
*s = '\0';
- DebugPrintf("%s", buffer);
+ debugPrintf("%s", buffer);
}
}
- DebugPrintf("\n");
- DebugPrintf("Current room: %d\n", Room::getReference().roomNumber());
+ debugPrintf("\n");
+ debugPrintf("Current room: %d\n", Room::getReference().roomNumber());
return true;
}
@@ -150,11 +150,11 @@ bool Debugger::cmd_listFields(int argc, const char **argv) {
ValueTableData &fields = Resources::getReference().fieldList();
for (int ctr = 0; ctr < fields.size(); ++ctr) {
- DebugPrintf("(%-2d): %-5d", ctr, fields.getField(ctr));
+ debugPrintf("(%-2d): %-5d", ctr, fields.getField(ctr));
if (!((ctr + 1) % 7))
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -167,13 +167,13 @@ bool Debugger::cmd_setField(int argc, const char **argv) {
if ((fieldNum < 0) || (fieldNum >= fields.size())) {
// Invalid field number
- DebugPrintf("Invalid field number specified\n");
+ debugPrintf("Invalid field number specified\n");
} else {
// Set the field value
fields.setField(fieldNum, value);
}
} else {
- DebugPrintf("Syntax: setfield <field_number> <value>\n");
+ debugPrintf("Syntax: setfield <field_number> <value>\n");
}
return true;
@@ -186,14 +186,14 @@ bool Debugger::cmd_queryField(int argc, const char **argv) {
int fieldNum = strToInt(argv[1]);
if ((fieldNum < 0) || (fieldNum >= fields.size())) {
// Invalid field number
- DebugPrintf("Invalid field number specified\n");
+ debugPrintf("Invalid field number specified\n");
} else {
// Get the field value
- DebugPrintf("Field %d is %d (%xh)\n", fieldNum,
+ debugPrintf("Field %d is %d (%xh)\n", fieldNum,
fields.getField(fieldNum), fields.getField(fieldNum));
}
} else {
- DebugPrintf("Syntax: queryfield <field_num>\n");
+ debugPrintf("Syntax: queryfield <field_num>\n");
}
return true;
@@ -215,18 +215,18 @@ bool Debugger::cmd_giveItem(int argc, const char **argv) {
charHotspot = res.getHotspot(charNum);
if (itemHotspot == NULL) {
- DebugPrintf("The specified item does not exist\n");
+ debugPrintf("The specified item does not exist\n");
} else if (itemNum < 0x408) {
- DebugPrintf("The specified item number is not an object\n");
+ debugPrintf("The specified item number is not an object\n");
} else if ((charNum < PLAYER_ID) || (charNum >= 0x408) ||
(charHotspot == NULL)) {
- DebugPrintf("The specified character does not exist");
+ debugPrintf("The specified character does not exist");
} else {
// Set the item's room number to be the destination character
itemHotspot->roomNumber = charNum;
}
} else {
- DebugPrintf("Syntax: give <item_id> [<character_id>]\n");
+ debugPrintf("Syntax: give <item_id> [<character_id>]\n");
}
return true;
@@ -248,7 +248,7 @@ bool Debugger::cmd_hotspots(int argc, const char **argv) {
if (hotspot.nameId() == 0) strcpy(buffer, "none");
else strings.getString(hotspot.nameId(), buffer);
- DebugPrintf("%4xh - %s pos=(%d,%d,%d)\n", hotspot.hotspotId(), buffer,
+ debugPrintf("%4xh - %s pos=(%d,%d,%d)\n", hotspot.hotspotId(), buffer,
hotspot.x(), hotspot.y(), hotspot.roomNumber());
}
} else {
@@ -263,16 +263,16 @@ bool Debugger::cmd_hotspots(int argc, const char **argv) {
if (hotspot.nameId == 0) strcpy(buffer, "none");
else strings.getString(hotspot.nameId, buffer);
- DebugPrintf("%4xh - %s pos=(%d,%d,%d)\n", hotspot.hotspotId, buffer,
+ debugPrintf("%4xh - %s pos=(%d,%d,%d)\n", hotspot.hotspotId, buffer,
hotspot.startX, hotspot.startY, hotspot.roomNumber);
}
}
}
} else {
- DebugPrintf("Syntax: hotspots ['active' | ['room' | 'room' '<room_number>']]\n");
- DebugPrintf("Gives a list of all the currently active hotspots, or the hotspots\n");
- DebugPrintf("present in either the current room or a designated one\n");
+ debugPrintf("Syntax: hotspots ['active' | ['room' | 'room' '<room_number>']]\n");
+ debugPrintf("Gives a list of all the currently active hotspots, or the hotspots\n");
+ debugPrintf("present in either the current room or a designated one\n");
}
return true;
@@ -287,12 +287,12 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
Hotspot *h;
if (argc < 2) {
- DebugPrintf("hotspot <hotspot_id> ['paths' | 'schedule' | 'actions' | 'activate' | 'deactivate' | 'setpos']\n");
+ debugPrintf("hotspot <hotspot_id> ['paths' | 'schedule' | 'actions' | 'activate' | 'deactivate' | 'setpos']\n");
return true;
}
hs = res.getHotspot(strToInt(argv[1]));
if (!hs) {
- DebugPrintf("Unknown hotspot specified\n");
+ debugPrintf("Unknown hotspot specified\n");
return true;
}
@@ -300,26 +300,26 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
if (argc == 2) {
// Show the hotspot properties
strings.getString(hs->nameId, buffer);
- DebugPrintf("name = %d - %s, descs = (%d,%d)\n", hs->nameId, buffer,
+ debugPrintf("name = %d - %s, descs = (%d,%d)\n", hs->nameId, buffer,
hs->descId, hs->descId2);
- DebugPrintf("actions = %xh, offset = %xh\n", hs->actions, hs->actionsOffset);
- DebugPrintf("flags = %xh, layer = %d\n", hs->flags, hs->layer);
- DebugPrintf("position = %d,%d,%d\n", hs->startX, hs->startY, hs->roomNumber);
- DebugPrintf("size = %d,%d, alt = %d,%d, yCorrection = %d\n",
+ debugPrintf("actions = %xh, offset = %xh\n", hs->actions, hs->actionsOffset);
+ debugPrintf("flags = %xh, layer = %d\n", hs->flags, hs->layer);
+ debugPrintf("position = %d,%d,%d\n", hs->startX, hs->startY, hs->roomNumber);
+ debugPrintf("size = %d,%d, alt = %d,%d, yCorrection = %d\n",
hs->width, hs->height, hs->widthCopy, hs->heightCopy, hs->yCorrection);
- DebugPrintf("Talk bubble offset = %d,%d\n", hs->talkX, hs->talkY);
- DebugPrintf("load offset = %xh, script load = %d\n", hs->loadOffset, hs->scriptLoadFlag);
- DebugPrintf("Animation Id = %xh, Color offset = %d\n", hs->animRecordId, hs->colorOffset);
- DebugPrintf("Talk Script offset = %xh, Tick Script offset = %xh\n",
+ debugPrintf("Talk bubble offset = %d,%d\n", hs->talkX, hs->talkY);
+ debugPrintf("load offset = %xh, script load = %d\n", hs->loadOffset, hs->scriptLoadFlag);
+ debugPrintf("Animation Id = %xh, Color offset = %d\n", hs->animRecordId, hs->colorOffset);
+ debugPrintf("Talk Script offset = %xh, Tick Script offset = %xh\n",
hs->talkScriptOffset, hs->tickScriptOffset);
- DebugPrintf("Tick Proc offset = %xh\n", hs->tickProcId);
- DebugPrintf("Tick timeout = %d\n", hs->tickTimeout);
- DebugPrintf("Character mode = %d, delay ctr = %d, pause ctr = %d\n",
+ debugPrintf("Tick Proc offset = %xh\n", hs->tickProcId);
+ debugPrintf("Tick timeout = %d\n", hs->tickTimeout);
+ debugPrintf("Character mode = %d, delay ctr = %d, pause ctr = %d\n",
hs->characterMode, hs->delayCtr, hs->pauseCtr);
if (h != NULL) {
- DebugPrintf("Frame Number = %d of %d\n", h->frameNumber(), h->numFrames());
- DebugPrintf("Persistent = %s\n", h->persistant() ? "true" : "false");
+ debugPrintf("Frame Number = %d of %d\n", h->frameNumber(), h->numFrames());
+ debugPrintf("Persistent = %s\n", h->persistant() ? "true" : "false");
}
} else if (strcmp(argv[2], "actions") == 0) {
@@ -329,42 +329,42 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
const char *actionStr = stringList.getString(action);
if (offset >= 0x8000) {
- DebugPrintf("%s - Message %xh\n", actionStr, offset & 0x7ff);
+ debugPrintf("%s - Message %xh\n", actionStr, offset & 0x7ff);
} else if (offset != 0) {
- DebugPrintf("%s - Script %xh\n", actionStr, offset);
+ debugPrintf("%s - Script %xh\n", actionStr, offset);
}
}
} else if (strcmp(argv[2], "activate") == 0) {
// Activate the hotspot
res.activateHotspot(hs->hotspotId);
hs->flags &= ~HOTSPOTFLAG_MENU_EXCLUSION;
- DebugPrintf("Activated\n");
+ debugPrintf("Activated\n");
} else if (strcmp(argv[2], "deactivate") == 0) {
// Deactivate the hotspot
res.deactivateHotspot(hs->hotspotId);
hs->flags |= HOTSPOTFLAG_MENU_EXCLUSION;
- DebugPrintf("Deactivated\n");
+ debugPrintf("Deactivated\n");
} else {
if (strcmp(argv[2], "schedule") == 0) {
// List any current schedule for the character
- DebugPrintf("%s", hs->npcSchedule.getDebugInfo().c_str());
+ debugPrintf("%s", hs->npcSchedule.getDebugInfo().c_str());
}
if (!h)
- DebugPrintf("The specified hotspot is not currently active\n");
+ debugPrintf("The specified hotspot is not currently active\n");
else if (strcmp(argv[2], "paths") == 0) {
// List any paths for a charcter
- DebugPrintf("%s", h->pathFinder().getDebugInfo().c_str());
+ debugPrintf("%s", h->pathFinder().getDebugInfo().c_str());
}
else if (strcmp(argv[2], "pixels") == 0) {
// List the pixel data for the hotspot
HotspotAnimData &pData = h->anim();
- DebugPrintf("Record Id = %xh\n", pData.animRecordId);
- DebugPrintf("Flags = %d\n", pData.flags);
- DebugPrintf("Frames: up=%d down=%d left=%d right=%d\n",
+ debugPrintf("Record Id = %xh\n", pData.animRecordId);
+ debugPrintf("Flags = %d\n", pData.flags);
+ debugPrintf("Frames: up=%d down=%d left=%d right=%d\n",
pData.upFrame, pData.downFrame, pData.leftFrame, pData.rightFrame);
- DebugPrintf("Current frame = %d of %d\n", h->frameNumber(), h->numFrames());
+ debugPrintf("Current frame = %d of %d\n", h->frameNumber(), h->numFrames());
}
else if (strcmp(argv[2], "setpos") == 0) {
// Set the hotspot position
@@ -372,11 +372,11 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
h->setPosition(strToInt(argv[3]), strToInt(argv[4]));
if (argc >= 6)
h->setRoomNumber(strToInt(argv[5]));
- DebugPrintf("Done.\n");
+ debugPrintf("Done.\n");
}
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -388,56 +388,56 @@ bool Debugger::cmd_room(int argc, const char **argv) {
char buffer[MAX_DESC_SIZE];
if (argc < 2) {
- DebugPrintf("room <room_number>\n");
+ debugPrintf("room <room_number>\n");
return true;
}
int roomNumber = strToInt(argv[1]);
RoomData *room = res.getRoom(roomNumber);
if (!room) {
- DebugPrintf("Unknown room specified\n");
+ debugPrintf("Unknown room specified\n");
return true;
}
// Show the room details
strings.getString(roomNumber, buffer);
- DebugPrintf("room #%d - %s\n", roomNumber, buffer);
+ debugPrintf("room #%d - %s\n", roomNumber, buffer);
strings.getString(room->descId, buffer);
- DebugPrintf("%s\n", buffer);
- DebugPrintf("Horizontal clipping = %d->%d walk area=(%d,%d)-(%d,%d)\n",
+ debugPrintf("%s\n", buffer);
+ debugPrintf("Horizontal clipping = %d->%d walk area=(%d,%d)-(%d,%d)\n",
room->clippingXStart, room->clippingXEnd,
room->walkBounds.left, room->walkBounds.top,
room->walkBounds.right, room->walkBounds.bottom);
- DebugPrintf("Exit hotspots:");
+ debugPrintf("Exit hotspots:");
RoomExitHotspotList &exits = room->exitHotspots;
if (exits.empty())
- DebugPrintf(" none\n");
+ debugPrintf(" none\n");
else {
RoomExitHotspotList::iterator i;
for (i = exits.begin(); i != exits.end(); ++i) {
RoomExitHotspotData const &rec = **i;
- DebugPrintf("\nArea - (%d,%d)-(%d,%d) Room=%d Cursor=%d Hotspot=%xh",
+ debugPrintf("\nArea - (%d,%d)-(%d,%d) Room=%d Cursor=%d Hotspot=%xh",
rec.xs, rec.ys, rec.xe, rec.ye, rec.destRoomNumber, rec.cursorNum, rec.hotspotId);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf("Room exits:");
+ debugPrintf("Room exits:");
if (room->exits.empty())
- DebugPrintf(" none\n");
+ debugPrintf(" none\n");
else {
RoomExitList::iterator i2;
for (i2 = room->exits.begin(); i2 != room->exits.end(); ++i2) {
RoomExitData const &rec2 = **i2;
- DebugPrintf("\nExit - (%d,%d)-(%d,%d) Dest=%d,(%d,%d) Dir=%s Sequence=%xh",
+ debugPrintf("\nExit - (%d,%d)-(%d,%d) Dest=%d,(%d,%d) Dir=%s Sequence=%xh",
rec2.xs, rec2.ys, rec2.xe, rec2.ye, rec2.roomNumber,
rec2.x, rec2.y, directionList[rec2.direction], rec2.sequenceOffset);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
return true;
@@ -446,7 +446,7 @@ bool Debugger::cmd_room(int argc, const char **argv) {
bool Debugger::cmd_showAnim(int argc, const char **argv) {
Resources &res = Resources::getReference();
if (argc < 2) {
- DebugPrintf("showAnim animId [[frame_width frame_height] | list]\n");
+ debugPrintf("showAnim animId [[frame_width frame_height] | list]\n");
return true;
}
@@ -454,7 +454,7 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) {
int animId = strToInt(argv[1]);
HotspotAnimData *data = res.getAnimation(animId);
if (data == NULL) {
- DebugPrintf("No such animation Id exists\n");
+ debugPrintf("No such animation Id exists\n");
return true;
}
@@ -500,7 +500,7 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) {
height = strToInt(argv[3]);
if ((width * height) != (frameSize * 2)) {
- DebugPrintf("Warning: Total size = %d, Frame size (%d,%d) * %d frames = %d bytes\n",
+ debugPrintf("Warning: Total size = %d, Frame size (%d,%d) * %d frames = %d bytes\n",
destSize, width, height, numFrames, width * height * numFrames / 2);
}
} else {
@@ -511,25 +511,25 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) {
width = frameSize * 3 / 4;
bool descFlag = (argc == 3);
- if (descFlag) DebugPrintf("Target size = %d\n", frameSize * 2);
+ if (descFlag) debugPrintf("Target size = %d\n", frameSize * 2);
while ((width > 0) && (descFlag || (((frameSize * 2) % width) != 0))) {
if (((frameSize * 2) % width) == 0)
- DebugPrintf("Frame size (%d,%d) found\n", width, frameSize * 2 / width);
+ debugPrintf("Frame size (%d,%d) found\n", width, frameSize * 2 / width);
--width;
}
if (argc == 3) {
- DebugPrintf("Done\n");
+ debugPrintf("Done\n");
return true;
} else if (width == 0) {
- DebugPrintf("Total size = %d, # frames = %d, frame Size = %d - No valid frame dimensions\n",
+ debugPrintf("Total size = %d, # frames = %d, frame Size = %d - No valid frame dimensions\n",
destSize, numFrames, frameSize);
return true;
}
height = (frameSize * 2) / width;
- DebugPrintf("# frames = %d, guestimated frame size = (%d,%d)\n",
+ debugPrintf("# frames = %d, guestimated frame size = (%d,%d)\n",
numFrames, width, height);
}
@@ -544,13 +544,13 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) {
hotspot->setAnimation(animId);
- DebugPrintf("Done\n");
+ debugPrintf("Done\n");
return true;
}
bool Debugger::cmd_saveStrings(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("strings <stringId>\n");
+ debugPrintf("strings <stringId>\n");
return true;
}
@@ -558,13 +558,13 @@ bool Debugger::cmd_saveStrings(int argc, const char **argv) {
char *buffer = (char *)malloc(32768);
if (!buffer) {
- DebugPrintf("Cannot allocate strings buffer\n");
+ debugPrintf("Cannot allocate strings buffer\n");
return true;
}
uint16 id = strToInt(argv[1]);
strings.getString(id, buffer, NULL, NULL);
- DebugPrintf("%s\n", buffer);
+ debugPrintf("%s\n", buffer);
/* Commented out code for saving all text strings - note that 0x1000 is chosen
* arbitrarily, so there'll be a bunch of garbage at the end, or the game will crash
@@ -580,7 +580,7 @@ bool Debugger::cmd_saveStrings(int argc, const char **argv) {
fclose(f);
- DebugPrintf("Done\n");
+ debugPrintf("Done\n");
*/
free(buffer);
@@ -593,16 +593,16 @@ bool Debugger::cmd_debug(int argc, const char **argv) {
Room &room = Room::getReference();
if ((argc == 2) && (strcmp(argv[1], "on") == 0)) {
- DebugPrintf("debug keys are on\n");
+ debugPrintf("debug keys are on\n");
game.debugFlag() = true;
} else if ((argc == 2) && (strcmp(argv[1], "off") == 0)) {
- DebugPrintf("debug keys are off\n");
+ debugPrintf("debug keys are off\n");
game.debugFlag() = false;
room.setShowInfo(false);
} else {
- DebugPrintf("debug [on | off]]\n");
+ debugPrintf("debug [on | off]]\n");
}
return true;
@@ -610,13 +610,13 @@ bool Debugger::cmd_debug(int argc, const char **argv) {
bool Debugger::cmd_script(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("script <script number> [param 1] [param 2] [param 3] [exit flag]\n");
+ debugPrintf("script <script number> [param 1] [param 2] [param 3] [exit flag]\n");
return true;
}
int scriptNumber = strToInt(argv[1]);
if ((scriptNumber < 0) || (scriptNumber > 66)) {
- DebugPrintf("An invalid script number was specified\n");
+ debugPrintf("An invalid script number was specified\n");
return true;
}
@@ -629,7 +629,7 @@ bool Debugger::cmd_script(int argc, const char **argv) {
param3 = strToInt(argv[4]);
Script::executeMethod(scriptNumber, param1, param2, param3);
- DebugPrintf("Script executed\n");
+ debugPrintf("Script executed\n");
return true;
}
diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index 9f5735f..798cd00 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -65,7 +65,7 @@ static int strToInt(const char *s) {
bool Debugger::Cmd_Mouse(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: %s [ on | off ]\n", argv[0]);
+ debugPrintf("Usage: %s [ on | off ]\n", argv[0]);
} else {
_showMousePos = strcmp(argv[1], "on") == 0;
}
@@ -75,8 +75,8 @@ bool Debugger::Cmd_Mouse(int argc, const char **argv) {
bool Debugger::Cmd_LoadScene(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Current scene is: %d\n", _vm->_game->_scene._currentSceneId);
- DebugPrintf("Usage: %s <scene number>\n", argv[0]);
+ debugPrintf("Current scene is: %d\n", _vm->_game->_scene._currentSceneId);
+ debugPrintf("Usage: %s <scene number>\n", argv[0]);
return true;
} else {
_vm->_game->_scene._nextSceneId = strToInt(argv[1]);
@@ -106,10 +106,10 @@ bool Debugger::Cmd_ShowHotSpots(int argc, const char **argv) {
bool Debugger::Cmd_ListHotSpots(int argc, const char **argv) {
Hotspots &hotspots = _vm->_game->_scene._hotspots;
- DebugPrintf("%d hotspots present\n", hotspots.size());
+ debugPrintf("%d hotspots present\n", hotspots.size());
for (uint index = 0; index < hotspots.size(); ++index) {
- DebugPrintf("(%d): %p x1 = %d; y1 = %d; x2 = %d; y2 = %d\n",
+ debugPrintf("(%d): %p x1 = %d; y1 = %d; x2 = %d; y2 = %d\n",
index, (void *)&hotspots[index],
hotspots[index]._bounds.left, hotspots[index]._bounds.top,
hotspots[index]._bounds.right, hotspots[index]._bounds.bottom);
@@ -120,7 +120,7 @@ bool Debugger::Cmd_ListHotSpots(int argc, const char **argv) {
bool Debugger::Cmd_PlaySound(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: %s <sound file>\n", argv[0]);
+ debugPrintf("Usage: %s <sound file>\n", argv[0]);
} else {
int commandId = strToInt(argv[1]);
int param = (argc >= 3) ? strToInt(argv[2]) : 0;
@@ -133,8 +133,8 @@ bool Debugger::Cmd_PlaySound(int argc, const char **argv) {
bool Debugger::Cmd_PlayAudio(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: %s <sound index> <sound group>\n", argv[0]);
- DebugPrintf("If the sound group isn't defined, the default one will be used\n");
+ debugPrintf("Usage: %s <sound index> <sound group>\n", argv[0]);
+ debugPrintf("If the sound group isn't defined, the default one will be used\n");
} else {
int index = strToInt(argv[1]);
Common::String soundGroup = (argc >= 3) ? argv[2] : "";
@@ -170,13 +170,13 @@ bool Debugger::Cmd_ShowCodes(int argc, const char **argv) {
bool Debugger::Cmd_DumpFile(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s <resource>\n", argv[0]);
+ debugPrintf("Usage: %s <resource>\n", argv[0]);
} else {
Common::DumpFile outFile;
Common::File inFile;
if (!inFile.open(argv[1])) {
- DebugPrintf("Specified resource does not exist\n");
+ debugPrintf("Specified resource does not exist\n");
} else {
outFile.open(argv[1]);
byte *data = new byte[inFile.size()];
@@ -189,7 +189,7 @@ bool Debugger::Cmd_DumpFile(int argc, const char **argv) {
inFile.close();
outFile.close();
- DebugPrintf("File written successfully.\n");
+ debugPrintf("File written successfully.\n");
}
}
@@ -198,9 +198,9 @@ bool Debugger::Cmd_DumpFile(int argc, const char **argv) {
bool Debugger::Cmd_ShowQuote(int argc, const char **argv) {
if (argc != 2)
- DebugPrintf("Usage: %s <quote number>\n", argv[0]);
+ debugPrintf("Usage: %s <quote number>\n", argv[0]);
else
- DebugPrintf("%s", _vm->_game->getQuote(strToInt(argv[1])).c_str());
+ debugPrintf("%s", _vm->_game->getQuote(strToInt(argv[1])).c_str());
return true;
}
@@ -208,11 +208,11 @@ bool Debugger::Cmd_ShowQuote(int argc, const char **argv) {
bool Debugger::Cmd_ShowVocab(int argc, const char **argv) {
if (argc != 2) {
for (uint32 i = 0; i < _vm->_game->_scene.getVocabStringsCount(); i++) {
- DebugPrintf("%03d: '%s'\n", i, _vm->_game->_scene.getVocab(i + 1).c_str());
+ debugPrintf("%03d: '%s'\n", i, _vm->_game->_scene.getVocab(i + 1).c_str());
}
} else {
int vocabId = strToInt(argv[1]);
- DebugPrintf("%03d: '%s'\n", vocabId, _vm->_game->_scene.getVocab(vocabId + 1).c_str());
+ debugPrintf("%03d: '%s'\n", vocabId, _vm->_game->_scene.getVocab(vocabId + 1).c_str());
}
return true;
@@ -240,20 +240,20 @@ bool Debugger::Cmd_DumpVocab(int argc, const char **argv) {
outFile.flush();
outFile.close();
- DebugPrintf("Game vocab dumped\n");
+ debugPrintf("Game vocab dumped\n");
return true;
}
bool Debugger::Cmd_ShowMessage(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s <message number>\n", argv[0]);
+ debugPrintf("Usage: %s <message number>\n", argv[0]);
} else {
int messageId = strToInt(argv[1]);
Common::StringArray msg = _vm->_game->getMessage(messageId);
for (uint idx = 0; idx < msg.size(); ++idx) {
Common::String srcLine = msg[idx];
- DebugPrintf("%s\n", srcLine.c_str());
+ debugPrintf("%s\n", srcLine.c_str());
}
}
@@ -266,12 +266,12 @@ bool Debugger::Cmd_ShowItem(int argc, const char **argv) {
if (argc != 2) {
for (uint32 i = 0; i < objects.size(); i++) {
Common::String desc = _vm->_game->_scene.getVocab(objects[i]._descId);
- DebugPrintf("%03d: '%s'\n", i, desc.c_str());
+ debugPrintf("%03d: '%s'\n", i, desc.c_str());
}
} else {
int vocabId = strToInt(argv[1]);
Common::String desc = _vm->_game->_scene.getVocab(objects[vocabId]._descId);
- DebugPrintf("%03d: '%s'\n", vocabId, desc.c_str());
+ debugPrintf("%03d: '%s'\n", vocabId, desc.c_str());
}
return true;
@@ -301,7 +301,7 @@ bool Debugger::Cmd_DumpItems(int argc, const char **argv) {
outFile.flush();
outFile.close();
- DebugPrintf("Game items dumped\n");
+ debugPrintf("Game items dumped\n");
return true;
}
@@ -310,7 +310,7 @@ bool Debugger::Cmd_Item(int argc, const char **argv) {
InventoryObjects &objects = _vm->_game->_objects;
if (argc != 2) {
- DebugPrintf("Usage: %s <item number>\n", argv[0]);
+ debugPrintf("Usage: %s <item number>\n", argv[0]);
return true;
} else {
int objectId = strToInt(argv[1]);
@@ -318,7 +318,7 @@ bool Debugger::Cmd_Item(int argc, const char **argv) {
if (!objects.isInInventory(objectId))
objects.addToInventory(objectId);
- DebugPrintf("Item added.\n");
+ debugPrintf("Item added.\n");
return false;
}
}
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index d95c91e..ec0b5a0 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -70,7 +70,7 @@ MystConsole::~MystConsole() {
bool MystConsole::Cmd_ChangeCard(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: changeCard <card>\n");
+ debugPrintf("Usage: changeCard <card>\n");
return true;
}
@@ -81,20 +81,20 @@ bool MystConsole::Cmd_ChangeCard(int argc, const char **argv) {
}
bool MystConsole::Cmd_CurCard(int argc, const char **argv) {
- DebugPrintf("Current Card: %d\n", _vm->getCurCard());
+ debugPrintf("Current Card: %d\n", _vm->getCurCard());
return true;
}
bool MystConsole::Cmd_Var(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: var <var> (<value>)\n");
+ debugPrintf("Usage: var <var> (<value>)\n");
return true;
}
if (argc > 2)
_vm->_scriptParser->setVarValue((uint16)atoi(argv[1]), (uint16)atoi(argv[2]));
- DebugPrintf("%d = %d\n", (uint16)atoi(argv[1]), _vm->_scriptParser->getVar((uint16)atoi(argv[1])));
+ debugPrintf("%d = %d\n", (uint16)atoi(argv[1]), _vm->_scriptParser->getVar((uint16)atoi(argv[1])));
return true;
}
@@ -130,19 +130,19 @@ static const uint16 default_start_card[12] = {
};
bool MystConsole::Cmd_CurStack(int argc, const char **argv) {
- DebugPrintf("Current Stack: %s\n", mystStackNames[_vm->getCurStack()]);
+ debugPrintf("Current Stack: %s\n", mystStackNames[_vm->getCurStack()]);
return true;
}
bool MystConsole::Cmd_ChangeStack(int argc, const char **argv) {
if (argc != 2 && argc != 3) {
- DebugPrintf("Usage: changeStack <stack> [<card>]\n\n");
- DebugPrintf("Stacks:\n=======\n");
+ debugPrintf("Usage: changeStack <stack> [<card>]\n\n");
+ debugPrintf("Stacks:\n=======\n");
for (byte i = 0; i < ARRAYSIZE(mystStackNames); i++)
- DebugPrintf(" %s\n", mystStackNames[i]);
+ debugPrintf(" %s\n", mystStackNames[i]);
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -156,7 +156,7 @@ bool MystConsole::Cmd_ChangeStack(int argc, const char **argv) {
}
if (!stackNum) {
- DebugPrintf("\'%s\' is not a stack name!\n", argv[1]);
+ debugPrintf("\'%s\' is not a stack name!\n", argv[1]);
return true;
}
@@ -177,7 +177,7 @@ bool MystConsole::Cmd_ChangeStack(int argc, const char **argv) {
bool MystConsole::Cmd_DrawImage(int argc, const char **argv) {
if (argc != 2 && argc != 6) {
- DebugPrintf("Usage: drawImage <image> [<left> <top> <right> <bottom>]\n");
+ debugPrintf("Usage: drawImage <image> [<left> <top> <right> <bottom>]\n");
return true;
}
@@ -195,8 +195,8 @@ bool MystConsole::Cmd_DrawImage(int argc, const char **argv) {
bool MystConsole::Cmd_DrawRect(int argc, const char **argv) {
if (argc != 5 && argc != 2) {
- DebugPrintf("Usage: drawRect <left> <top> <right> <bottom>\n");
- DebugPrintf("Usage: drawRect <resource id>\n");
+ debugPrintf("Usage: drawRect <left> <top> <right> <bottom>\n");
+ debugPrintf("Usage: drawRect <resource id>\n");
return true;
}
@@ -213,7 +213,7 @@ bool MystConsole::Cmd_DrawRect(int argc, const char **argv) {
bool MystConsole::Cmd_SetResourceEnable(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Usage: setResourceEnable <resource id> <bool>\n");
+ debugPrintf("Usage: setResourceEnable <resource id> <bool>\n");
return true;
}
@@ -223,7 +223,7 @@ bool MystConsole::Cmd_SetResourceEnable(int argc, const char **argv) {
bool MystConsole::Cmd_PlaySound(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: playSound <value>\n");
+ debugPrintf("Usage: playSound <value>\n");
return true;
}
@@ -234,7 +234,7 @@ bool MystConsole::Cmd_PlaySound(int argc, const char **argv) {
}
bool MystConsole::Cmd_StopSound(int argc, const char **argv) {
- DebugPrintf("Stopping Sound\n");
+ debugPrintf("Stopping Sound\n");
_vm->_sound->stopSound();
@@ -243,8 +243,8 @@ bool MystConsole::Cmd_StopSound(int argc, const char **argv) {
bool MystConsole::Cmd_PlayMovie(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: playMovie <name> [<stack>] [<left> <top>]\n");
- DebugPrintf("NOTE: The movie will play *once* in the background.\n");
+ debugPrintf("Usage: playMovie <name> [<stack>] [<left> <top>]\n");
+ debugPrintf("NOTE: The movie will play *once* in the background.\n");
return true;
}
@@ -258,7 +258,7 @@ bool MystConsole::Cmd_PlayMovie(int argc, const char **argv) {
}
if (!stackNum) {
- DebugPrintf("\'%s\' is not a stack name!\n", argv[2]);
+ debugPrintf("\'%s\' is not a stack name!\n", argv[2]);
return true;
}
}
@@ -277,7 +277,7 @@ bool MystConsole::Cmd_PlayMovie(int argc, const char **argv) {
bool MystConsole::Cmd_DisableInitOpcodes(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: disableInitOpcodes\n");
+ debugPrintf("Usage: disableInitOpcodes\n");
return true;
}
@@ -289,7 +289,7 @@ bool MystConsole::Cmd_DisableInitOpcodes(int argc, const char **argv) {
bool MystConsole::Cmd_Cache(int argc, const char **argv) {
if (argc > 2) {
- DebugPrintf("Usage: cache on/off - Omit parameter to get current state\n");
+ debugPrintf("Usage: cache on/off - Omit parameter to get current state\n");
return true;
}
@@ -304,15 +304,15 @@ bool MystConsole::Cmd_Cache(int argc, const char **argv) {
_vm->setCacheState(state);
}
- DebugPrintf("Cache: %s\n", state ? "Enabled" : "Disabled");
+ debugPrintf("Cache: %s\n", state ? "Enabled" : "Disabled");
return true;
}
bool MystConsole::Cmd_Resources(int argc, const char **argv) {
- DebugPrintf("Resources in card %d:\n", _vm->getCurCard());
+ debugPrintf("Resources in card %d:\n", _vm->getCurCard());
for (uint i = 0; i < _vm->_resources.size(); i++) {
- DebugPrintf("#%2d %s\n", i, _vm->_resources[i]->describe().c_str());
+ debugPrintf("#%2d %s\n", i, _vm->_resources[i]->describe().c_str());
}
return true;
@@ -346,7 +346,7 @@ RivenConsole::~RivenConsole() {
bool RivenConsole::Cmd_ChangeCard(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: changeCard <card>\n");
+ debugPrintf("Usage: changeCard <card>\n");
return true;
}
@@ -358,19 +358,19 @@ bool RivenConsole::Cmd_ChangeCard(int argc, const char **argv) {
}
bool RivenConsole::Cmd_CurCard(int argc, const char **argv) {
- DebugPrintf("Current Card: %d\n", _vm->getCurCard());
+ debugPrintf("Current Card: %d\n", _vm->getCurCard());
return true;
}
bool RivenConsole::Cmd_Var(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: var <var name> (<value>)\n");
+ debugPrintf("Usage: var <var name> (<value>)\n");
return true;
}
if (!_vm->_vars.contains(argv[1])) {
- DebugPrintf("Unknown variable '%s'\n", argv[1]);
+ debugPrintf("Unknown variable '%s'\n", argv[1]);
return true;
}
@@ -379,13 +379,13 @@ bool RivenConsole::Cmd_Var(int argc, const char **argv) {
if (argc > 2)
var = (uint32)atoi(argv[2]);
- DebugPrintf("%s = %d\n", argv[1], var);
+ debugPrintf("%s = %d\n", argv[1], var);
return true;
}
bool RivenConsole::Cmd_PlaySound(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: playSound <value>\n");
+ debugPrintf("Usage: playSound <value>\n");
return true;
}
@@ -397,7 +397,7 @@ bool RivenConsole::Cmd_PlaySound(int argc, const char **argv) {
bool RivenConsole::Cmd_PlaySLST(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: playSLST <slst index> <card, default = current>\n");
+ debugPrintf("Usage: playSLST <slst index> <card, default = current>\n");
return true;
}
@@ -412,7 +412,7 @@ bool RivenConsole::Cmd_PlaySLST(int argc, const char **argv) {
}
bool RivenConsole::Cmd_StopSound(int argc, const char **argv) {
- DebugPrintf("Stopping Sound\n");
+ debugPrintf("Stopping Sound\n");
_vm->_sound->stopSound();
_vm->_sound->stopAllSLST();
@@ -420,20 +420,20 @@ bool RivenConsole::Cmd_StopSound(int argc, const char **argv) {
}
bool RivenConsole::Cmd_CurStack(int argc, const char **argv) {
- DebugPrintf("Current Stack: %s\n", _vm->getStackName(_vm->getCurStack()).c_str());
+ debugPrintf("Current Stack: %s\n", _vm->getStackName(_vm->getCurStack()).c_str());
return true;
}
bool RivenConsole::Cmd_ChangeStack(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Usage: changeStack <stack> <card>\n\n");
- DebugPrintf("Stacks:\n=======\n");
+ debugPrintf("Usage: changeStack <stack> <card>\n\n");
+ debugPrintf("Stacks:\n=======\n");
for (uint i = kStackFirst; i <= kStackLast; i++)
- DebugPrintf(" %s\n", _vm->getStackName(i).c_str());
+ debugPrintf(" %s\n", _vm->getStackName(i).c_str());
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -448,7 +448,7 @@ bool RivenConsole::Cmd_ChangeStack(int argc, const char **argv) {
}
if (stack == kStackUnknown) {
- DebugPrintf("\'%s\' is not a stack name!\n", argv[1]);
+ debugPrintf("\'%s\' is not a stack name!\n", argv[1]);
return true;
}
@@ -459,18 +459,18 @@ bool RivenConsole::Cmd_ChangeStack(int argc, const char **argv) {
}
bool RivenConsole::Cmd_Hotspots(int argc, const char **argv) {
- DebugPrintf("Current card (%d) has %d hotspots:\n", _vm->getCurCard(), _vm->getHotspotCount());
+ debugPrintf("Current card (%d) has %d hotspots:\n", _vm->getCurCard(), _vm->getHotspotCount());
for (uint16 i = 0; i < _vm->getHotspotCount(); i++) {
- DebugPrintf("Hotspot %d, index %d, BLST ID %d (", i, _vm->_hotspots[i].index, _vm->_hotspots[i].blstID);
+ debugPrintf("Hotspot %d, index %d, BLST ID %d (", i, _vm->_hotspots[i].index, _vm->_hotspots[i].blstID);
if (_vm->_hotspots[i].enabled)
- DebugPrintf("enabled");
+ debugPrintf("enabled");
else
- DebugPrintf("disabled");
+ debugPrintf("disabled");
- DebugPrintf(") - (%d, %d, %d, %d)\n", _vm->_hotspots[i].rect.left, _vm->_hotspots[i].rect.top, _vm->_hotspots[i].rect.right, _vm->_hotspots[i].rect.bottom);
- DebugPrintf(" Name = %s\n", _vm->getHotspotName(i).c_str());
+ debugPrintf(") - (%d, %d, %d, %d)\n", _vm->_hotspots[i].rect.left, _vm->_hotspots[i].rect.top, _vm->_hotspots[i].rect.right, _vm->_hotspots[i].rect.bottom);
+ debugPrintf(" Name = %s\n", _vm->getHotspotName(i).c_str());
}
return true;
@@ -480,15 +480,15 @@ bool RivenConsole::Cmd_ZipMode(int argc, const char **argv) {
uint32 &zipModeActive = _vm->_vars["azip"];
zipModeActive = !zipModeActive;
- DebugPrintf("Zip Mode is ");
- DebugPrintf(zipModeActive ? "Enabled" : "Disabled");
- DebugPrintf("\n");
+ debugPrintf("Zip Mode is ");
+ debugPrintf(zipModeActive ? "Enabled" : "Disabled");
+ debugPrintf("\n");
return true;
}
bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
if (argc < 4) {
- DebugPrintf("Usage: dumpScript <stack> <CARD or HSPT> <card>\n");
+ debugPrintf("Usage: dumpScript <stack> <CARD or HSPT> <card>\n");
return true;
}
@@ -503,7 +503,7 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
}
if (newStack == kStackUnknown) {
- DebugPrintf("\'%s\' is not a stack name!\n", argv[1]);
+ debugPrintf("\'%s\' is not a stack name!\n", argv[1]);
return true;
}
@@ -592,7 +592,7 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
delete hsptStream;
} else {
- DebugPrintf("%s doesn't have any scripts!\n", argv[2]);
+ debugPrintf("%s doesn't have any scripts!\n", argv[2]);
}
// See above for why this is printed via debugN
@@ -600,18 +600,18 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
_vm->changeToStack(oldStack);
- DebugPrintf("Script dump complete.\n");
+ debugPrintf("Script dump complete.\n");
return true;
}
bool RivenConsole::Cmd_ListZipCards(int argc, const char **argv) {
if (_vm->_zipModeData.size() == 0) {
- DebugPrintf("No zip card data.\n");
+ debugPrintf("No zip card data.\n");
} else {
- DebugPrintf("Listing zip cards:\n");
+ debugPrintf("Listing zip cards:\n");
for (uint32 i = 0; i < _vm->_zipModeData.size(); i++)
- DebugPrintf("ID = %d, Name = %s\n", _vm->_zipModeData[i].id, _vm->_zipModeData[i].name.c_str());
+ debugPrintf("ID = %d, Name = %s\n", _vm->_zipModeData[i].id, _vm->_zipModeData[i].name.c_str());
}
return true;
@@ -619,7 +619,7 @@ bool RivenConsole::Cmd_ListZipCards(int argc, const char **argv) {
bool RivenConsole::Cmd_GetRMAP(int argc, const char **argv) {
uint32 rmapCode = _vm->getCurCardRMAP();
- DebugPrintf("RMAP for %s %d = %08x\n", _vm->getStackName(_vm->getCurStack()).c_str(), _vm->getCurCard(), rmapCode);
+ debugPrintf("RMAP for %s %d = %08x\n", _vm->getStackName(_vm->getCurStack()).c_str(), _vm->getCurCard(), rmapCode);
return true;
}
@@ -633,20 +633,20 @@ bool RivenConsole::Cmd_Combos(int argc, const char **argv) {
uint32 prisonCombo = _vm->_vars["pcorrectorder"];
uint32 domeCombo = _vm->_vars["adomecombo"];
- DebugPrintf("Telescope Combo:\n ");
+ debugPrintf("Telescope Combo:\n ");
for (int i = 0; i < 5; i++)
- DebugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(teleCombo, i));
+ debugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(teleCombo, i));
- DebugPrintf("\nPrison Combo:\n ");
+ debugPrintf("\nPrison Combo:\n ");
for (int i = 0; i < 5; i++)
- DebugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(prisonCombo, i));
+ debugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(prisonCombo, i));
- DebugPrintf("\nDome Combo:\n ");
+ debugPrintf("\nDome Combo:\n ");
for (int i = 1; i <= 25; i++)
if (domeCombo & (1 << (25 - i)))
- DebugPrintf("%d ", i);
+ debugPrintf("%d ", i);
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -654,7 +654,7 @@ bool RivenConsole::Cmd_SliderState(int argc, const char **argv) {
if (argc > 1)
_vm->_externalScriptHandler->setDomeSliderState((uint32)atoi(argv[1]));
- DebugPrintf("Dome Slider State = %08x\n", _vm->_externalScriptHandler->getDomeSliderState());
+ debugPrintf("Dome Slider State = %08x\n", _vm->_externalScriptHandler->getDomeSliderState());
return true;
}
@@ -672,7 +672,7 @@ LivingBooksConsole::~LivingBooksConsole() {
bool LivingBooksConsole::Cmd_PlaySound(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: playSound <value>\n");
+ debugPrintf("Usage: playSound <value>\n");
return true;
}
@@ -682,7 +682,7 @@ bool LivingBooksConsole::Cmd_PlaySound(int argc, const char **argv) {
}
bool LivingBooksConsole::Cmd_StopSound(int argc, const char **argv) {
- DebugPrintf("Stopping Sound\n");
+ debugPrintf("Stopping Sound\n");
_vm->_sound->stopSound();
return true;
@@ -690,7 +690,7 @@ bool LivingBooksConsole::Cmd_StopSound(int argc, const char **argv) {
bool LivingBooksConsole::Cmd_DrawImage(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: drawImage <value>\n");
+ debugPrintf("Usage: drawImage <value>\n");
return true;
}
@@ -701,13 +701,13 @@ bool LivingBooksConsole::Cmd_DrawImage(int argc, const char **argv) {
bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) {
if (argc < 2 || argc > 3) {
- DebugPrintf("Usage: changePage <page>[.<subpage>] [<mode>]\n");
+ debugPrintf("Usage: changePage <page>[.<subpage>] [<mode>]\n");
return true;
}
int page, subpage = 0;
if (sscanf(argv[1], "%d.%d", &page, &subpage) == 0) {
- DebugPrintf("Usage: changePage <page>[.<subpage>] [<mode>]\n");
+ debugPrintf("Usage: changePage <page>[.<subpage>] [<mode>]\n");
return true;
}
LBMode mode = argc == 2 ? _vm->getCurMode() : (LBMode)atoi(argv[2]);
@@ -718,7 +718,7 @@ bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) {
if (_vm->loadPage(mode, page, subpage))
return false;
}
- DebugPrintf("no such page %d.%d\n", page, subpage);
+ debugPrintf("no such page %d.%d\n", page, subpage);
return true;
}
@@ -740,7 +740,7 @@ CSTimeConsole::~CSTimeConsole() {
bool CSTimeConsole::Cmd_PlaySound(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: playSound <value>\n");
+ debugPrintf("Usage: playSound <value>\n");
return true;
}
@@ -750,7 +750,7 @@ bool CSTimeConsole::Cmd_PlaySound(int argc, const char **argv) {
}
bool CSTimeConsole::Cmd_StopSound(int argc, const char **argv) {
- DebugPrintf("Stopping Sound\n");
+ debugPrintf("Stopping Sound\n");
_vm->_sound->stopSound();
return true;
@@ -758,7 +758,7 @@ bool CSTimeConsole::Cmd_StopSound(int argc, const char **argv) {
bool CSTimeConsole::Cmd_DrawImage(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: drawImage <value>\n");
+ debugPrintf("Usage: drawImage <value>\n");
return true;
}
@@ -769,7 +769,7 @@ bool CSTimeConsole::Cmd_DrawImage(int argc, const char **argv) {
bool CSTimeConsole::Cmd_DrawSubimage(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Usage: drawSubimage <value> <subimage>\n");
+ debugPrintf("Usage: drawSubimage <value> <subimage>\n");
return true;
}
@@ -780,7 +780,7 @@ bool CSTimeConsole::Cmd_DrawSubimage(int argc, const char **argv) {
bool CSTimeConsole::Cmd_ChangeCase(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: changeCase <value>\n");
+ debugPrintf("Usage: changeCase <value>\n");
return true;
}
@@ -790,7 +790,7 @@ bool CSTimeConsole::Cmd_ChangeCase(int argc, const char **argv) {
bool CSTimeConsole::Cmd_ChangeScene(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: changeScene <value>\n");
+ debugPrintf("Usage: changeScene <value>\n");
return true;
}
@@ -800,12 +800,12 @@ bool CSTimeConsole::Cmd_ChangeScene(int argc, const char **argv) {
bool CSTimeConsole::Cmd_CaseVariable(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: caseVariable <id> [<value>]\n");
+ debugPrintf("Usage: caseVariable <id> [<value>]\n");
return true;
}
if (argc == 2) {
- DebugPrintf("case variable %d has value %d\n", atoi(argv[1]), _vm->_caseVariable[atoi(argv[1])]);
+ debugPrintf("case variable %d has value %d\n", atoi(argv[1]), _vm->_caseVariable[atoi(argv[1])]);
} else {
_vm->_caseVariable[atoi(argv[1])] = atoi(argv[2]);
}
@@ -814,7 +814,7 @@ bool CSTimeConsole::Cmd_CaseVariable(int argc, const char **argv) {
bool CSTimeConsole::Cmd_InvItem(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Usage: invItem <id> <0 or 1>\n");
+ debugPrintf("Usage: invItem <id> <0 or 1>\n");
return true;
}
diff --git a/engines/neverhood/console.cpp b/engines/neverhood/console.cpp
index a4d1366..b35c29b 100644
--- a/engines/neverhood/console.cpp
+++ b/engines/neverhood/console.cpp
@@ -55,33 +55,33 @@ bool Console::Cmd_Scene(int argc, const char **argv) {
const char *sceneTypes[] = { "normal", "smacker", "navigation" };
- DebugPrintf("Current module: %d, previous module: %d, scene %d (%s scene)\n", currentModule, previousModule, scenenNum, sceneTypes[sceneType]);
+ debugPrintf("Current module: %d, previous module: %d, scene %d (%s scene)\n", currentModule, previousModule, scenenNum, sceneTypes[sceneType]);
if (sceneType == kSceneTypeNormal) {
Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
// Normal scenes have a background and a cursor file hash
- DebugPrintf("Background hash: 0x%x, cursor hash: 0x%x\n", scene->getBackgroundFileHash(), scene->getCursorFileHash());
+ debugPrintf("Background hash: 0x%x, cursor hash: 0x%x\n", scene->getBackgroundFileHash(), scene->getCursorFileHash());
} else if (sceneType == kSceneTypeSmacker) {
SmackerScene *scene = (SmackerScene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
// Smacker scenes have a file hash, or a list of hashes
// TODO: Only the first file hash is shown - any additional hashes, found in
// scenes with a list of hashes (two scenes in module 1100 and the making of
// video) aren't shown yet
- DebugPrintf("File hash: 0x%x\n", scene->getSmackerFileHash());
+ debugPrintf("File hash: 0x%x\n", scene->getSmackerFileHash());
} else if (sceneType == kSceneTypeNavigation) {
NavigationScene *scene = (NavigationScene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
// Navigation scenes have a navigation list and its index
NavigationList *navigationList = _vm->_staticData->getNavigationList(scene->getNavigationListId());
int navigationIndex = scene->getGlobalVar(V_NAVIGATION_INDEX);
NavigationItem curNavigation = (*navigationList)[navigationIndex];
- DebugPrintf("Navigation list ID: 0x%x, index: %d\n", scene->getNavigationListId(), navigationIndex);
- DebugPrintf("File hash: 0x%x, cursor hash: 0x%x, Smacker hashes: [left: 0x%x, middle: 0x%x, right: 0x%x\n",
+ debugPrintf("Navigation list ID: 0x%x, index: %d\n", scene->getNavigationListId(), navigationIndex);
+ debugPrintf("File hash: 0x%x, cursor hash: 0x%x, Smacker hashes: [left: 0x%x, middle: 0x%x, right: 0x%x\n",
curNavigation.fileHash, curNavigation.mouseCursorFileHash,
curNavigation.leftSmackerFileHash, curNavigation.middleSmackerFileHash, curNavigation.rightSmackerFileHash);
}
- DebugPrintf("Use %s <module> <scene> to change scenes\n", argv[0]);
- DebugPrintf("Modules are incremental by 100, from 1000 to 3000\n");
+ debugPrintf("Use %s <module> <scene> to change scenes\n", argv[0]);
+ debugPrintf("Modules are incremental by 100, from 1000 to 3000\n");
} else {
int newModule = atoi(argv[1]);
int newScene = atoi(argv[2]);
@@ -102,17 +102,17 @@ bool Console::Cmd_Surfaces(int argc, const char **argv) {
bool Console::Cmd_Cheat(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Cheats for various puzzles in the game\n");
- DebugPrintf("Use %s <cheatname> to use a cheat.\n", argv[0]);
- DebugPrintf("Cheats:\n-------\n");
- DebugPrintf(" buttons - enables all 3 buttons on the door in the purple building, module 3000, scene 9\n");
- DebugPrintf(" cannon - sets the correct cannon combination in module 3000, scene 8\n");
- DebugPrintf(" dice - shows the correct dice combination in the teddy bear puzzle, module 1100, scene 6\n");
- DebugPrintf(" memory - solves the memory puzzle, module 1400, scene 4\n");
- DebugPrintf(" music - shows the correct index in the radio music puzzle, module 2800, scene 1\n");
- DebugPrintf(" radio - enables the radio, module 3000, scene 9 - same as pulling the rightmost cord in the flytrap room\n");
- DebugPrintf(" symbols - solves the symbols puzzle, module 1600, scene 8. Only available in that room\n");
- DebugPrintf(" tubes - shows the correct test tube combination in module 2800, scenes 7 and 10\n");
+ debugPrintf("Cheats for various puzzles in the game\n");
+ debugPrintf("Use %s <cheatname> to use a cheat.\n", argv[0]);
+ debugPrintf("Cheats:\n-------\n");
+ debugPrintf(" buttons - enables all 3 buttons on the door in the purple building, module 3000, scene 9\n");
+ debugPrintf(" cannon - sets the correct cannon combination in module 3000, scene 8\n");
+ debugPrintf(" dice - shows the correct dice combination in the teddy bear puzzle, module 1100, scene 6\n");
+ debugPrintf(" memory - solves the memory puzzle, module 1400, scene 4\n");
+ debugPrintf(" music - shows the correct index in the radio music puzzle, module 2800, scene 1\n");
+ debugPrintf(" radio - enables the radio, module 3000, scene 9 - same as pulling the rightmost cord in the flytrap room\n");
+ debugPrintf(" symbols - solves the symbols puzzle, module 1600, scene 8. Only available in that room\n");
+ debugPrintf(" tubes - shows the correct test tube combination in module 2800, scenes 7 and 10\n");
return true;
}
@@ -127,7 +127,7 @@ bool Console::Cmd_Cheat(int argc, const char **argv) {
scene->setSubVar(VA_LOCKS_DISABLED, 0x40119852, 1); // kScene3010ButtonNameHashes[1]
scene->setSubVar(VA_LOCKS_DISABLED, 0x01180951, 1); // kScene3010ButtonNameHashes[2]
- DebugPrintf("All 3 door buttons have been enabled\n");
+ debugPrintf("All 3 door buttons have been enabled\n");
} else if (cheatName == "cannon") {
Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
@@ -137,10 +137,10 @@ bool Console::Cmd_Cheat(int argc, const char **argv) {
for (int i = 3; i < 6; i++)
scene->setSubVar(VA_CURR_CANNON_SYMBOLS, i, scene->getSubVar(VA_GOOD_CANNON_SYMBOLS_2, i - 3));
- DebugPrintf("Puzzle solved\n");
+ debugPrintf("Puzzle solved\n");
} else if (cheatName == "dice") {
Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
- DebugPrintf("Good: (%d %d %d), current: (%d %d %d)\n",
+ debugPrintf("Good: (%d %d %d), current: (%d %d %d)\n",
scene->getSubVar(VA_GOOD_DICE_NUMBERS, 0), scene->getSubVar(VA_GOOD_DICE_NUMBERS, 1), scene->getSubVar(VA_GOOD_DICE_NUMBERS, 2),
scene->getSubVar(VA_CURR_DICE_NUMBERS, 0), scene->getSubVar(VA_CURR_DICE_NUMBERS, 1), scene->getSubVar(VA_CURR_DICE_NUMBERS, 2)
);
@@ -162,15 +162,15 @@ bool Console::Cmd_Cheat(int argc, const char **argv) {
}
}
- DebugPrintf("Puzzle solved\n");
+ debugPrintf("Puzzle solved\n");
} else if (cheatName == "music") {
Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
- DebugPrintf("Good music index: %d, current radio music index: %d\n", scene->getGlobalVar(V_CURR_RADIO_MUSIC_INDEX), scene->getGlobalVar(V_GOOD_RADIO_MUSIC_INDEX));
+ debugPrintf("Good music index: %d, current radio music index: %d\n", scene->getGlobalVar(V_CURR_RADIO_MUSIC_INDEX), scene->getGlobalVar(V_GOOD_RADIO_MUSIC_INDEX));
} else if (cheatName == "radio") {
Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
scene->setGlobalVar(V_RADIO_ENABLED, 1);
- DebugPrintf("The radio has been enabled\n");
+ debugPrintf("The radio has been enabled\n");
} else if (cheatName == "symbols") {
if (moduleNum == 1600 && sceneNum == 8) {
Scene1609 *scene = ((Scene1609 *)((Module1600 *)_vm->_gameModule->_childObject)->_childObject);
@@ -183,14 +183,14 @@ bool Console::Cmd_Cheat(int argc, const char **argv) {
scene->_symbolPosition = 11;
scene->_countdown1 = 36;
- DebugPrintf("Puzzle solved\n");
+ debugPrintf("Puzzle solved\n");
} else {
- DebugPrintf("Only available in module 1600, scene 8\n");
+ debugPrintf("Only available in module 1600, scene 8\n");
}
} else if (cheatName == "tubes") {
Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
- DebugPrintf("Tube set 1: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2));
- DebugPrintf("Tube set 2: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 2));
+ debugPrintf("Tube set 1: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2));
+ debugPrintf("Tube set 2: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 2));
}
return true;
@@ -204,7 +204,7 @@ bool Console::Cmd_Dumpvars(int argc, const char **argv) {
bool Console::Cmd_PlaySound(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: %s <sound hash>\n", argv[0]);
+ debugPrintf("Usage: %s <sound hash>\n", argv[0]);
} else {
uint32 soundHash = strtol(argv[1], NULL, 0);
AudioResourceManSoundItem *soundItem = new AudioResourceManSoundItem(_vm, soundHash);
@@ -223,17 +223,17 @@ bool Console::Cmd_CheckResource(int argc, const char **argv) {
const char *resourceNames[] = { "unknown", "unknown", "bitmap", "palette", "animation", "data", "text", "sound", "music", "unknown", "video" };
if (argc < 2) {
- DebugPrintf("Gets information about a resource\n");
- DebugPrintf("Usage: %s <resource hash>\n", argv[0]);
+ debugPrintf("Gets information about a resource\n");
+ debugPrintf("Usage: %s <resource hash>\n", argv[0]);
} else {
uint32 resourceHash = strtol(argv[1], NULL, 0);
ResourceHandle handle;
_vm->_res->queryResource(resourceHash, handle);
if (!handle.isValid()) {
- DebugPrintf("Invalid resource hash\n");
+ debugPrintf("Invalid resource hash\n");
} else {
- DebugPrintf("Resource type: %d (%s). Size: %d bytes\n", handle.type(), resourceNames[handle.type()], handle.size());
+ debugPrintf("Resource type: %d (%s). Size: %d bytes\n", handle.type(), resourceNames[handle.type()], handle.size());
}
}
@@ -242,8 +242,8 @@ bool Console::Cmd_CheckResource(int argc, const char **argv) {
bool Console::Cmd_DumpResource(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Dumps a resource to disk\n");
- DebugPrintf("Usage: %s <resource hash> <output file>\n", argv[0]);
+ debugPrintf("Dumps a resource to disk\n");
+ debugPrintf("Usage: %s <resource hash> <output file>\n", argv[0]);
} else {
uint32 resourceHash = strtol(argv[1], NULL, 0);
const char *outFileName = argv[2];
@@ -251,7 +251,7 @@ bool Console::Cmd_DumpResource(int argc, const char **argv) {
_vm->_res->queryResource(resourceHash, handle);
if (!handle.isValid()) {
- DebugPrintf("Invalid resource hash\n");
+ debugPrintf("Invalid resource hash\n");
} else {
_vm->_res->loadResource(handle, _vm->applyResourceFixes());
Common::DumpFile outFile;
diff --git a/engines/neverhood/gamevars.cpp b/engines/neverhood/gamevars.cpp
index 72b688c..dcbe558 100644
--- a/engines/neverhood/gamevars.cpp
+++ b/engines/neverhood/gamevars.cpp
@@ -127,7 +127,7 @@ int16 GameVars::getSubVarIndex(int16 varIndex, uint32 subNameHash) {
void GameVars::dumpVars(Console *con) {
for (Common::Array<GameVar>::iterator it = _vars.begin(); it != _vars.end(); ++it) {
GameVar gameVar = *it;
- con->DebugPrintf("hash: %08X, var: %08X, first index: %3d, next index: %3d\n", gameVar.nameHash, gameVar.value, gameVar.firstIndex, gameVar.nextIndex);
+ con->debugPrintf("hash: %08X, var: %08X, first index: %3d, next index: %3d\n", gameVar.nameHash, gameVar.value, gameVar.firstIndex, gameVar.nextIndex);
}
}
diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp
index 58056b6..1a8e74d 100644
--- a/engines/neverhood/scene.cpp
+++ b/engines/neverhood/scene.cpp
@@ -148,7 +148,7 @@ void Scene::printSurfaces(Console *con) {
NDrawRect drawRect = _surfaces[index]->getDrawRect();
NRect clipRect = _surfaces[index]->getClipRect();
int priority = _surfaces[index]->getPriority();
- con->DebugPrintf("%d ('%s'): Priority %d, draw rect (%d, %d, %d, %d), clip rect (%d, %d, %d, %d)\n",
+ con->debugPrintf("%d ('%s'): Priority %d, draw rect (%d, %d, %d, %d), clip rect (%d, %d, %d, %d)\n",
index, _surfaces[index]->getName().c_str(), priority,
drawRect.x, drawRect.y, drawRect.x2(), drawRect.y2(),
clipRect.x1, clipRect.y1, clipRect.x2, clipRect.y2);
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp
index 1fea73a..c5e6941 100644
--- a/engines/parallaction/debug.cpp
+++ b/engines/parallaction/debug.cpp
@@ -81,7 +81,7 @@ bool Debugger::Cmd_Location(int argc, const char **argv) {
break;
case 1:
- DebugPrintf("location <location name> [character name]\n");
+ debugPrintf("location <location name> [character name]\n");
}
@@ -90,13 +90,13 @@ bool Debugger::Cmd_Location(int argc, const char **argv) {
bool Debugger::Cmd_Locations(int argc, const char **argv) {
- DebugPrintf("+------------------------------+---------+\n"
+ debugPrintf("+------------------------------+---------+\n"
"| location name | flags |\n"
"+------------------------------+---------+\n");
for (uint i = 0; i < _vm->_numLocations; i++) {
- DebugPrintf("|%-30s| %08x|\n", _vm->_locationNames[i], _vm->_localFlags[i]);
+ debugPrintf("|%-30s| %08x|\n", _vm->_locationNames[i], _vm->_localFlags[i]);
}
- DebugPrintf("+------------------------------+---------+\n");
+ debugPrintf("+------------------------------+---------+\n");
return true;
}
@@ -105,14 +105,14 @@ bool Debugger::Cmd_GlobalFlags(int argc, const char **argv) {
uint32 flags = g_globalFlags;
- DebugPrintf("+------------------------------+---------+\n"
+ debugPrintf("+------------------------------+---------+\n"
"| flag name | value |\n"
"+------------------------------+---------+\n");
for (uint i = 0; i < _vm->_globalFlagsNames->count(); i++) {
const char *value = ((flags & (1 << i)) == 0) ? "OFF" : "ON";
- DebugPrintf("|%-30s| %-6s|\n", _vm->_globalFlagsNames->item(i), value);
+ debugPrintf("|%-30s| %-6s|\n", _vm->_globalFlagsNames->item(i), value);
}
- DebugPrintf("+------------------------------+---------+\n");
+ debugPrintf("+------------------------------+---------+\n");
return true;
}
@@ -125,7 +125,7 @@ bool Debugger::Cmd_ToggleGlobalFlag(int argc, const char **argv) {
case 2:
i = _vm->_globalFlagsNames->lookup(argv[1]);
if (i == Table::notFound) {
- DebugPrintf("invalid flag '%s'\n", argv[1]);
+ debugPrintf("invalid flag '%s'\n", argv[1]);
} else {
i--;
if ((g_globalFlags & (1 << i)) == 0)
@@ -136,7 +136,7 @@ bool Debugger::Cmd_ToggleGlobalFlag(int argc, const char **argv) {
break;
default:
- DebugPrintf("toggleglobalflag <flag name>\n");
+ debugPrintf("toggleglobalflag <flag name>\n");
}
@@ -147,14 +147,14 @@ bool Debugger::Cmd_LocalFlags(int argc, const char **argv) {
uint32 flags = _vm->getLocationFlags();
- DebugPrintf("+------------------------------+---------+\n"
+ debugPrintf("+------------------------------+---------+\n"
"| flag name | value |\n"
"+------------------------------+---------+\n");
for (uint i = 0; i < _vm->_localFlagNames->count(); i++) {
const char *value = ((flags & (1 << i)) == 0) ? "OFF" : "ON";
- DebugPrintf("|%-30s| %-6s|\n", _vm->_localFlagNames->item(i), value);
+ debugPrintf("|%-30s| %-6s|\n", _vm->_localFlagNames->item(i), value);
}
- DebugPrintf("+------------------------------+---------+\n");
+ debugPrintf("+------------------------------+---------+\n");
return true;
}
@@ -162,13 +162,13 @@ bool Debugger::Cmd_LocalFlags(int argc, const char **argv) {
bool Debugger::Cmd_Give(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("give <item name>\n");
+ debugPrintf("give <item name>\n");
} else {
int index = _vm->_objectsNames->lookup(argv[1]);
if (index != Table::notFound)
_vm->addInventoryItem(index + 4);
else
- DebugPrintf("invalid item name '%s'\n", argv[1]);
+ debugPrintf("invalid item name '%s'\n", argv[1]);
}
return true;
@@ -181,15 +181,15 @@ bool Debugger::Cmd_Zones(int argc, const char **argv) {
ZoneList::iterator e = _vm->_location._zones.end();
Common::Rect r;
- DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n"
+ debugPrintf("+--------------------+---+---+---+---+--------+--------+\n"
"| name | l | t | r | b | type | flag |\n"
"+--------------------+---+---+---+---+--------+--------+\n");
for ( ; b != e; ++b) {
ZonePtr z = *b;
z->getRect(r);
- DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", z->_name, r.left, r.top, r.right, r.bottom, z->_type, z->_flags );
+ debugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", z->_name, r.left, r.top, r.right, r.bottom, z->_type, z->_flags );
}
- DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n");
+ debugPrintf("+--------------------+---+---+---+---+--------+--------+\n");
return true;
@@ -260,15 +260,15 @@ bool Debugger::Cmd_Animations(int argc, const char **argv) {
AnimationList::iterator e = _vm->_location._animations.end();
Common::String flags;
- DebugPrintf("+--------------------+----+----+----+---+--------+----------------------------------------+\n"
+ debugPrintf("+--------------------+----+----+----+---+--------+----------------------------------------+\n"
"| name | x | y | z | f | type | flags | \n"
"+--------------------+----+----+----+---+--------+----------------------------------------+\n");
for ( ; b != e; ++b) {
AnimationPtr a = *b;
flags = decodeZoneFlags(a->_flags);
- DebugPrintf("|%-20s|%4i|%4i|%4i|%3i|%8x|%-40s|\n", a->_name, a->getX(), a->getY(), a->getZ(), a->getF(), a->_type, flags.c_str() );
+ debugPrintf("|%-20s|%4i|%4i|%4i|%3i|%8x|%-40s|\n", a->_name, a->getX(), a->getY(), a->getZ(), a->getF(), a->_type, flags.c_str() );
}
- DebugPrintf("+--------------------+---+---+---+---+--------+----------------------------------------+\n");
+ debugPrintf("+--------------------+---+---+---+---+--------+----------------------------------------+\n");
return true;
@@ -278,7 +278,7 @@ bool Debugger::Cmd_GfxObjects(int argc, const char **argv) {
const char *objType[] = { "DOOR", "GET", "ANIM" };
- DebugPrintf("+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n"
+ debugPrintf("+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n"
"| name | x | y | w | h | z | layer | f | type |\n"
"+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n");
@@ -289,11 +289,11 @@ bool Debugger::Cmd_GfxObjects(int argc, const char **argv) {
for ( ; b != e; ++b) {
GfxObj *obj = *b;
obj->getRect(obj->frame, r);
- DebugPrintf("|%-20s|%5i|%5i|%5i|%5i|%5i|%7i|%5i|%8s|\n", obj->getName(), r.left, r.top, r.width(), r.height(),
+ debugPrintf("|%-20s|%5i|%5i|%5i|%5i|%5i|%7i|%5i|%8s|\n", obj->getName(), r.left, r.top, r.width(), r.height(),
obj->z, obj->layer, obj->frame, objType[obj->type]);
}
- DebugPrintf("+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n");
+ debugPrintf("+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n");
return true;
}
@@ -307,14 +307,14 @@ bool Debugger::Cmd_Programs(int argc, const char** argv) {
int i = 1;
- DebugPrintf("+---+--------------------+--------+----------+\n"
+ debugPrintf("+---+--------------------+--------+----------+\n"
"| # | bound animation | size | status |\n"
"+---+--------------------+--------+----------+\n");
for ( ; b != e; b++, i++) {
ProgramPtr p = *b;
- DebugPrintf("|%3i|%-20s|%8i|%-10s|\n", i, p->_anim->_name, p->_instructions.size(), status[p->_status] );
+ debugPrintf("|%3i|%-20s|%8i|%-10s|\n", i, p->_anim->_name, p->_instructions.size(), status[p->_status] );
}
- DebugPrintf("+---+--------------------+--------+----------+\n");
+ debugPrintf("+---+--------------------+--------+----------+\n");
return true;
}
diff --git a/engines/pegasus/console.cpp b/engines/pegasus/console.cpp
index 64bd0ba..8a465c5 100644
--- a/engines/pegasus/console.cpp
+++ b/engines/pegasus/console.cpp
@@ -40,7 +40,7 @@ PegasusConsole::~PegasusConsole() {
bool PegasusConsole::Cmd_Die(int argc, const char **argv) {
if (argc == 1) {
- DebugPrintf("Usage: die <death reason>\n");
+ debugPrintf("Usage: die <death reason>\n");
return true;
}
@@ -54,7 +54,7 @@ bool PegasusConsole::Cmd_Die(int argc, const char **argv) {
if (invalidReason) {
- DebugPrintf("Invalid death reason %d\n", reason);
+ debugPrintf("Invalid death reason %d\n", reason);
return true;
}
@@ -65,14 +65,14 @@ bool PegasusConsole::Cmd_Die(int argc, const char **argv) {
bool PegasusConsole::Cmd_Jump(int argc, const char **argv) {
if (!g_interface) {
// TODO
- DebugPrintf("Cannot jump without interface set up\n");
+ debugPrintf("Cannot jump without interface set up\n");
return true;
}
// TODO: Default room/direction for each neighborhood
if (argc < 4) {
- DebugPrintf("Usage: jump <neighborhood> <room> <direction>\n");
+ debugPrintf("Usage: jump <neighborhood> <room> <direction>\n");
return true;
}
@@ -82,14 +82,14 @@ bool PegasusConsole::Cmd_Jump(int argc, const char **argv) {
if ((neighborhood < kCaldoriaID || neighborhood > kNoradDeltaID || neighborhood == kFinalTSAID) &&
neighborhood != kNoradSubChaseID) {
- DebugPrintf("Invalid neighborhood %d", neighborhood);
+ debugPrintf("Invalid neighborhood %d", neighborhood);
return true;
}
// No real way to check room validity at this point
if (direction > kWest) {
- DebugPrintf("Invalid direction %d", direction);
+ debugPrintf("Invalid direction %d", direction);
return true;
}
diff --git a/engines/queen/debug.cpp b/engines/queen/debug.cpp
index 3706806..2063858 100644
--- a/engines/queen/debug.cpp
+++ b/engines/queen/debug.cpp
@@ -73,14 +73,14 @@ bool Debugger::Cmd_Asm(int argc, const char **argv) {
_vm->logic()->executeSpecialMove(sm);
return false;
} else {
- DebugPrintf("Usage: %s smnum\n", argv[0]);
+ debugPrintf("Usage: %s smnum\n", argv[0]);
}
return true;
}
bool Debugger::Cmd_Areas(int argc, const char **argv) {
_flags ^= DF_DRAW_AREAS;
- DebugPrintf("Room areas display %s\n", (_flags & DF_DRAW_AREAS) != 0 ? "on" : "off");
+ debugPrintf("Room areas display %s\n", (_flags & DF_DRAW_AREAS) != 0 ? "on" : "off");
return true;
}
@@ -88,36 +88,36 @@ bool Debugger::Cmd_Bob(int argc, const char **argv) {
if (argc >= 3 && isNumeric(argv[1])) {
int bobNum = atoi(argv[1]);
if (bobNum >= Graphics::MAX_BOBS_NUMBER) {
- DebugPrintf("Bob %d is out of range (range: 0 - %d)\n", bobNum, Graphics::MAX_BOBS_NUMBER);
+ debugPrintf("Bob %d is out of range (range: 0 - %d)\n", bobNum, Graphics::MAX_BOBS_NUMBER);
} else {
int param = 0;
if (argc > 3 && isNumeric(argv[3])) {
param = atoi(argv[3]);
} else {
- DebugPrintf("Invalid parameter for bob command '%s'\n", argv[2]);
+ debugPrintf("Invalid parameter for bob command '%s'\n", argv[2]);
}
BobSlot *bob = _vm->graphics()->bob(bobNum);
if (!strcmp(argv[2], "toggle")) {
bob->active = !bob->active;
- DebugPrintf("bob[%d].active = %d\n", bobNum, bob->active);
+ debugPrintf("bob[%d].active = %d\n", bobNum, bob->active);
} else if (!strcmp(argv[2], "x")) {
bob->x = param;
- DebugPrintf("bob[%d].x = %d\n", bobNum, bob->x);
+ debugPrintf("bob[%d].x = %d\n", bobNum, bob->x);
} else if (!strcmp(argv[2], "y")) {
bob->y = param;
- DebugPrintf("bob[%d].y = %d\n", bobNum, bob->y);
+ debugPrintf("bob[%d].y = %d\n", bobNum, bob->y);
} else if (!strcmp(argv[2], "frame")) {
bob->frameNum = param;
- DebugPrintf("bob[%d].frameNum = %d\n", bobNum, bob->frameNum);
+ debugPrintf("bob[%d].frameNum = %d\n", bobNum, bob->frameNum);
} else if (!strcmp(argv[2], "speed")) {
bob->speed = param;
- DebugPrintf("bob[%d].speed = %d\n", bobNum, bob->speed);
+ debugPrintf("bob[%d].speed = %d\n", bobNum, bob->speed);
} else {
- DebugPrintf("Unknown bob command '%s'\n", argv[2]);
+ debugPrintf("Unknown bob command '%s'\n", argv[2]);
}
}
} else {
- DebugPrintf("Usage: %s bobnum command parameter\n", argv[0]);
+ debugPrintf("Usage: %s bobnum command parameter\n", argv[0]);
}
return true;
}
@@ -126,26 +126,26 @@ bool Debugger::Cmd_GameState(int argc, const char **argv) {
uint16 slot;
if ((argc == 2 || argc == 3) && isNumeric(argv[1])) {
slot = atoi(argv[1]);
- DebugPrintf("GAMESTATE[%d] ", slot);
- DebugPrintf("%s %d\n", (argc == 2) ? "is" : "was", _vm->logic()->gameState(slot));
+ debugPrintf("GAMESTATE[%d] ", slot);
+ debugPrintf("%s %d\n", (argc == 2) ? "is" : "was", _vm->logic()->gameState(slot));
if (argc == 3) {
if (isNumeric(argv[1])) {
_vm->logic()->gameState(slot, atoi(argv[2]));
- DebugPrintf("now %d\n", _vm->logic()->gameState(slot));
+ debugPrintf("now %d\n", _vm->logic()->gameState(slot));
} else {
- DebugPrintf("Usage: %s slotnum <value>\n", argv[0]);
+ debugPrintf("Usage: %s slotnum <value>\n", argv[0]);
}
}
} else {
- DebugPrintf("Usage: %s slotnum <value>\n", argv[0]);
+ debugPrintf("Usage: %s slotnum <value>\n", argv[0]);
}
return true;
}
bool Debugger::Cmd_Info(int argc, const char **argv) {
- DebugPrintf("Version: %s\n", _vm->resource()->getJASVersion());
- DebugPrintf("Audio compression: %d\n", _vm->resource()->getCompression());
+ debugPrintf("Version: %s\n", _vm->resource()->getJASVersion());
+ debugPrintf("Audio compression: %d\n", _vm->resource()->getCompression());
return true;
}
@@ -156,24 +156,24 @@ bool Debugger::Cmd_Items(int argc, const char **argv) {
item->name = ABS(item->name);
++item;
}
- DebugPrintf("Enabled all inventory items\n");
+ debugPrintf("Enabled all inventory items\n");
return true;
}
bool Debugger::Cmd_PrintBobs(int argc, const char**argv) {
int i;
BobSlot *bob = _vm->graphics()->bob(0);
- DebugPrintf("+------------------------------------+\n");
- DebugPrintf("|# | x| y|f|scl|frm|a|m|spd| ex| ey|\n");
- DebugPrintf("+--+---+---+-+---+---+-+-+---+---+---+\n");
+ debugPrintf("+------------------------------------+\n");
+ debugPrintf("|# | x| y|f|scl|frm|a|m|spd| ex| ey|\n");
+ debugPrintf("+--+---+---+-+---+---+-+-+---+---+---+\n");
for (i = 0; i < Graphics::MAX_BOBS_NUMBER; ++i, ++bob) {
if (bob->active) {
- DebugPrintf("|%2d|%3d|%3d|%1d|%3d|%3d|%1d|%1d|%3d|%3d|%3d|\n",
+ debugPrintf("|%2d|%3d|%3d|%1d|%3d|%3d|%1d|%1d|%3d|%3d|%3d|\n",
i, bob->x, bob->y, bob->xflip, bob->scale, bob->frameNum,
bob->animating, bob->moving, bob->speed, bob->endx, bob->endy);
}
}
- DebugPrintf("+--------------------------------+\n");
+ debugPrintf("+--------------------------------+\n");
return true;
}
@@ -185,7 +185,7 @@ bool Debugger::Cmd_Room(int argc, const char **argv) {
_vm->logic()->entryObj(_vm->logic()->roomData(roomNum) + 1);
return false;
} else {
- DebugPrintf("Current room: %d (%s), use '%s <roomnum>' to switch\n",
+ debugPrintf("Current room: %d (%s), use '%s <roomnum>' to switch\n",
_vm->logic()->currentRoom(),
_vm->logic()->roomName(_vm->logic()->currentRoom()),
argv[0]);
@@ -197,9 +197,9 @@ bool Debugger::Cmd_Song(int argc, const char **argv) {
if (argc == 2 && isNumeric(argv[1])) {
int16 songNum = atoi(argv[1]);
_vm->sound()->playSong(songNum);
- DebugPrintf("Playing song %d\n", songNum);
+ debugPrintf("Playing song %d\n", songNum);
} else {
- DebugPrintf("Usage: %s songnum\n", argv[0]);
+ debugPrintf("Usage: %s songnum\n", argv[0]);
}
return true;
}
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp
index a534526..04741da 100644
--- a/engines/saga/actor_walk.cpp
+++ b/engines/saga/actor_walk.cpp
@@ -1378,7 +1378,7 @@ void Actor::cmdActorWalkTo(int argc, const char **argv) {
location.fromScreenPoint(movePoint);
if (!validActorId(actorId)) {
- _vm->_console->DebugPrintf("Actor::cmActorWalkTo Invalid actorId 0x%X.\n", actorId);
+ _vm->_console->debugPrintf("Actor::cmActorWalkTo Invalid actorId 0x%X.\n", actorId);
return;
}
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp
index 9e0bcf5..25119c6 100644
--- a/engines/saga/animation.cpp
+++ b/engines/saga/animation.cpp
@@ -914,14 +914,14 @@ void Anim::animInfo() {
animCount = getAnimationCount();
- _vm->_console->DebugPrintf("There are %d animations loaded:\n", animCount);
+ _vm->_console->debugPrintf("There are %d animations loaded:\n", animCount);
for (i = 0; i < MAX_ANIMATIONS; i++) {
if (_animations[i] == NULL) {
continue;
}
- _vm->_console->DebugPrintf("%02d: Frames: %u Flags: %u\n", i, _animations[i]->maxFrame, _animations[i]->flags);
+ _vm->_console->debugPrintf("%02d: Frames: %u Flags: %u\n", i, _animations[i]->maxFrame, _animations[i]->flags);
}
}
@@ -929,10 +929,10 @@ void Anim::animInfo() {
void Anim::cutawayInfo() {
uint16 i;
- _vm->_console->DebugPrintf("There are %d cutaways loaded:\n", _cutawayList.size());
+ _vm->_console->debugPrintf("There are %d cutaways loaded:\n", _cutawayList.size());
for (i = 0; i < _cutawayList.size(); i++) {
- _vm->_console->DebugPrintf("%02d: Bg res: %u Anim res: %u Cycles: %u Framerate: %u\n", i,
+ _vm->_console->debugPrintf("%02d: Bg res: %u Anim res: %u Cycles: %u Framerate: %u\n", i,
_cutawayList[i].backgroundResourceId, _cutawayList[i].animResourceId,
_cutawayList[i].cycles, _cutawayList[i].frameRate);
}
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp
index eab615b..48aa9f9 100644
--- a/engines/saga/console.cpp
+++ b/engines/saga/console.cpp
@@ -89,7 +89,7 @@ Console::~Console() {
bool Console::cmdActorWalkTo(int argc, const char **argv) {
if (argc != 4)
- DebugPrintf("Usage: %s <Actor id> <lx> <ly>\n", argv[0]);
+ debugPrintf("Usage: %s <Actor id> <lx> <ly>\n", argv[0]);
else
_vm->_actor->cmdActorWalkTo(argc, argv);
return true;
@@ -110,7 +110,7 @@ bool Console::cmdCutawayInfo(int argc, const char **argv) {
bool Console::cmdPlayCutaway(int argc, const char **argv) {
#ifdef ENABLE_IHNM
if (argc != 2)
- DebugPrintf("Usage: %s <Cutaway number>\n", argv[0]);
+ debugPrintf("Usage: %s <Cutaway number>\n", argv[0]);
else
_vm->_anim->playCutaway(atoi(argv[1]), false);
#endif
@@ -118,19 +118,19 @@ bool Console::cmdPlayCutaway(int argc, const char **argv) {
}
bool Console::cmdCurrentScene(int argc, const char **argv) {
- DebugPrintf("Current Scene is: %i, scene resource id: %i\n",
+ debugPrintf("Current Scene is: %i, scene resource id: %i\n",
_vm->_scene->currentSceneNumber(), _vm->_scene->currentSceneResourceId());
return true;
}
bool Console::cmdCurrentChapter(int argc, const char **argv) {
- DebugPrintf("Current Chapter is: %i\n", _vm->_scene->currentChapterNumber());
+ debugPrintf("Current Chapter is: %i\n", _vm->_scene->currentChapterNumber());
return true;
}
bool Console::cmdSceneChange(int argc, const char **argv) {
if (argc != 2)
- DebugPrintf("Usage: %s <Scene number>\n", argv[0]);
+ debugPrintf("Usage: %s <Scene number>\n", argv[0]);
else
_vm->_scene->cmdSceneChange(argc, argv);
return true;
@@ -138,7 +138,7 @@ bool Console::cmdSceneChange(int argc, const char **argv) {
bool Console::cmdChapterChange(int argc, const char **argv) {
if (argc != 3)
- DebugPrintf("Usage: %s <Chapter number> <Scene number>\n", argv[0]);
+ debugPrintf("Usage: %s <Chapter number> <Scene number>\n", argv[0]);
else {
_vm->_scene->setChapterNumber(atoi(argv[2]));
_vm->_scene->cmdSceneChange(argc, argv);
@@ -158,9 +158,9 @@ bool Console::cmdObjectMapInfo(int argc, const char **argv) {
bool Console::cmdWakeUpThreads(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s <wait type>\n", argv[0]);
- DebugPrintf("e.g.: 1 for kWaitTypeDelay, 2 for kWaitTypeSpeech, 10 for kWaitTypeWaitFrames");
- DebugPrintf("Refer to saga/script.h for additional types");
+ debugPrintf("Usage: %s <wait type>\n", argv[0]);
+ debugPrintf("e.g.: 1 for kWaitTypeDelay, 2 for kWaitTypeSpeech, 10 for kWaitTypeWaitFrames");
+ debugPrintf("Refer to saga/script.h for additional types");
} else {
_vm->_script->wakeUpThreads(atoi(argv[1]));
}
@@ -168,13 +168,13 @@ bool Console::cmdWakeUpThreads(int argc, const char **argv) {
}
bool Console::cmdCurrentPanelMode(int argc, const char **argv) {
- DebugPrintf("Current Panel Mode is: %i\n", _vm->_interface->getMode());
+ debugPrintf("Current Panel Mode is: %i\n", _vm->_interface->getMode());
return true;
}
bool Console::cmdSetPanelMode(int argc, const char **argv) {
if (argc != 2)
- DebugPrintf("Usage: %s <Panel mode number>\n", argv[0]);
+ debugPrintf("Usage: %s <Panel mode number>\n", argv[0]);
else
_vm->_interface->setMode(atoi(argv[1]));
return true;
@@ -182,8 +182,8 @@ bool Console::cmdSetPanelMode(int argc, const char **argv) {
bool Console::cmdSetFontMapping(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Sets font mapping\nUsage: %s <Font mapping flag>\n", argv[0]);
- DebugPrintf("Mapping flags:\n0 - default game behavior\n1 - force font mapping\n2 - ignore font mapping\n");
+ debugPrintf("Sets font mapping\nUsage: %s <Font mapping flag>\n", argv[0]);
+ debugPrintf("Mapping flags:\n0 - default game behavior\n1 - force font mapping\n2 - ignore font mapping\n");
} else {
_vm->_font->setFontMapping(atoi(argv[1]));
}
@@ -191,7 +191,7 @@ bool Console::cmdSetFontMapping(int argc, const char **argv) {
}
bool Console::cmdGlobalFlagsInfo(int argc, const char **argv) {
- DebugPrintf("Global flags status for IHNM:\n");
+ debugPrintf("Global flags status for IHNM:\n");
// Global flags in IHNM:
// 00: Tested when Gorrister's chapter ends. 0: Gorrister failed, 1: Gorrister won
@@ -232,9 +232,9 @@ bool Console::cmdGlobalFlagsInfo(int argc, const char **argv) {
for (i = 0; i < 32; i += 8) {
for (k = i; k < i + 8; k ++) {
flagStatus = _vm->_globalFlags & (1 << k) ? 1 : 0;
- _vm->_console->DebugPrintf("%02d: %u |", k, flagStatus);
+ _vm->_console->debugPrintf("%02d: %u |", k, flagStatus);
}
- _vm->_console->DebugPrintf("\n");
+ _vm->_console->debugPrintf("\n");
}
return true;
@@ -242,13 +242,13 @@ bool Console::cmdGlobalFlagsInfo(int argc, const char **argv) {
bool Console::cmdSetGlobalFlag(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s <Global flag number>\nValid flag numbers are 0 - 31\n", argv[0]);
+ debugPrintf("Usage: %s <Global flag number>\nValid flag numbers are 0 - 31\n", argv[0]);
} else {
int flagNumber = atoi(argv[1]);
if (flagNumber >= 0 && flagNumber <= 31) {
_vm->_globalFlags |= (1 << flagNumber);
} else {
- DebugPrintf("Valid flag numbers are 0 - 31\n");
+ debugPrintf("Valid flag numbers are 0 - 31\n");
}
}
return true;
@@ -256,13 +256,13 @@ bool Console::cmdSetGlobalFlag(int argc, const char **argv) {
bool Console::cmdClearGlobalFlag(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s <Global flag number>\nValid flag numbers are 0 - 31\n", argv[0]);
+ debugPrintf("Usage: %s <Global flag number>\nValid flag numbers are 0 - 31\n", argv[0]);
} else {
int flagNumber = atoi(argv[1]);
if (flagNumber >= 0 && flagNumber <= 31) {
_vm->_globalFlags &= ~(1 << flagNumber);
} else {
- DebugPrintf("Valid flag numbers are 0 - 31\n");
+ debugPrintf("Valid flag numbers are 0 - 31\n");
}
}
return true;
diff --git a/engines/saga/objectmap.cpp b/engines/saga/objectmap.cpp
index f27c888..ad51672 100644
--- a/engines/saga/objectmap.cpp
+++ b/engines/saga/objectmap.cpp
@@ -231,7 +231,7 @@ int ObjectMap::hitTest(const Point& testPoint) {
}
void ObjectMap::cmdInfo() {
- _vm->_console->DebugPrintf("%d zone(s) loaded.\n\n", _hitZoneList.size());
+ _vm->_console->debugPrintf("%d zone(s) loaded.\n\n", _hitZoneList.size());
}
} // End of namespace Saga
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 7f77cba..04776bd 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -1220,7 +1220,7 @@ void Scene::cmdSceneChange(int argc, const char **argv) {
scene_num = atoi(argv[1]);
if ((scene_num < 1) || (uint(scene_num) >= _sceneLUT.size())) {
- _vm->_console->DebugPrintf("Invalid scene number.\n");
+ _vm->_console->debugPrintf("Invalid scene number.\n");
return;
}
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index 91e39c5..cb963e2 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -139,7 +139,7 @@ void Script::setupITEScriptFuncList() {
void Script::sfPutString(SCRIPTFUNC_PARAMS) {
const char *str = thread->_strings->getString(thread->pop());
- _vm->_console->DebugPrintf("sfPutString: %s\n",str);
+ _vm->_console->debugPrintf("sfPutString: %s\n",str);
debug(0, "sfPutString: %s", str);
}
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 1bc0dd0..4f7aed7 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -307,137 +307,137 @@ void Console::postEnter() {
}
bool Console::cmdHelp(int argc, const char **argv) {
- DebugPrintf("\n");
- DebugPrintf("Variables\n");
- DebugPrintf("---------\n");
- DebugPrintf("sleeptime_factor: Factor to multiply with wait times in kWait()\n");
- DebugPrintf("gc_interval: Number of kernel calls in between garbage collections\n");
- DebugPrintf("simulated_key: Add a key with the specified scan code to the event list\n");
- DebugPrintf("track_mouse_clicks: Toggles mouse click tracking to the console\n");
- DebugPrintf("weak_validations: Turns some validation errors into warnings\n");
- DebugPrintf("script_abort_flag: Set to 1 to abort script execution. Set to 2 to force a replay afterwards\n");
- DebugPrintf("\n");
- DebugPrintf("Debug flags\n");
- DebugPrintf("-----------\n");
- DebugPrintf("debugflag_list - Lists the available debug flags and their status\n");
- DebugPrintf("debugflag_enable - Enables a debug flag\n");
- DebugPrintf("debugflag_disable - Disables a debug flag\n");
- DebugPrintf("\n");
- DebugPrintf("Commands\n");
- DebugPrintf("--------\n");
- DebugPrintf("Kernel:\n");
- DebugPrintf(" opcodes - Lists the opcode names\n");
- DebugPrintf(" selectors - Lists the selector names\n");
- DebugPrintf(" selector - Attempts to find the requested selector by name\n");
- DebugPrintf(" functions - Lists the kernel functions\n");
- DebugPrintf(" class_table - Shows the available classes\n");
- DebugPrintf("\n");
- DebugPrintf("Parser:\n");
- DebugPrintf(" suffixes - Lists the vocabulary suffixes\n");
- DebugPrintf(" parse_grammar - Shows the parse grammar, in strict GNF\n");
- DebugPrintf(" parser_nodes - Shows the specified number of nodes from the parse node tree\n");
- DebugPrintf(" parser_words - Shows the words from the parse node tree\n");
- DebugPrintf(" sentence_fragments - Shows the sentence fragments (used to build Parse trees)\n");
- DebugPrintf(" parse - Parses a sequence of words and prints the resulting parse tree\n");
- DebugPrintf(" set_parse_nodes - Sets the contents of all parse nodes\n");
- DebugPrintf(" said - Match a string against a said spec\n");
- DebugPrintf("\n");
- DebugPrintf("Resources:\n");
- DebugPrintf(" diskdump - Dumps the specified resource to disk as a patch file\n");
- DebugPrintf(" hexdump - Dumps the specified resource to standard output\n");
- DebugPrintf(" resource_id - Identifies a resource number by splitting it up in resource type and resource number\n");
- DebugPrintf(" resource_info - Shows info about a resource\n");
- DebugPrintf(" resource_types - Shows the valid resource types\n");
- DebugPrintf(" list - Lists all the resources of a given type\n");
- DebugPrintf(" hexgrep - Searches some resources for a particular sequence of bytes, represented as hexadecimal numbers\n");
- DebugPrintf(" verify_scripts - Performs sanity checks on SCI1.1-SCI2.1 game scripts (e.g. if they're up to 64KB in total)\n");
- DebugPrintf("\n");
- DebugPrintf("Game:\n");
- DebugPrintf(" save_game - Saves the current game state to the hard disk\n");
- DebugPrintf(" restore_game - Restores a saved game from the hard disk\n");
- DebugPrintf(" list_saves - List all saved games including filenames\n");
- DebugPrintf(" restart_game - Restarts the game\n");
- DebugPrintf(" version - Shows the resource and interpreter versions\n");
- DebugPrintf(" room - Gets or sets the current room number\n");
- DebugPrintf(" quit - Quits the game\n");
- DebugPrintf("\n");
- DebugPrintf("Graphics:\n");
- DebugPrintf(" show_map - Switches to visual, priority, control or display screen\n");
- DebugPrintf(" set_palette - Sets a palette resource\n");
- DebugPrintf(" draw_pic - Draws a pic resource\n");
- DebugPrintf(" draw_cel - Draws a cel from a view resource\n");
- DebugPrintf(" pic_visualize - Enables visualization of the drawing process of EGA pictures\n");
- DebugPrintf(" undither - Enable/disable undithering\n");
- DebugPrintf(" play_video - Plays a SEQ, AVI, VMD, RBT or DUK video\n");
- DebugPrintf(" animate_list / al - Shows the current list of objects in kAnimate's draw list (SCI0 - SCI1.1)\n");
- DebugPrintf(" window_list / wl - Shows a list of all the windows (ports) in the draw list (SCI0 - SCI1.1)\n");
- DebugPrintf(" plane_list / pl - Shows a list of all the planes in the draw list (SCI2+)\n");
- DebugPrintf(" plane_items / pi - Shows a list of all items for a plane (SCI2+)\n");
- DebugPrintf(" saved_bits - List saved bits on the hunk\n");
- DebugPrintf(" show_saved_bits - Display saved bits\n");
- DebugPrintf("\n");
- DebugPrintf("Segments:\n");
- DebugPrintf(" segment_table / segtable - Lists all segments\n");
- DebugPrintf(" segment_info / seginfo - Provides information on the specified segment\n");
- DebugPrintf(" segment_kill / segkill - Deletes the specified segment\n");
- DebugPrintf("\n");
- DebugPrintf("Garbage collection:\n");
- DebugPrintf(" gc - Invokes the garbage collector\n");
- DebugPrintf(" gc_objects - Lists all reachable objects, normalized\n");
- DebugPrintf(" gc_reachable - Lists all addresses directly reachable from a given memory object\n");
- DebugPrintf(" gc_freeable - Lists all addresses freeable in a given segment\n");
- DebugPrintf(" gc_normalize - Prints the \"normal\" address of a given address\n");
- DebugPrintf("\n");
- DebugPrintf("Music/SFX:\n");
- DebugPrintf(" songlib - Shows the song library\n");
- DebugPrintf(" songinfo - Shows information about a specified song in the song library\n");
- DebugPrintf(" togglesound - Starts/stops a sound in the song library\n");
- DebugPrintf(" stopallsounds - Stops all sounds in the playlist\n");
- DebugPrintf(" startsound - Starts the specified sound resource, replacing the first song in the song library\n");
- DebugPrintf(" is_sample - Shows information on a given sound resource, if it's a PCM sample\n");
- DebugPrintf(" sfx01_header - Dumps the header of a SCI01 song\n");
- DebugPrintf(" sfx01_track - Dumps a track of a SCI01 song\n");
- DebugPrintf(" show_instruments - Shows the instruments of a specific song, or all songs\n");
- DebugPrintf(" map_instrument - Dynamically maps an MT-32 instrument to a GM instrument\n");
- DebugPrintf("\n");
- DebugPrintf("Script:\n");
- DebugPrintf(" addresses - Provides information on how to pass addresses\n");
- DebugPrintf(" registers - Shows the current register values\n");
- DebugPrintf(" dissect_script - Examines a script\n");
- DebugPrintf(" backtrace / bt - Dumps the send/self/super/call/calle/callb stack\n");
- DebugPrintf(" trace / t / s - Executes one operation (no parameters) or several operations (specified as a parameter) \n");
- DebugPrintf(" stepover / p - Executes one operation, skips over call/send\n");
- DebugPrintf(" step_ret / pret - Steps forward until ret is called on the current execution stack level.\n");
- DebugPrintf(" step_event / se - Steps forward until a SCI event is received.\n");
- DebugPrintf(" step_global / sg - Steps until the global variable with the specified index is modified.\n");
- DebugPrintf(" step_callk / snk - Steps forward until it hits the next callk operation, or a specific callk (specified as a parameter)\n");
- DebugPrintf(" disasm - Disassembles a method by name\n");
- DebugPrintf(" disasm_addr - Disassembles one or more commands\n");
- DebugPrintf(" send - Sends a message to an object\n");
- DebugPrintf(" go - Executes the script\n");
- DebugPrintf(" logkernel - Logs kernel calls\n");
- DebugPrintf("\n");
- DebugPrintf("Breakpoints:\n");
- DebugPrintf(" bp_list / bplist / bl - Lists the current breakpoints\n");
- DebugPrintf(" bp_del / bpdel / bc - Deletes a breakpoint with the specified index\n");
- DebugPrintf(" bp_method / bpx - Sets a breakpoint on the execution of a specified method/selector\n");
- DebugPrintf(" bp_read / bpr - Sets a breakpoint on reading of a specified selector\n");
- DebugPrintf(" bp_write / bpw - Sets a breakpoint on writing to a specified selector\n");
- DebugPrintf(" bp_kernel / bpk - Sets a breakpoint on execution of a kernel function\n");
- DebugPrintf(" bp_function / bpe - Sets a breakpoint on the execution of the specified exported function\n");
- DebugPrintf("\n");
- DebugPrintf("VM:\n");
- DebugPrintf(" script_steps - Shows the number of executed SCI operations\n");
- DebugPrintf(" vm_varlist / vmvarlist / vl - Shows the addresses of variables in the VM\n");
- DebugPrintf(" vm_vars / vmvars / vv - Displays or changes variables in the VM\n");
- DebugPrintf(" stack - Lists the specified number of stack elements\n");
- DebugPrintf(" value_type - Determines the type of a value\n");
- DebugPrintf(" view_listnode - Examines the list node at the given address\n");
- DebugPrintf(" view_reference / vr - Examines an arbitrary reference\n");
- DebugPrintf(" view_object / vo - Examines the object at the given address\n");
- DebugPrintf(" active_object - Shows information on the currently active object or class\n");
- DebugPrintf(" acc_object - Shows information on the object or class at the address indexed by the accumulator\n");
- DebugPrintf("\n");
+ debugPrintf("\n");
+ debugPrintf("Variables\n");
+ debugPrintf("---------\n");
+ debugPrintf("sleeptime_factor: Factor to multiply with wait times in kWait()\n");
+ debugPrintf("gc_interval: Number of kernel calls in between garbage collections\n");
+ debugPrintf("simulated_key: Add a key with the specified scan code to the event list\n");
+ debugPrintf("track_mouse_clicks: Toggles mouse click tracking to the console\n");
+ debugPrintf("weak_validations: Turns some validation errors into warnings\n");
+ debugPrintf("script_abort_flag: Set to 1 to abort script execution. Set to 2 to force a replay afterwards\n");
+ debugPrintf("\n");
+ debugPrintf("Debug flags\n");
+ debugPrintf("-----------\n");
+ debugPrintf("debugflag_list - Lists the available debug flags and their status\n");
+ debugPrintf("debugflag_enable - Enables a debug flag\n");
+ debugPrintf("debugflag_disable - Disables a debug flag\n");
+ debugPrintf("\n");
+ debugPrintf("Commands\n");
+ debugPrintf("--------\n");
+ debugPrintf("Kernel:\n");
+ debugPrintf(" opcodes - Lists the opcode names\n");
+ debugPrintf(" selectors - Lists the selector names\n");
+ debugPrintf(" selector - Attempts to find the requested selector by name\n");
+ debugPrintf(" functions - Lists the kernel functions\n");
+ debugPrintf(" class_table - Shows the available classes\n");
+ debugPrintf("\n");
+ debugPrintf("Parser:\n");
+ debugPrintf(" suffixes - Lists the vocabulary suffixes\n");
+ debugPrintf(" parse_grammar - Shows the parse grammar, in strict GNF\n");
+ debugPrintf(" parser_nodes - Shows the specified number of nodes from the parse node tree\n");
+ debugPrintf(" parser_words - Shows the words from the parse node tree\n");
+ debugPrintf(" sentence_fragments - Shows the sentence fragments (used to build Parse trees)\n");
+ debugPrintf(" parse - Parses a sequence of words and prints the resulting parse tree\n");
+ debugPrintf(" set_parse_nodes - Sets the contents of all parse nodes\n");
+ debugPrintf(" said - Match a string against a said spec\n");
+ debugPrintf("\n");
+ debugPrintf("Resources:\n");
+ debugPrintf(" diskdump - Dumps the specified resource to disk as a patch file\n");
+ debugPrintf(" hexdump - Dumps the specified resource to standard output\n");
+ debugPrintf(" resource_id - Identifies a resource number by splitting it up in resource type and resource number\n");
+ debugPrintf(" resource_info - Shows info about a resource\n");
+ debugPrintf(" resource_types - Shows the valid resource types\n");
+ debugPrintf(" list - Lists all the resources of a given type\n");
+ debugPrintf(" hexgrep - Searches some resources for a particular sequence of bytes, represented as hexadecimal numbers\n");
+ debugPrintf(" verify_scripts - Performs sanity checks on SCI1.1-SCI2.1 game scripts (e.g. if they're up to 64KB in total)\n");
+ debugPrintf("\n");
+ debugPrintf("Game:\n");
+ debugPrintf(" save_game - Saves the current game state to the hard disk\n");
+ debugPrintf(" restore_game - Restores a saved game from the hard disk\n");
+ debugPrintf(" list_saves - List all saved games including filenames\n");
+ debugPrintf(" restart_game - Restarts the game\n");
+ debugPrintf(" version - Shows the resource and interpreter versions\n");
+ debugPrintf(" room - Gets or sets the current room number\n");
+ debugPrintf(" quit - Quits the game\n");
+ debugPrintf("\n");
+ debugPrintf("Graphics:\n");
+ debugPrintf(" show_map - Switches to visual, priority, control or display screen\n");
+ debugPrintf(" set_palette - Sets a palette resource\n");
+ debugPrintf(" draw_pic - Draws a pic resource\n");
+ debugPrintf(" draw_cel - Draws a cel from a view resource\n");
+ debugPrintf(" pic_visualize - Enables visualization of the drawing process of EGA pictures\n");
+ debugPrintf(" undither - Enable/disable undithering\n");
+ debugPrintf(" play_video - Plays a SEQ, AVI, VMD, RBT or DUK video\n");
+ debugPrintf(" animate_list / al - Shows the current list of objects in kAnimate's draw list (SCI0 - SCI1.1)\n");
+ debugPrintf(" window_list / wl - Shows a list of all the windows (ports) in the draw list (SCI0 - SCI1.1)\n");
+ debugPrintf(" plane_list / pl - Shows a list of all the planes in the draw list (SCI2+)\n");
+ debugPrintf(" plane_items / pi - Shows a list of all items for a plane (SCI2+)\n");
+ debugPrintf(" saved_bits - List saved bits on the hunk\n");
+ debugPrintf(" show_saved_bits - Display saved bits\n");
+ debugPrintf("\n");
+ debugPrintf("Segments:\n");
+ debugPrintf(" segment_table / segtable - Lists all segments\n");
+ debugPrintf(" segment_info / seginfo - Provides information on the specified segment\n");
+ debugPrintf(" segment_kill / segkill - Deletes the specified segment\n");
+ debugPrintf("\n");
+ debugPrintf("Garbage collection:\n");
+ debugPrintf(" gc - Invokes the garbage collector\n");
+ debugPrintf(" gc_objects - Lists all reachable objects, normalized\n");
+ debugPrintf(" gc_reachable - Lists all addresses directly reachable from a given memory object\n");
+ debugPrintf(" gc_freeable - Lists all addresses freeable in a given segment\n");
+ debugPrintf(" gc_normalize - Prints the \"normal\" address of a given address\n");
+ debugPrintf("\n");
+ debugPrintf("Music/SFX:\n");
+ debugPrintf(" songlib - Shows the song library\n");
+ debugPrintf(" songinfo - Shows information about a specified song in the song library\n");
+ debugPrintf(" togglesound - Starts/stops a sound in the song library\n");
+ debugPrintf(" stopallsounds - Stops all sounds in the playlist\n");
+ debugPrintf(" startsound - Starts the specified sound resource, replacing the first song in the song library\n");
+ debugPrintf(" is_sample - Shows information on a given sound resource, if it's a PCM sample\n");
+ debugPrintf(" sfx01_header - Dumps the header of a SCI01 song\n");
+ debugPrintf(" sfx01_track - Dumps a track of a SCI01 song\n");
+ debugPrintf(" show_instruments - Shows the instruments of a specific song, or all songs\n");
+ debugPrintf(" map_instrument - Dynamically maps an MT-32 instrument to a GM instrument\n");
+ debugPrintf("\n");
+ debugPrintf("Script:\n");
+ debugPrintf(" addresses - Provides information on how to pass addresses\n");
+ debugPrintf(" registers - Shows the current register values\n");
+ debugPrintf(" dissect_script - Examines a script\n");
+ debugPrintf(" backtrace / bt - Dumps the send/self/super/call/calle/callb stack\n");
+ debugPrintf(" trace / t / s - Executes one operation (no parameters) or several operations (specified as a parameter) \n");
+ debugPrintf(" stepover / p - Executes one operation, skips over call/send\n");
+ debugPrintf(" step_ret / pret - Steps forward until ret is called on the current execution stack level.\n");
+ debugPrintf(" step_event / se - Steps forward until a SCI event is received.\n");
+ debugPrintf(" step_global / sg - Steps until the global variable with the specified index is modified.\n");
+ debugPrintf(" step_callk / snk - Steps forward until it hits the next callk operation, or a specific callk (specified as a parameter)\n");
+ debugPrintf(" disasm - Disassembles a method by name\n");
+ debugPrintf(" disasm_addr - Disassembles one or more commands\n");
+ debugPrintf(" send - Sends a message to an object\n");
+ debugPrintf(" go - Executes the script\n");
+ debugPrintf(" logkernel - Logs kernel calls\n");
+ debugPrintf("\n");
+ debugPrintf("Breakpoints:\n");
+ debugPrintf(" bp_list / bplist / bl - Lists the current breakpoints\n");
+ debugPrintf(" bp_del / bpdel / bc - Deletes a breakpoint with the specified index\n");
+ debugPrintf(" bp_method / bpx - Sets a breakpoint on the execution of a specified method/selector\n");
+ debugPrintf(" bp_read / bpr - Sets a breakpoint on reading of a specified selector\n");
+ debugPrintf(" bp_write / bpw - Sets a breakpoint on writing to a specified selector\n");
+ debugPrintf(" bp_kernel / bpk - Sets a breakpoint on execution of a kernel function\n");
+ debugPrintf(" bp_function / bpe - Sets a breakpoint on the execution of the specified exported function\n");
+ debugPrintf("\n");
+ debugPrintf("VM:\n");
+ debugPrintf(" script_steps - Shows the number of executed SCI operations\n");
+ debugPrintf(" vm_varlist / vmvarlist / vl - Shows the addresses of variables in the VM\n");
+ debugPrintf(" vm_vars / vmvars / vv - Displays or changes variables in the VM\n");
+ debugPrintf(" stack - Lists the specified number of stack elements\n");
+ debugPrintf(" value_type - Determines the type of a value\n");
+ debugPrintf(" view_listnode - Examines the list node at the given address\n");
+ debugPrintf(" view_reference / vr - Examines an arbitrary reference\n");
+ debugPrintf(" view_object / vo - Examines the object at the given address\n");
+ debugPrintf(" active_object - Shows information on the currently active object or class\n");
+ debugPrintf(" acc_object - Shows information on the object or class at the address indexed by the accumulator\n");
+ debugPrintf("\n");
return true;
}
@@ -464,30 +464,30 @@ bool Console::cmdGetVersion(int argc, const char **argv) {
versionFile.close();
}
- DebugPrintf("Game ID: %s\n", _engine->getGameIdStr());
- DebugPrintf("Emulated interpreter version: %s\n", getSciVersionDesc(getSciVersion()));
- DebugPrintf("\n");
- DebugPrintf("Detected features:\n");
- DebugPrintf("------------------\n");
- DebugPrintf("Sound type: %s\n", getSciVersionDesc(_engine->_features->detectDoSoundType()));
- DebugPrintf("Graphics functions type: %s\n", getSciVersionDesc(_engine->_features->detectGfxFunctionsType()));
- DebugPrintf("Lofs type: %s\n", getSciVersionDesc(_engine->_features->detectLofsType()));
- DebugPrintf("Move count type: %s\n", (_engine->_features->handleMoveCount()) ? "increment" : "ignore");
- DebugPrintf("SetCursor type: %s\n", getSciVersionDesc(_engine->_features->detectSetCursorType()));
+ debugPrintf("Game ID: %s\n", _engine->getGameIdStr());
+ debugPrintf("Emulated interpreter version: %s\n", getSciVersionDesc(getSciVersion()));
+ debugPrintf("\n");
+ debugPrintf("Detected features:\n");
+ debugPrintf("------------------\n");
+ debugPrintf("Sound type: %s\n", getSciVersionDesc(_engine->_features->detectDoSoundType()));
+ debugPrintf("Graphics functions type: %s\n", getSciVersionDesc(_engine->_features->detectGfxFunctionsType()));
+ debugPrintf("Lofs type: %s\n", getSciVersionDesc(_engine->_features->detectLofsType()));
+ debugPrintf("Move count type: %s\n", (_engine->_features->handleMoveCount()) ? "increment" : "ignore");
+ debugPrintf("SetCursor type: %s\n", getSciVersionDesc(_engine->_features->detectSetCursorType()));
#ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2)
- DebugPrintf("kString type: %s\n", (_engine->_features->detectSci2StringFunctionType() == kSci2StringFunctionOld) ? "SCI2 (old)" : "SCI2.1 (new)");
+ debugPrintf("kString type: %s\n", (_engine->_features->detectSci2StringFunctionType() == kSci2StringFunctionOld) ? "SCI2 (old)" : "SCI2.1 (new)");
if (getSciVersion() == SCI_VERSION_2_1)
- DebugPrintf("SCI2.1 kernel table: %s\n", (_engine->_features->detectSci21KernelType() == SCI_VERSION_2) ? "modified SCI2 (old)" : "SCI2.1 (new)");
+ debugPrintf("SCI2.1 kernel table: %s\n", (_engine->_features->detectSci21KernelType() == SCI_VERSION_2) ? "modified SCI2 (old)" : "SCI2.1 (new)");
#endif
- DebugPrintf("View type: %s\n", viewTypeDesc[g_sci->getResMan()->getViewType()]);
- DebugPrintf("Uses palette merging: %s\n", g_sci->_gfxPalette->isMerging() ? "yes" : "no");
- DebugPrintf("Resource volume version: %s\n", g_sci->getResMan()->getVolVersionDesc());
- DebugPrintf("Resource map version: %s\n", g_sci->getResMan()->getMapVersionDesc());
- DebugPrintf("Contains selector vocabulary (vocab.997): %s\n", hasVocab997 ? "yes" : "no");
- DebugPrintf("Has CantBeHere selector: %s\n", g_sci->getKernel()->_selectorCache.cantBeHere != -1 ? "yes" : "no");
- DebugPrintf("Game version (VERSION file): %s\n", gameVersion.c_str());
- DebugPrintf("\n");
+ debugPrintf("View type: %s\n", viewTypeDesc[g_sci->getResMan()->getViewType()]);
+ debugPrintf("Uses palette merging: %s\n", g_sci->_gfxPalette->isMerging() ? "yes" : "no");
+ debugPrintf("Resource volume version: %s\n", g_sci->getResMan()->getVolVersionDesc());
+ debugPrintf("Resource map version: %s\n", g_sci->getResMan()->getMapVersionDesc());
+ debugPrintf("Contains selector vocabulary (vocab.997): %s\n", hasVocab997 ? "yes" : "no");
+ debugPrintf("Has CantBeHere selector: %s\n", g_sci->getKernel()->_selectorCache.cantBeHere != -1 ? "yes" : "no");
+ debugPrintf("Game version (VERSION file): %s\n", gameVersion.c_str());
+ debugPrintf("\n");
return true;
}
@@ -498,13 +498,13 @@ bool Console::cmdOpcodes(int argc, const char **argv) {
// If the resource couldn't be loaded, leave
if (!r) {
- DebugPrintf("unable to load vocab.998");
+ debugPrintf("unable to load vocab.998");
return true;
}
int count = READ_LE_UINT16(r->data);
- DebugPrintf("Opcode names in numeric order [index: type name]:\n");
+ debugPrintf("Opcode names in numeric order [index: type name]:\n");
for (int i = 0; i < count; i++) {
int offset = READ_LE_UINT16(r->data + 2 + i * 2);
@@ -512,49 +512,49 @@ bool Console::cmdOpcodes(int argc, const char **argv) {
int type = READ_LE_UINT16(r->data + offset + 2);
// QFG3 has empty opcodes
Common::String name = len > 0 ? Common::String((const char *)r->data + offset + 4, len) : "Dummy";
- DebugPrintf("%03x: %03x %20s | ", i, type, name.c_str());
+ debugPrintf("%03x: %03x %20s | ", i, type, name.c_str());
if ((i % 3) == 2)
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
bool Console::cmdSelector(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Attempts to find the requested selector by name.\n");
- DebugPrintf("Usage: %s <selector name>\n", argv[0]);
+ debugPrintf("Attempts to find the requested selector by name.\n");
+ debugPrintf("Usage: %s <selector name>\n", argv[0]);
return true;
}
Common::String name = argv[1];
int seeker = _engine->getKernel()->findSelector(name.c_str());
if (seeker >= 0) {
- DebugPrintf("Selector %s found at %03x (%d)\n", name.c_str(), seeker, seeker);
+ debugPrintf("Selector %s found at %03x (%d)\n", name.c_str(), seeker, seeker);
return true;
}
- DebugPrintf("Selector %s wasn't found\n", name.c_str());
+ debugPrintf("Selector %s wasn't found\n", name.c_str());
return true;
}
bool Console::cmdSelectors(int argc, const char **argv) {
- DebugPrintf("Selector names in numeric order:\n");
+ debugPrintf("Selector names in numeric order:\n");
Common::String selectorName;
for (uint seeker = 0; seeker < _engine->getKernel()->getSelectorNamesSize(); seeker++) {
selectorName = _engine->getKernel()->getSelectorName(seeker);
if (selectorName != "BAD SELECTOR")
- DebugPrintf("%03x: %20s | ", seeker, selectorName.c_str());
+ debugPrintf("%03x: %20s | ", seeker, selectorName.c_str());
else
continue;
if ((seeker % 3) == 2)
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf("\n");
+ debugPrintf("\n");
#if 0
// For debug/development
@@ -584,14 +584,14 @@ bool Console::cmdSelectors(int argc, const char **argv) {
}
bool Console::cmdKernelFunctions(int argc, const char **argv) {
- DebugPrintf("Kernel function names in numeric order:\n");
+ debugPrintf("Kernel function names in numeric order:\n");
for (uint seeker = 0; seeker < _engine->getKernel()->getKernelNamesSize(); seeker++) {
- DebugPrintf("%03x: %20s | ", seeker, _engine->getKernel()->getKernelName(seeker).c_str());
+ debugPrintf("%03x: %20s | ", seeker, _engine->getKernel()->getKernelName(seeker).c_str());
if ((seeker % 3) == 2)
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -610,9 +610,9 @@ bool Console::cmdParserWords(int argc, const char **argv) {
bool Console::cmdSetParseNodes(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Sets the contents of all parse nodes.\n");
- DebugPrintf("Usage: %s <parse node1> <parse node2> ... <parse noden>\n", argv[0]);
- DebugPrintf("Tokens should be separated by blanks and enclosed in parentheses\n");
+ debugPrintf("Sets the contents of all parse nodes.\n");
+ debugPrintf("Usage: %s <parse node1> <parse node2> ... <parse noden>\n", argv[0]);
+ debugPrintf("Tokens should be separated by blanks and enclosed in parentheses\n");
return true;
}
@@ -643,23 +643,23 @@ bool Console::cmdSetParseNodes(int argc, const char **argv) {
bool Console::cmdRegisters(int argc, const char **argv) {
EngineState *s = _engine->_gamestate;
- DebugPrintf("Current register values:\n");
- DebugPrintf("acc=%04x:%04x prev=%04x:%04x &rest=%x\n", PRINT_REG(s->r_acc), PRINT_REG(s->r_prev), s->r_rest);
+ debugPrintf("Current register values:\n");
+ debugPrintf("acc=%04x:%04x prev=%04x:%04x &rest=%x\n", PRINT_REG(s->r_acc), PRINT_REG(s->r_prev), s->r_rest);
if (!s->_executionStack.empty()) {
- DebugPrintf("pc=%04x:%04x obj=%04x:%04x fp=ST:%04x sp=ST:%04x\n",
+ debugPrintf("pc=%04x:%04x obj=%04x:%04x fp=ST:%04x sp=ST:%04x\n",
PRINT_REG(s->xs->addr.pc), PRINT_REG(s->xs->objp),
(unsigned)(s->xs->fp - s->stack_base), (unsigned)(s->xs->sp - s->stack_base));
} else
- DebugPrintf("<no execution stack: pc,obj,fp omitted>\n");
+ debugPrintf("<no execution stack: pc,obj,fp omitted>\n");
return true;
}
bool Console::cmdDiskDump(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Dumps the specified resource to disk as a patch file\n");
- DebugPrintf("Usage: %s <resource type> <resource number>\n", argv[0]);
+ debugPrintf("Dumps the specified resource to disk as a patch file\n");
+ debugPrintf("Usage: %s <resource type> <resource number>\n", argv[0]);
cmdResourceTypes(argc, argv);
return true;
}
@@ -668,7 +668,7 @@ bool Console::cmdDiskDump(int argc, const char **argv) {
ResourceType res = parseResourceType(argv[1]);
if (res == kResourceTypeInvalid)
- DebugPrintf("Resource type '%s' is not valid\n", argv[1]);
+ debugPrintf("Resource type '%s' is not valid\n", argv[1]);
else {
Resource *resource = _engine->getResMan()->findResource(ResourceId(res, resNum), 0);
if (resource) {
@@ -680,9 +680,9 @@ bool Console::cmdDiskDump(int argc, const char **argv) {
outFile->finalize();
outFile->close();
delete outFile;
- DebugPrintf("Resource %s.%03d (located in %s) has been dumped to disk\n", argv[1], resNum, resource->getResourceLocation().c_str());
+ debugPrintf("Resource %s.%03d (located in %s) has been dumped to disk\n", argv[1], resNum, resource->getResourceLocation().c_str());
} else {
- DebugPrintf("Resource %s.%03d not found\n", argv[1], resNum);
+ debugPrintf("Resource %s.%03d not found\n", argv[1], resNum);
}
}
@@ -691,8 +691,8 @@ bool Console::cmdDiskDump(int argc, const char **argv) {
bool Console::cmdHexDump(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Dumps the specified resource to standard output\n");
- DebugPrintf("Usage: %s <resource type> <resource number>\n", argv[0]);
+ debugPrintf("Dumps the specified resource to standard output\n");
+ debugPrintf("Usage: %s <resource type> <resource number>\n", argv[0]);
cmdResourceTypes(argc, argv);
return true;
}
@@ -701,14 +701,14 @@ bool Console::cmdHexDump(int argc, const char **argv) {
ResourceType res = parseResourceType(argv[1]);
if (res == kResourceTypeInvalid)
- DebugPrintf("Resource type '%s' is not valid\n", argv[1]);
+ debugPrintf("Resource type '%s' is not valid\n", argv[1]);
else {
Resource *resource = _engine->getResMan()->findResource(ResourceId(res, resNum), 0);
if (resource) {
Common::hexdump(resource->data, resource->size, 16, 0);
- DebugPrintf("Resource %s.%03d has been dumped to standard output\n", argv[1], resNum);
+ debugPrintf("Resource %s.%03d has been dumped to standard output\n", argv[1], resNum);
} else {
- DebugPrintf("Resource %s.%03d not found\n", argv[1], resNum);
+ debugPrintf("Resource %s.%03d not found\n", argv[1], resNum);
}
}
@@ -717,21 +717,21 @@ bool Console::cmdHexDump(int argc, const char **argv) {
bool Console::cmdResourceId(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Identifies a resource number by splitting it up in resource type and resource number\n");
- DebugPrintf("Usage: %s <resource number>\n", argv[0]);
+ debugPrintf("Identifies a resource number by splitting it up in resource type and resource number\n");
+ debugPrintf("Usage: %s <resource number>\n", argv[0]);
return true;
}
int id = atoi(argv[1]);
- DebugPrintf("%s.%d (0x%x)\n", getResourceTypeName((ResourceType)(id >> 11)), id & 0x7ff, id & 0x7ff);
+ debugPrintf("%s.%d (0x%x)\n", getResourceTypeName((ResourceType)(id >> 11)), id & 0x7ff, id & 0x7ff);
return true;
}
bool Console::cmdDissectScript(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Examines a script\n");
- DebugPrintf("Usage: %s <script number>\n", argv[0]);
+ debugPrintf("Examines a script\n");
+ debugPrintf("Usage: %s <script number>\n", argv[0]);
return true;
}
@@ -745,13 +745,13 @@ bool Console::cmdRoomNumber(int argc, const char **argv) {
// The same functionality is provided by "vmvars g 13" (but this one is more straighforward)
if (argc != 2) {
- DebugPrintf("Current room number is %d\n", _engine->_gamestate->currentRoomNumber());
- DebugPrintf("Calling this command with the room number (in decimal or hexadecimal) changes the room\n");
+ debugPrintf("Current room number is %d\n", _engine->_gamestate->currentRoomNumber());
+ debugPrintf("Calling this command with the room number (in decimal or hexadecimal) changes the room\n");
} else {
Common::String roomNumberStr = argv[1];
int roomNumber = strtol(roomNumberStr.c_str(), NULL, roomNumberStr.hasSuffix("h") ? 16 : 10);
_engine->_gamestate->setRoomNumber(roomNumber);
- DebugPrintf("Room number changed to %d (%x in hex)\n", roomNumber, roomNumber);
+ debugPrintf("Room number changed to %d (%x in hex)\n", roomNumber, roomNumber);
}
return true;
@@ -759,8 +759,8 @@ bool Console::cmdRoomNumber(int argc, const char **argv) {
bool Console::cmdResourceInfo(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Shows information about a resource\n");
- DebugPrintf("Usage: %s <resource type> <resource number>\n", argv[0]);
+ debugPrintf("Shows information about a resource\n");
+ debugPrintf("Usage: %s <resource type> <resource number>\n", argv[0]);
return true;
}
@@ -768,14 +768,14 @@ bool Console::cmdResourceInfo(int argc, const char **argv) {
ResourceType res = parseResourceType(argv[1]);
if (res == kResourceTypeInvalid)
- DebugPrintf("Resource type '%s' is not valid\n", argv[1]);
+ debugPrintf("Resource type '%s' is not valid\n", argv[1]);
else {
Resource *resource = _engine->getResMan()->findResource(ResourceId(res, resNum), 0);
if (resource) {
- DebugPrintf("Resource size: %d\n", resource->size);
- DebugPrintf("Resource location: %s\n", resource->getResourceLocation().c_str());
+ debugPrintf("Resource size: %d\n", resource->size);
+ debugPrintf("Resource location: %s\n", resource->getResourceLocation().c_str());
} else {
- DebugPrintf("Resource %s.%03d not found\n", argv[1], resNum);
+ debugPrintf("Resource %s.%03d not found\n", argv[1], resNum);
}
}
@@ -783,10 +783,10 @@ bool Console::cmdResourceInfo(int argc, const char **argv) {
}
bool Console::cmdResourceTypes(int argc, const char **argv) {
- DebugPrintf("The %d valid resource types are:\n", kResourceTypeInvalid);
+ debugPrintf("The %d valid resource types are:\n", kResourceTypeInvalid);
for (int i = 0; i < kResourceTypeInvalid; i++) {
- DebugPrintf("%s", getResourceTypeName((ResourceType) i));
- DebugPrintf((i < kResourceTypeInvalid - 1) ? ", " : "\n");
+ debugPrintf("%s", getResourceTypeName((ResourceType) i));
+ debugPrintf((i < kResourceTypeInvalid - 1) ? ", " : "\n");
}
return true;
@@ -794,10 +794,10 @@ bool Console::cmdResourceTypes(int argc, const char **argv) {
bool Console::cmdHexgrep(int argc, const char **argv) {
if (argc < 4) {
- DebugPrintf("Searches some resources for a particular sequence of bytes, represented as decimal or hexadecimal numbers.\n");
- DebugPrintf("Usage: %s <resource type> <resource number> <search string>\n", argv[0]);
- DebugPrintf("<resource number> can be a specific resource number, or \"all\" for all of the resources of the specified type\n");
- DebugPrintf("EXAMPLES:\n hexgrep script all 0xe8 0x03 0xc8 0x00\n hexgrep pic 0x42 0xfe\n");
+ debugPrintf("Searches some resources for a particular sequence of bytes, represented as decimal or hexadecimal numbers.\n");
+ debugPrintf("Usage: %s <resource type> <resource number> <search string>\n", argv[0]);
+ debugPrintf("<resource number> can be a specific resource number, or \"all\" for all of the resources of the specified type\n");
+ debugPrintf("EXAMPLES:\n hexgrep script all 0xe8 0x03 0xc8 0x00\n hexgrep pic 0x42 0xfe\n");
cmdResourceTypes(argc, argv);
return true;
}
@@ -807,7 +807,7 @@ bool Console::cmdHexgrep(int argc, const char **argv) {
Resource *script = NULL;
if (restype == kResourceTypeInvalid) {
- DebugPrintf("Resource type '%s' is not valid\n", argv[1]);
+ debugPrintf("Resource type '%s' is not valid\n", argv[1]);
return true;
}
@@ -845,10 +845,10 @@ bool Console::cmdHexgrep(int argc, const char **argv) {
seeker = seekerold + 1;
if (!output_script_name) {
- DebugPrintf("\nIn %s.%03d:\n", getResourceTypeName((ResourceType)restype), resNumber);
+ debugPrintf("\nIn %s.%03d:\n", getResourceTypeName((ResourceType)restype), resNumber);
output_script_name = 1;
}
- DebugPrintf(" 0x%04x\n", seekerold);
+ debugPrintf(" 0x%04x\n", seekerold);
}
} else
comppos = 0;
@@ -863,38 +863,38 @@ bool Console::cmdHexgrep(int argc, const char **argv) {
bool Console::cmdVerifyScripts(int argc, const char **argv) {
if (getSciVersion() < SCI_VERSION_1_1) {
- DebugPrintf("This script check is only meant for SCI1.1-SCI3 games\n");
+ debugPrintf("This script check is only meant for SCI1.1-SCI3 games\n");
return true;
}
Common::List<ResourceId> resources = _engine->getResMan()->listResources(kResourceTypeScript);
Common::sort(resources.begin(), resources.end());
- DebugPrintf("%d SCI1.1-SCI3 scripts found, performing sanity checks...\n", resources.size());
+ debugPrintf("%d SCI1.1-SCI3 scripts found, performing sanity checks...\n", resources.size());
Resource *script, *heap;
Common::List<ResourceId>::iterator itr;
for (itr = resources.begin(); itr != resources.end(); ++itr) {
script = _engine->getResMan()->findResource(*itr, false);
if (!script)
- DebugPrintf("Error: script %d couldn't be loaded\n", itr->getNumber());
+ debugPrintf("Error: script %d couldn't be loaded\n", itr->getNumber());
if (getSciVersion() <= SCI_VERSION_2_1) {
heap = _engine->getResMan()->findResource(ResourceId(kResourceTypeHeap, itr->getNumber()), false);
if (!heap)
- DebugPrintf("Error: script %d doesn't have a corresponding heap\n", itr->getNumber());
+ debugPrintf("Error: script %d doesn't have a corresponding heap\n", itr->getNumber());
if (script && heap && (script->size + heap->size > 65535))
- DebugPrintf("Error: script and heap %d together are larger than 64KB (%d bytes)\n",
+ debugPrintf("Error: script and heap %d together are larger than 64KB (%d bytes)\n",
itr->getNumber(), script->size + heap->size);
} else { // SCI3
if (script && script->size > 65535)
- DebugPrintf("Error: script %d is larger than 64KB (%d bytes)\n",
+ debugPrintf("Error: script %d is larger than 64KB (%d bytes)\n",
itr->getNumber(), script->size);
}
}
- DebugPrintf("SCI1.1-SCI2.1 script check finished\n");
+ debugPrintf("SCI1.1-SCI2.1 script check finished\n");
return true;
}
@@ -931,9 +931,9 @@ bool Console::cmdShowInstruments(int argc, const char **argv) {
instrumentsSongs[i][j] = false;
if (songNumber == -1) {
- DebugPrintf("%d sounds found, checking their instrument mappings...\n", resources.size());
- DebugPrintf("Instruments:\n");
- DebugPrintf("============\n");
+ debugPrintf("%d sounds found, checking their instrument mappings...\n", resources.size());
+ debugPrintf("Instruments:\n");
+ debugPrintf("============\n");
}
Common::List<ResourceId>::iterator itr;
@@ -956,7 +956,7 @@ bool Console::cmdShowInstruments(int argc, const char **argv) {
bool endOfTrack = false;
bool firstOneShown = false;
- DebugPrintf("Song %d: ", itr->getNumber());
+ debugPrintf("Song %d: ", itr->getNumber());
do {
while (*channelData == 0xF8)
@@ -984,9 +984,9 @@ bool Console::cmdShowInstruments(int argc, const char **argv) {
if (!firstOneShown)
firstOneShown = true;
else
- DebugPrintf(",");
+ debugPrintf(",");
- DebugPrintf(" %d", instrument);
+ debugPrintf(" %d", instrument);
instruments[instrument]++;
instrumentsSongs[instrument][itr->getNumber()] = true;
} else {
@@ -1024,44 +1024,44 @@ bool Console::cmdShowInstruments(int argc, const char **argv) {
}
} while (!endOfTrack);
- DebugPrintf("\n");
+ debugPrintf("\n");
}
delete parser;
delete player;
- DebugPrintf("\n");
+ debugPrintf("\n");
if (songNumber == -1) {
- DebugPrintf("Used instruments: ");
+ debugPrintf("Used instruments: ");
for (int i = 0; i < 128; i++) {
if (instruments[i] > 0)
- DebugPrintf("%d, ", i);
+ debugPrintf("%d, ", i);
}
- DebugPrintf("\n\n");
+ debugPrintf("\n\n");
}
- DebugPrintf("Instruments not mapped in the MT32->GM map: ");
+ debugPrintf("Instruments not mapped in the MT32->GM map: ");
for (int i = 0; i < 128; i++) {
if (instruments[i] > 0 && getGmInstrument(Mt32MemoryTimbreMaps[i]) == MIDI_UNMAPPED)
- DebugPrintf("%d, ", i);
+ debugPrintf("%d, ", i);
}
- DebugPrintf("\n\n");
+ debugPrintf("\n\n");
if (songNumber == -1) {
- DebugPrintf("Used instruments in songs:\n");
+ debugPrintf("Used instruments in songs:\n");
for (int i = 0; i < 128; i++) {
if (instruments[i] > 0) {
- DebugPrintf("Instrument %d: ", i);
+ debugPrintf("Instrument %d: ", i);
for (int j = 0; j < 1000; j++) {
if (instrumentsSongs[i][j])
- DebugPrintf("%d, ", j);
+ debugPrintf("%d, ", j);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
}
- DebugPrintf("\n\n");
+ debugPrintf("\n\n");
}
return true;
@@ -1069,13 +1069,13 @@ bool Console::cmdShowInstruments(int argc, const char **argv) {
bool Console::cmdMapInstrument(int argc, const char **argv) {
if (argc != 4) {
- DebugPrintf("Maps an MT-32 custom instrument to a GM instrument on the fly\n\n");
- DebugPrintf("Usage %s <MT-32 instrument name> <GM instrument> <GM rhythm key>\n", argv[0]);
- DebugPrintf("Each MT-32 instrument is always 10 characters and is mapped to either a GM instrument, or a GM rhythm key\n");
- DebugPrintf("A value of 255 (0xff) signifies an unmapped instrument\n");
- DebugPrintf("Please replace the spaces in the instrument name with underscores (\"_\"). They'll be converted to spaces afterwards\n\n");
- DebugPrintf("Example: %s test_0__XX 1 255\n", argv[0]);
- DebugPrintf("The above example will map the MT-32 instrument \"test 0 XX\" to GM instrument 1\n\n");
+ debugPrintf("Maps an MT-32 custom instrument to a GM instrument on the fly\n\n");
+ debugPrintf("Usage %s <MT-32 instrument name> <GM instrument> <GM rhythm key>\n", argv[0]);
+ debugPrintf("Each MT-32 instrument is always 10 characters and is mapped to either a GM instrument, or a GM rhythm key\n");
+ debugPrintf("A value of 255 (0xff) signifies an unmapped instrument\n");
+ debugPrintf("Please replace the spaces in the instrument name with underscores (\"_\"). They'll be converted to spaces afterwards\n\n");
+ debugPrintf("Example: %s test_0__XX 1 255\n", argv[0]);
+ debugPrintf("The above example will map the MT-32 instrument \"test 0 XX\" to GM instrument 1\n\n");
} else {
if (Mt32dynamicMappings != NULL) {
Mt32ToGmMap newMapping;
@@ -1093,11 +1093,11 @@ bool Console::cmdMapInstrument(int argc, const char **argv) {
}
}
- DebugPrintf("Current dynamic mappings:\n");
+ debugPrintf("Current dynamic mappings:\n");
if (Mt32dynamicMappings != NULL) {
const Mt32ToGmMapList::iterator end = Mt32dynamicMappings->end();
for (Mt32ToGmMapList::iterator it = Mt32dynamicMappings->begin(); it != end; ++it) {
- DebugPrintf("\"%s\" -> %d / %d\n", (*it).name, (*it).gmInstr, (*it).gmRhythmKey);
+ debugPrintf("\"%s\" -> %d / %d\n", (*it).name, (*it).gmInstr, (*it).gmRhythmKey);
}
}
@@ -1106,7 +1106,7 @@ bool Console::cmdMapInstrument(int argc, const char **argv) {
bool Console::cmdList(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Lists all the resources of a given type\n");
+ debugPrintf("Lists all the resources of a given type\n");
cmdResourceTypes(argc, argv);
return true;
}
@@ -1114,13 +1114,13 @@ bool Console::cmdList(int argc, const char **argv) {
ResourceType res = parseResourceType(argv[1]);
if (res == kResourceTypeInvalid)
- DebugPrintf("Unknown resource type: '%s'\n", argv[1]);
+ debugPrintf("Unknown resource type: '%s'\n", argv[1]);
else {
int number = -1;
if ((res == kResourceTypeAudio36) || (res == kResourceTypeSync36)) {
if (argc != 3) {
- DebugPrintf("Please specify map number (-1: all maps)\n");
+ debugPrintf("Please specify map number (-1: all maps)\n");
return true;
}
number = atoi(argv[2]);
@@ -1133,18 +1133,18 @@ bool Console::cmdList(int argc, const char **argv) {
Common::List<ResourceId>::iterator itr;
for (itr = resources.begin(); itr != resources.end(); ++itr) {
if (number == -1) {
- DebugPrintf("%8i", itr->getNumber());
+ debugPrintf("%8i", itr->getNumber());
if (++cnt % 10 == 0)
- DebugPrintf("\n");
+ debugPrintf("\n");
} else if (number == (int)itr->getNumber()) {
const uint32 tuple = itr->getTuple();
- DebugPrintf("(%3i, %3i, %3i, %3i) ", (tuple >> 24) & 0xff, (tuple >> 16) & 0xff,
+ debugPrintf("(%3i, %3i, %3i, %3i) ", (tuple >> 24) & 0xff, (tuple >> 16) & 0xff,
(tuple >> 8) & 0xff, tuple & 0xff);
if (++cnt % 4 == 0)
- DebugPrintf("\n");
+ debugPrintf("\n");
}
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
return true;
@@ -1152,8 +1152,8 @@ bool Console::cmdList(int argc, const char **argv) {
bool Console::cmdSaveGame(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Saves the current game state to the hard disk\n");
- DebugPrintf("Usage: %s <filename>\n", argv[0]);
+ debugPrintf("Saves the current game state to the hard disk\n");
+ debugPrintf("Usage: %s <filename>\n", argv[0]);
return true;
}
@@ -1163,19 +1163,19 @@ bool Console::cmdSaveGame(int argc, const char **argv) {
result++;
if (result)
- DebugPrintf("Note: Game state has %d open file handles.\n", result);
+ debugPrintf("Note: Game state has %d open file handles.\n", result);
Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
Common::OutSaveFile *out = saveFileMan->openForSaving(argv[1]);
const char *version = "";
if (!out) {
- DebugPrintf("Error opening savegame \"%s\" for writing\n", argv[1]);
+ debugPrintf("Error opening savegame \"%s\" for writing\n", argv[1]);
return true;
}
// TODO: enable custom descriptions? force filename into a specific format?
if (!gamestate_save(_engine->_gamestate, out, "debugging", version)) {
- DebugPrintf("Saving the game state to '%s' failed\n", argv[1]);
+ debugPrintf("Saving the game state to '%s' failed\n", argv[1]);
} else {
out->finalize();
if (out->err()) {
@@ -1189,8 +1189,8 @@ bool Console::cmdSaveGame(int argc, const char **argv) {
bool Console::cmdRestoreGame(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Restores a saved game from the hard disk\n");
- DebugPrintf("Usage: %s <filename>\n", argv[0]);
+ debugPrintf("Restores a saved game from the hard disk\n");
+ debugPrintf("Usage: %s <filename>\n", argv[0]);
return true;
}
@@ -1203,7 +1203,7 @@ bool Console::cmdRestoreGame(int argc, const char **argv) {
}
if (_engine->_gamestate->r_acc == make_reg(0, 1)) {
- DebugPrintf("Restoring gamestate '%s' failed.\n", argv[1]);
+ debugPrintf("Restoring gamestate '%s' failed.\n", argv[1]);
return true;
}
@@ -1231,25 +1231,25 @@ bool Console::cmdListSaves(int argc, const char **argv) {
for (uint i = 0; i < saves.size(); i++) {
Common::String filename = g_sci->getSavegameName(saves[i].id);
- DebugPrintf("%s: '%s'\n", filename.c_str(), saves[i].name);
+ debugPrintf("%s: '%s'\n", filename.c_str(), saves[i].name);
}
return true;
}
bool Console::cmdClassTable(int argc, const char **argv) {
- DebugPrintf("Available classes (parse a parameter to filter the table by a specific class):\n");
+ debugPrintf("Available classes (parse a parameter to filter the table by a specific class):\n");
for (uint i = 0; i < _engine->_gamestate->_segMan->classTableSize(); i++) {
Class temp = _engine->_gamestate->_segMan->_classTable[i];
if (temp.reg.getSegment()) {
const char *className = _engine->_gamestate->_segMan->getObjectName(temp.reg);
if (argc == 1 || (argc == 2 && !strcmp(className, argv[1]))) {
- DebugPrintf(" Class 0x%x (%s) at %04x:%04x (script %d)\n", i,
+ debugPrintf(" Class 0x%x (%s) at %04x:%04x (script %d)\n", i,
className,
PRINT_REG(temp.reg),
temp.script);
- } else DebugPrintf(" Class 0x%x (not loaded; can't get name) (script %d)\n", i, temp.script);
+ } else debugPrintf(" Class 0x%x (not loaded; can't get name) (script %d)\n", i, temp.script);
}
}
@@ -1257,52 +1257,52 @@ bool Console::cmdClassTable(int argc, const char **argv) {
}
bool Console::cmdSentenceFragments(int argc, const char **argv) {
- DebugPrintf("Sentence fragments (used to build Parse trees)\n");
+ debugPrintf("Sentence fragments (used to build Parse trees)\n");
for (uint i = 0; i < _engine->getVocabulary()->getParserBranchesSize(); i++) {
int j = 0;
const parse_tree_branch_t &branch = _engine->getVocabulary()->getParseTreeBranch(i);
- DebugPrintf("R%02d: [%x] ->", i, branch.id);
+ debugPrintf("R%02d: [%x] ->", i, branch.id);
while ((j < 10) && branch.data[j]) {
int dat = branch.data[j++];
switch (dat) {
case VOCAB_TREE_NODE_COMPARE_TYPE:
dat = branch.data[j++];
- DebugPrintf(" C(%x)", dat);
+ debugPrintf(" C(%x)", dat);
break;
case VOCAB_TREE_NODE_COMPARE_GROUP:
dat = branch.data[j++];
- DebugPrintf(" WG(%x)", dat);
+ debugPrintf(" WG(%x)", dat);
break;
case VOCAB_TREE_NODE_FORCE_STORAGE:
dat = branch.data[j++];
- DebugPrintf(" FORCE(%x)", dat);
+ debugPrintf(" FORCE(%x)", dat);
break;
default:
if (dat > VOCAB_TREE_NODE_LAST_WORD_STORAGE) {
int dat2 = branch.data[j++];
- DebugPrintf(" %x[%x]", dat, dat2);
+ debugPrintf(" %x[%x]", dat, dat2);
} else
- DebugPrintf(" ?%x?", dat);
+ debugPrintf(" ?%x?", dat);
}
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf("%d rules.\n", _engine->getVocabulary()->getParserBranchesSize());
+ debugPrintf("%d rules.\n", _engine->getVocabulary()->getParserBranchesSize());
return true;
}
bool Console::cmdParse(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Parses a sequence of words with a GNF rule set and prints the resulting parse tree\n");
- DebugPrintf("Usage: %s <word1> <word2> ... <wordn>\n", argv[0]);
+ debugPrintf("Parses a sequence of words with a GNF rule set and prints the resulting parse tree\n");
+ debugPrintf("Usage: %s <word1> <word2> ... <wordn>\n", argv[0]);
return true;
}
@@ -1316,7 +1316,7 @@ bool Console::cmdParse(int argc, const char **argv) {
strcat(string, argv[i]);
}
- DebugPrintf("Parsing '%s'\n", string);
+ debugPrintf("Parsing '%s'\n", string);
ResultWordListList words;
bool res = _engine->getVocabulary()->tokenizeString(words, string, &error);
@@ -1325,26 +1325,26 @@ bool Console::cmdParse(int argc, const char **argv) {
_engine->getVocabulary()->synonymizeTokens(words);
- DebugPrintf("Parsed to the following blocks:\n");
+ debugPrintf("Parsed to the following blocks:\n");
for (ResultWordListList::const_iterator i = words.begin(); i != words.end(); ++i) {
- DebugPrintf(" ");
+ debugPrintf(" ");
for (ResultWordList::const_iterator j = i->begin(); j != i->end(); ++j) {
- DebugPrintf("%sType[%04x] Group[%04x]", j == i->begin() ? "" : " / ", j->_class, j->_group);
+ debugPrintf("%sType[%04x] Group[%04x]", j == i->begin() ? "" : " / ", j->_class, j->_group);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
if (_engine->getVocabulary()->parseGNF(words, true))
syntax_fail = 1; // Building a tree failed
if (syntax_fail)
- DebugPrintf("Building a tree failed.\n");
+ debugPrintf("Building a tree failed.\n");
else
_engine->getVocabulary()->dumpParseTree();
} else {
- DebugPrintf("Unknown word: '%s'\n", error);
+ debugPrintf("Unknown word: '%s'\n", error);
free(error);
}
@@ -1353,10 +1353,10 @@ bool Console::cmdParse(int argc, const char **argv) {
bool Console::cmdSaid(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Matches a string against a said spec\n");
- DebugPrintf("Usage: %s <string> > & <said spec>\n", argv[0]);
- DebugPrintf("<string> is a sequence of actual words.\n");
- DebugPrintf("<said spec> is a sequence of hex tokens.\n");
+ debugPrintf("Matches a string against a said spec\n");
+ debugPrintf("Usage: %s <string> > & <said spec>\n", argv[0]);
+ debugPrintf("<string> is a sequence of actual words.\n");
+ debugPrintf("<said spec> is a sequence of hex tokens.\n");
return true;
}
@@ -1373,10 +1373,10 @@ bool Console::cmdSaid(int argc, const char **argv) {
}
if (p >= argc-1) {
- DebugPrintf("Matches a string against a said spec\n");
- DebugPrintf("Usage: %s <string> > & <said spec>\n", argv[0]);
- DebugPrintf("<string> is a sequence of actual words.\n");
- DebugPrintf("<said spec> is a sequence of hex tokens.\n");
+ debugPrintf("Matches a string against a said spec\n");
+ debugPrintf("Usage: %s <string> > & <said spec>\n", argv[0]);
+ debugPrintf("<string> is a sequence of actual words.\n");
+ debugPrintf("<said spec> is a sequence of hex tokens.\n");
return true;
}
@@ -1440,14 +1440,14 @@ bool Console::cmdSaid(int argc, const char **argv) {
_engine->getVocabulary()->synonymizeTokens(words);
- DebugPrintf("Parsed to the following blocks:\n");
+ debugPrintf("Parsed to the following blocks:\n");
for (ResultWordListList::const_iterator i = words.begin(); i != words.end(); ++i) {
- DebugPrintf(" ");
+ debugPrintf(" ");
for (ResultWordList::const_iterator j = i->begin(); j != i->end(); ++j) {
- DebugPrintf("%sType[%04x] Group[%04x]", j == i->begin() ? "" : " / ", j->_class, j->_group);
+ debugPrintf("%sType[%04x] Group[%04x]", j == i->begin() ? "" : " / ", j->_class, j->_group);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
@@ -1456,17 +1456,17 @@ bool Console::cmdSaid(int argc, const char **argv) {
syntax_fail = 1; // Building a tree failed
if (syntax_fail)
- DebugPrintf("Building a tree failed.\n");
+ debugPrintf("Building a tree failed.\n");
else {
_engine->getVocabulary()->dumpParseTree();
_engine->getVocabulary()->parserIsValid = true;
int ret = said((byte *)spec, true);
- DebugPrintf("kSaid: %s\n", (ret == SAID_NO_MATCH ? "No match" : "Match"));
+ debugPrintf("kSaid: %s\n", (ret == SAID_NO_MATCH ? "No match" : "Match"));
}
} else {
- DebugPrintf("Unknown word: '%s'\n", error);
+ debugPrintf("Unknown word: '%s'\n", error);
free(error);
}
@@ -1476,9 +1476,9 @@ bool Console::cmdSaid(int argc, const char **argv) {
bool Console::cmdParserNodes(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Shows the specified number of nodes from the parse node tree\n");
- DebugPrintf("Usage: %s <nr>\n", argv[0]);
- DebugPrintf("where <nr> is the number of nodes to show from the parse node tree\n");
+ debugPrintf("Shows the specified number of nodes from the parse node tree\n");
+ debugPrintf("Usage: %s <nr>\n", argv[0]);
+ debugPrintf("where <nr> is the number of nodes to show from the parse node tree\n");
return true;
}
@@ -1491,9 +1491,9 @@ bool Console::cmdParserNodes(int argc, const char **argv) {
bool Console::cmdSetPalette(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Sets a palette resource\n");
- DebugPrintf("Usage: %s <resourceId>\n", argv[0]);
- DebugPrintf("where <resourceId> is the number of the palette resource to set\n");
+ debugPrintf("Sets a palette resource\n");
+ debugPrintf("Usage: %s <resourceId>\n", argv[0]);
+ debugPrintf("where <resourceId> is the number of the palette resource to set\n");
return true;
}
@@ -1505,9 +1505,9 @@ bool Console::cmdSetPalette(int argc, const char **argv) {
bool Console::cmdDrawPic(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Draws a pic resource\n");
- DebugPrintf("Usage: %s <resourceId>\n", argv[0]);
- DebugPrintf("where <resourceId> is the number of the pic resource to draw\n");
+ debugPrintf("Draws a pic resource\n");
+ debugPrintf("Usage: %s <resourceId>\n", argv[0]);
+ debugPrintf("where <resourceId> is the number of the pic resource to draw\n");
return true;
}
@@ -1532,9 +1532,9 @@ bool Console::cmdDrawPic(int argc, const char **argv) {
bool Console::cmdDrawCel(int argc, const char **argv) {
if (argc < 4) {
- DebugPrintf("Draws a cel from a view resource\n");
- DebugPrintf("Usage: %s <resourceId> <loopNr> <celNr> \n", argv[0]);
- DebugPrintf("where <resourceId> is the number of the view resource to draw\n");
+ debugPrintf("Draws a cel from a view resource\n");
+ debugPrintf("Usage: %s <resourceId> <loopNr> <celNr> \n", argv[0]);
+ debugPrintf("where <resourceId> is the number of the view resource to draw\n");
return true;
}
@@ -1555,24 +1555,24 @@ bool Console::cmdDrawCel(int argc, const char **argv) {
bool Console::cmdUndither(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Enable/disable undithering.\n");
- DebugPrintf("Usage: %s <0/1>\n", argv[0]);
+ debugPrintf("Enable/disable undithering.\n");
+ debugPrintf("Usage: %s <0/1>\n", argv[0]);
return true;
}
bool flag = atoi(argv[1]) ? true : false;
_engine->_gfxScreen->enableUndithering(flag);
if (flag)
- DebugPrintf("undithering ENABLED\n");
+ debugPrintf("undithering ENABLED\n");
else
- DebugPrintf("undithering DISABLED\n");
+ debugPrintf("undithering DISABLED\n");
return true;
}
bool Console::cmdPicVisualize(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Enable/disable picture visualization (EGA only)\n");
- DebugPrintf("Usage: %s <0/1>\n", argv[0]);
+ debugPrintf("Enable/disable picture visualization (EGA only)\n");
+ debugPrintf("Usage: %s <0/1>\n", argv[0]);
return true;
}
@@ -1581,21 +1581,21 @@ bool Console::cmdPicVisualize(int argc, const char **argv) {
if (_engine->_resMan->getViewType() == kViewEga) {
_engine->_gfxPaint16->debugSetEGAdrawingVisualize(state);
if (state)
- DebugPrintf("picture visualization ENABLED\n");
+ debugPrintf("picture visualization ENABLED\n");
else
- DebugPrintf("picture visualization DISABLED\n");
+ debugPrintf("picture visualization DISABLED\n");
} else {
- DebugPrintf("picture visualization only available for EGA games\n");
+ debugPrintf("picture visualization only available for EGA games\n");
}
return true;
}
bool Console::cmdPlayVideo(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Plays a SEQ, AVI, VMD, RBT or DUK video.\n");
- DebugPrintf("Usage: %s <video file name> <delay>\n", argv[0]);
- DebugPrintf("The video file name should include the extension\n");
- DebugPrintf("Delay is only used in SEQ videos and is measured in ticks (default: 10)\n");
+ debugPrintf("Plays a SEQ, AVI, VMD, RBT or DUK video.\n");
+ debugPrintf("Usage: %s <video file name> <delay>\n", argv[0]);
+ debugPrintf("The video file name should include the extension\n");
+ debugPrintf("Delay is only used in SEQ videos and is measured in ticks (default: 10)\n");
return true;
}
@@ -1608,27 +1608,27 @@ bool Console::cmdPlayVideo(int argc, const char **argv) {
_videoFrameDelay = (argc == 2) ? 10 : atoi(argv[2]);
return Cmd_Exit(0, 0);
} else {
- DebugPrintf("Unknown video file type\n");
+ debugPrintf("Unknown video file type\n");
return true;
}
}
bool Console::cmdAnimateList(int argc, const char **argv) {
if (_engine->_gfxAnimate) {
- DebugPrintf("Animate list:\n");
+ debugPrintf("Animate list:\n");
_engine->_gfxAnimate->printAnimateList(this);
} else {
- DebugPrintf("This SCI version does not have an animate list\n");
+ debugPrintf("This SCI version does not have an animate list\n");
}
return true;
}
bool Console::cmdWindowList(int argc, const char **argv) {
if (_engine->_gfxPorts) {
- DebugPrintf("Window list:\n");
+ debugPrintf("Window list:\n");
_engine->_gfxPorts->printWindowList(this);
} else {
- DebugPrintf("This SCI version does not have a list of ports\n");
+ debugPrintf("This SCI version does not have a list of ports\n");
}
return true;
}
@@ -1636,41 +1636,41 @@ bool Console::cmdWindowList(int argc, const char **argv) {
bool Console::cmdPlaneList(int argc, const char **argv) {
#ifdef ENABLE_SCI32
if (_engine->_gfxFrameout) {
- DebugPrintf("Plane list:\n");
+ debugPrintf("Plane list:\n");
_engine->_gfxFrameout->printPlaneList(this);
} else {
- DebugPrintf("This SCI version does not have a list of planes\n");
+ debugPrintf("This SCI version does not have a list of planes\n");
}
#else
- DebugPrintf("SCI32 isn't included in this compiled executable\n");
+ debugPrintf("SCI32 isn't included in this compiled executable\n");
#endif
return true;
}
bool Console::cmdPlaneItemList(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Shows the list of items for a plane\n");
- DebugPrintf("Usage: %s <plane address>\n", argv[0]);
+ debugPrintf("Shows the list of items for a plane\n");
+ debugPrintf("Usage: %s <plane address>\n", argv[0]);
return true;
}
reg_t planeObject = NULL_REG;
if (parse_reg_t(_engine->_gamestate, argv[1], &planeObject, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
#ifdef ENABLE_SCI32
if (_engine->_gfxFrameout) {
- DebugPrintf("Plane item list:\n");
+ debugPrintf("Plane item list:\n");
_engine->_gfxFrameout->printPlaneItemList(this, planeObject);
} else {
- DebugPrintf("This SCI version does not have a list of plane items\n");
+ debugPrintf("This SCI version does not have a list of plane items\n");
}
#else
- DebugPrintf("SCI32 isn't included in this compiled executable\n");
+ debugPrintf("SCI32 isn't included in this compiled executable\n");
#endif
return true;
}
@@ -1680,7 +1680,7 @@ bool Console::cmdSavedBits(int argc, const char **argv) {
SegmentId id = segman->findSegmentByType(SEG_TYPE_HUNK);
HunkTable* hunks = (HunkTable *)segman->getSegmentObj(id);
if (!hunks) {
- DebugPrintf("No hunk segment found.\n");
+ debugPrintf("No hunk segment found.\n");
return true;
}
@@ -1693,7 +1693,7 @@ bool Console::cmdSavedBits(int argc, const char **argv) {
byte* memoryPtr = (byte *)h.mem;
if (memoryPtr) {
- DebugPrintf("%04x:%04x:", PRINT_REG(entries[i]));
+ debugPrintf("%04x:%04x:", PRINT_REG(entries[i]));
Common::Rect rect;
byte mask;
@@ -1702,17 +1702,17 @@ bool Console::cmdSavedBits(int argc, const char **argv) {
memcpy((void *)&rect, memoryPtr, sizeof(rect));
memcpy((void *)&mask, memoryPtr + sizeof(rect), sizeof(mask));
- DebugPrintf(" %d,%d - %d,%d", rect.top, rect.left,
+ debugPrintf(" %d,%d - %d,%d", rect.top, rect.left,
rect.bottom, rect.right);
if (mask & GFX_SCREEN_MASK_VISUAL)
- DebugPrintf(" visual");
+ debugPrintf(" visual");
if (mask & GFX_SCREEN_MASK_PRIORITY)
- DebugPrintf(" priority");
+ debugPrintf(" priority");
if (mask & GFX_SCREEN_MASK_CONTROL)
- DebugPrintf(" control");
+ debugPrintf(" control");
if (mask & GFX_SCREEN_MASK_DISPLAY)
- DebugPrintf(" display");
- DebugPrintf("\n");
+ debugPrintf(" display");
+ debugPrintf("\n");
}
}
}
@@ -1723,22 +1723,22 @@ bool Console::cmdSavedBits(int argc, const char **argv) {
bool Console::cmdShowSavedBits(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Display saved bits.\n");
- DebugPrintf("Usage: %s <address>\n", argv[0]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Display saved bits.\n");
+ debugPrintf("Usage: %s <address>\n", argv[0]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t memoryHandle = NULL_REG;
if (parse_reg_t(_engine->_gamestate, argv[1], &memoryHandle, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
if (memoryHandle.isNull()) {
- DebugPrintf("Invalid address.\n");
+ debugPrintf("Invalid address.\n");
return true;
}
@@ -1746,26 +1746,26 @@ bool Console::cmdShowSavedBits(int argc, const char **argv) {
SegmentId id = segman->findSegmentByType(SEG_TYPE_HUNK);
HunkTable* hunks = (HunkTable *)segman->getSegmentObj(id);
if (!hunks) {
- DebugPrintf("No hunk segment found.\n");
+ debugPrintf("No hunk segment found.\n");
return true;
}
if (memoryHandle.getSegment() != id || !hunks->isValidOffset(memoryHandle.getOffset())) {
- DebugPrintf("Invalid address.\n");
+ debugPrintf("Invalid address.\n");
return true;
}
const Hunk& h = hunks->_table[memoryHandle.getOffset()];
if (strcmp(h.type, "SaveBits()") != 0) {
- DebugPrintf("Invalid address.\n");
+ debugPrintf("Invalid address.\n");
return true;
}
byte *memoryPtr = segman->getHunkPointer(memoryHandle);
if (!memoryPtr) {
- DebugPrintf("Invalid or freed bits.\n");
+ debugPrintf("Invalid or freed bits.\n");
return true;
}
@@ -1783,17 +1783,17 @@ bool Console::cmdShowSavedBits(int argc, const char **argv) {
Common::Point bl(rect.left, rect.bottom-1);
Common::Point br(rect.right-1, rect.bottom-1);
- DebugPrintf(" %d,%d - %d,%d", rect.top, rect.left,
+ debugPrintf(" %d,%d - %d,%d", rect.top, rect.left,
rect.bottom, rect.right);
if (mask & GFX_SCREEN_MASK_VISUAL)
- DebugPrintf(" visual");
+ debugPrintf(" visual");
if (mask & GFX_SCREEN_MASK_PRIORITY)
- DebugPrintf(" priority");
+ debugPrintf(" priority");
if (mask & GFX_SCREEN_MASK_CONTROL)
- DebugPrintf(" control");
+ debugPrintf(" control");
if (mask & GFX_SCREEN_MASK_DISPLAY)
- DebugPrintf(" display");
- DebugPrintf("\n");
+ debugPrintf(" display");
+ debugPrintf("\n");
if (!_engine->_gfxPaint16 || !_engine->_gfxScreen)
return true;
@@ -1843,7 +1843,7 @@ bool Console::cmdShowSavedBits(int argc, const char **argv) {
bool Console::cmdParseGrammar(int argc, const char **argv) {
- DebugPrintf("Parse grammar, in strict GNF:\n");
+ debugPrintf("Parse grammar, in strict GNF:\n");
_engine->getVocabulary()->buildGNF(true);
@@ -1851,71 +1851,71 @@ bool Console::cmdParseGrammar(int argc, const char **argv) {
}
bool Console::cmdPrintSegmentTable(int argc, const char **argv) {
- DebugPrintf("Segment table:\n");
+ debugPrintf("Segment table:\n");
for (uint i = 0; i < _engine->_gamestate->_segMan->_heap.size(); i++) {
SegmentObj *mobj = _engine->_gamestate->_segMan->_heap[i];
if (mobj && mobj->getType()) {
- DebugPrintf(" [%04x] ", i);
+ debugPrintf(" [%04x] ", i);
switch (mobj->getType()) {
case SEG_TYPE_SCRIPT:
- DebugPrintf("S script.%03d l:%d ", (*(Script *)mobj).getScriptNumber(), (*(Script *)mobj).getLockers());
+ debugPrintf("S script.%03d l:%d ", (*(Script *)mobj).getScriptNumber(), (*(Script *)mobj).getLockers());
break;
case SEG_TYPE_CLONES:
- DebugPrintf("C clones (%d allocd)", (*(CloneTable *)mobj).entries_used);
+ debugPrintf("C clones (%d allocd)", (*(CloneTable *)mobj).entries_used);
break;
case SEG_TYPE_LOCALS:
- DebugPrintf("V locals %03d", (*(LocalVariables *)mobj).script_id);
+ debugPrintf("V locals %03d", (*(LocalVariables *)mobj).script_id);
break;
case SEG_TYPE_STACK:
- DebugPrintf("D data stack (%d)", (*(DataStack *)mobj)._capacity);
+ debugPrintf("D data stack (%d)", (*(DataStack *)mobj)._capacity);
break;
case SEG_TYPE_LISTS:
- DebugPrintf("L lists (%d)", (*(ListTable *)mobj).entries_used);
+ debugPrintf("L lists (%d)", (*(ListTable *)mobj).entries_used);
break;
case SEG_TYPE_NODES:
- DebugPrintf("N nodes (%d)", (*(NodeTable *)mobj).entries_used);
+ debugPrintf("N nodes (%d)", (*(NodeTable *)mobj).entries_used);
break;
case SEG_TYPE_HUNK:
- DebugPrintf("H hunk (%d)", (*(HunkTable *)mobj).entries_used);
+ debugPrintf("H hunk (%d)", (*(HunkTable *)mobj).entries_used);
break;
case SEG_TYPE_DYNMEM:
- DebugPrintf("M dynmem: %d bytes", (*(DynMem *)mobj)._size);
+ debugPrintf("M dynmem: %d bytes", (*(DynMem *)mobj)._size);
break;
#ifdef ENABLE_SCI32
case SEG_TYPE_ARRAY:
- DebugPrintf("A SCI32 arrays (%d)", (*(ArrayTable *)mobj).entries_used);
+ debugPrintf("A SCI32 arrays (%d)", (*(ArrayTable *)mobj).entries_used);
break;
case SEG_TYPE_STRING:
- DebugPrintf("T SCI32 strings (%d)", (*(StringTable *)mobj).entries_used);
+ debugPrintf("T SCI32 strings (%d)", (*(StringTable *)mobj).entries_used);
break;
#endif
default:
- DebugPrintf("I Invalid (type = %x)", mobj->getType());
+ debugPrintf("I Invalid (type = %x)", mobj->getType());
break;
}
- DebugPrintf(" \n");
+ debugPrintf(" \n");
}
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
bool Console::segmentInfo(int nr) {
- DebugPrintf("[%04x] ", nr);
+ debugPrintf("[%04x] ", nr);
if ((nr < 0) || ((uint)nr >= _engine->_gamestate->_segMan->_heap.size()) || !_engine->_gamestate->_segMan->_heap[nr])
return false;
@@ -1926,30 +1926,30 @@ bool Console::segmentInfo(int nr) {
case SEG_TYPE_SCRIPT: {
Script *scr = (Script *)mobj;
- DebugPrintf("script.%03d locked by %d, bufsize=%d (%x)\n", scr->getScriptNumber(), scr->getLockers(), (uint)scr->getBufSize(), (uint)scr->getBufSize());
+ debugPrintf("script.%03d locked by %d, bufsize=%d (%x)\n", scr->getScriptNumber(), scr->getLockers(), (uint)scr->getBufSize(), (uint)scr->getBufSize());
if (scr->getExportTable())
- DebugPrintf(" Exports: %4d at %d\n", scr->getExportsNr(), (int)(((const byte *)scr->getExportTable()) - ((const byte *)scr->getBuf())));
+ debugPrintf(" Exports: %4d at %d\n", scr->getExportsNr(), (int)(((const byte *)scr->getExportTable()) - ((const byte *)scr->getBuf())));
else
- DebugPrintf(" Exports: none\n");
+ debugPrintf(" Exports: none\n");
- DebugPrintf(" Synonyms: %4d\n", scr->getSynonymsNr());
+ debugPrintf(" Synonyms: %4d\n", scr->getSynonymsNr());
if (scr->getLocalsCount() > 0)
- DebugPrintf(" Locals : %4d in segment 0x%x\n", scr->getLocalsCount(), scr->getLocalsSegment());
+ debugPrintf(" Locals : %4d in segment 0x%x\n", scr->getLocalsCount(), scr->getLocalsSegment());
else
- DebugPrintf(" Locals : none\n");
+ debugPrintf(" Locals : none\n");
ObjMap objects = scr->getObjectMap();
- DebugPrintf(" Objects: %4d\n", objects.size());
+ debugPrintf(" Objects: %4d\n", objects.size());
ObjMap::iterator it;
const ObjMap::iterator end = objects.end();
for (it = objects.begin(); it != end; ++it) {
- DebugPrintf(" ");
+ debugPrintf(" ");
// Object header
const Object *obj = _engine->_gamestate->_segMan->getObject(it->_value.getPos());
if (obj)
- DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(it->_value.getPos()),
+ debugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(it->_value.getPos()),
_engine->_gamestate->_segMan->getObjectName(it->_value.getPos()),
obj->getVarCount(), obj->getMethodCount());
}
@@ -1958,31 +1958,31 @@ bool Console::segmentInfo(int nr) {
case SEG_TYPE_LOCALS: {
LocalVariables *locals = (LocalVariables *)mobj;
- DebugPrintf("locals for script.%03d\n", locals->script_id);
- DebugPrintf(" %d (0x%x) locals\n", locals->_locals.size(), locals->_locals.size());
+ debugPrintf("locals for script.%03d\n", locals->script_id);
+ debugPrintf(" %d (0x%x) locals\n", locals->_locals.size(), locals->_locals.size());
}
break;
case SEG_TYPE_STACK: {
DataStack *stack = (DataStack *)mobj;
- DebugPrintf("stack\n");
- DebugPrintf(" %d (0x%x) entries\n", stack->_capacity, stack->_capacity);
+ debugPrintf("stack\n");
+ debugPrintf(" %d (0x%x) entries\n", stack->_capacity, stack->_capacity);
}
break;
case SEG_TYPE_CLONES: {
CloneTable *ct = (CloneTable *)mobj;
- DebugPrintf("clones\n");
+ debugPrintf("clones\n");
for (uint i = 0; i < ct->_table.size(); i++)
if (ct->isValidEntry(i)) {
reg_t objpos = make_reg(nr, i);
- DebugPrintf(" [%04x] %s; copy of ", i, _engine->_gamestate->_segMan->getObjectName(objpos));
+ debugPrintf(" [%04x] %s; copy of ", i, _engine->_gamestate->_segMan->getObjectName(objpos));
// Object header
const Object *obj = _engine->_gamestate->_segMan->getObject(ct->_table[i].getPos());
if (obj)
- DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(ct->_table[i].getPos()),
+ debugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(ct->_table[i].getPos()),
_engine->_gamestate->_segMan->getObjectName(ct->_table[i].getPos()),
obj->getVarCount(), obj->getMethodCount());
}
@@ -1992,34 +1992,34 @@ bool Console::segmentInfo(int nr) {
case SEG_TYPE_LISTS: {
ListTable *lt = (ListTable *)mobj;
- DebugPrintf("lists\n");
+ debugPrintf("lists\n");
for (uint i = 0; i < lt->_table.size(); i++)
if (lt->isValidEntry(i)) {
- DebugPrintf(" [%04x]: ", i);
+ debugPrintf(" [%04x]: ", i);
printList(&(lt->_table[i]));
}
}
break;
case SEG_TYPE_NODES: {
- DebugPrintf("nodes (total %d)\n", (*(NodeTable *)mobj).entries_used);
+ debugPrintf("nodes (total %d)\n", (*(NodeTable *)mobj).entries_used);
break;
}
case SEG_TYPE_HUNK: {
HunkTable *ht = (HunkTable *)mobj;
- DebugPrintf("hunk (total %d)\n", ht->entries_used);
+ debugPrintf("hunk (total %d)\n", ht->entries_used);
for (uint i = 0; i < ht->_table.size(); i++)
if (ht->isValidEntry(i)) {
- DebugPrintf(" [%04x] %d bytes at %p, type=%s\n",
+ debugPrintf(" [%04x] %d bytes at %p, type=%s\n",
i, ht->_table[i].size, ht->_table[i].mem, ht->_table[i].type);
}
}
break;
case SEG_TYPE_DYNMEM: {
- DebugPrintf("dynmem (%s): %d bytes\n",
+ debugPrintf("dynmem (%s): %d bytes\n",
(*(DynMem *)mobj)._description.c_str(), (*(DynMem *)mobj)._size);
Common::hexdump((*(DynMem *)mobj)._buf, (*(DynMem *)mobj)._size, 16, 0);
@@ -2028,28 +2028,28 @@ bool Console::segmentInfo(int nr) {
#ifdef ENABLE_SCI32
case SEG_TYPE_STRING:
- DebugPrintf("SCI32 strings\n");
+ debugPrintf("SCI32 strings\n");
break;
case SEG_TYPE_ARRAY:
- DebugPrintf("SCI32 arrays\n");
+ debugPrintf("SCI32 arrays\n");
break;
#endif
default :
- DebugPrintf("Invalid type %d\n", mobj->getType());
+ debugPrintf("Invalid type %d\n", mobj->getType());
break;
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
bool Console::cmdSegmentInfo(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Provides information on the specified segment(s)\n");
- DebugPrintf("Usage: %s <segment number>\n", argv[0]);
- DebugPrintf("<segment number> can be a number, which shows the information of the segment with\n");
- DebugPrintf("the specified number, or \"all\" to show information on all active segments\n");
+ debugPrintf("Provides information on the specified segment(s)\n");
+ debugPrintf("Usage: %s <segment number>\n", argv[0]);
+ debugPrintf("<segment number> can be a number, which shows the information of the segment with\n");
+ debugPrintf("the specified number, or \"all\" to show information on all active segments\n");
return true;
}
@@ -2061,7 +2061,7 @@ bool Console::cmdSegmentInfo(int argc, const char **argv) {
if (!parseInteger(argv[1], segmentNr))
return true;
if (!segmentInfo(segmentNr))
- DebugPrintf("Segment %04xh does not exist\n", segmentNr);
+ debugPrintf("Segment %04xh does not exist\n", segmentNr);
}
return true;
@@ -2070,8 +2070,8 @@ bool Console::cmdSegmentInfo(int argc, const char **argv) {
bool Console::cmdKillSegment(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Deletes the specified segment\n");
- DebugPrintf("Usage: %s <segment number>\n", argv[0]);
+ debugPrintf("Deletes the specified segment\n");
+ debugPrintf("Usage: %s <segment number>\n", argv[0]);
return true;
}
int segmentNumber;
@@ -2084,13 +2084,13 @@ bool Console::cmdKillSegment(int argc, const char **argv) {
bool Console::cmdShowMap(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Switches to one of the following screen maps\n");
- DebugPrintf("Usage: %s <screen map>\n", argv[0]);
- DebugPrintf("Screen maps:\n");
- DebugPrintf("- 0: visual map\n");
- DebugPrintf("- 1: priority map\n");
- DebugPrintf("- 2: control map\n");
- DebugPrintf("- 3: display screen\n");
+ debugPrintf("Switches to one of the following screen maps\n");
+ debugPrintf("Usage: %s <screen map>\n", argv[0]);
+ debugPrintf("Screen maps:\n");
+ debugPrintf("- 0: visual map\n");
+ debugPrintf("- 1: priority map\n");
+ debugPrintf("- 2: control map\n");
+ debugPrintf("- 3: display screen\n");
return true;
}
@@ -2105,14 +2105,14 @@ bool Console::cmdShowMap(int argc, const char **argv) {
break;
default:
- DebugPrintf("Map %d is not available.\n", map);
+ debugPrintf("Map %d is not available.\n", map);
return true;
}
return Cmd_Exit(0, 0);
}
bool Console::cmdSongLib(int argc, const char **argv) {
- DebugPrintf("Song library:\n");
+ debugPrintf("Song library:\n");
g_sci->_soundCmd->printPlayList(this);
return true;
@@ -2120,16 +2120,16 @@ bool Console::cmdSongLib(int argc, const char **argv) {
bool Console::cmdSongInfo(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Shows information about a given song in the playlist\n");
- DebugPrintf("Usage: %s <song object>\n", argv[0]);
+ debugPrintf("Shows information about a given song in the playlist\n");
+ debugPrintf("Usage: %s <song object>\n", argv[0]);
return true;
}
reg_t addr;
if (parse_reg_t(_engine->_gamestate, argv[1], &addr, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2140,15 +2140,15 @@ bool Console::cmdSongInfo(int argc, const char **argv) {
bool Console::cmdStartSound(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Adds the requested sound resource to the playlist, and starts playing it\n");
- DebugPrintf("Usage: %s <sound resource id>\n", argv[0]);
+ debugPrintf("Adds the requested sound resource to the playlist, and starts playing it\n");
+ debugPrintf("Usage: %s <sound resource id>\n", argv[0]);
return true;
}
int16 number = atoi(argv[1]);
if (!_engine->getResMan()->testResource(ResourceId(kResourceTypeSound, number))) {
- DebugPrintf("Unable to load this sound resource, most probably it has an equivalent audio resource (SCI1.1)\n");
+ debugPrintf("Unable to load this sound resource, most probably it has an equivalent audio resource (SCI1.1)\n");
return true;
}
@@ -2158,20 +2158,20 @@ bool Console::cmdStartSound(int argc, const char **argv) {
bool Console::cmdToggleSound(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Plays or stops the specified sound in the playlist\n");
- DebugPrintf("Usage: %s <address> <state>\n", argv[0]);
- DebugPrintf("Where:\n");
- DebugPrintf("- <address> is the address of the sound to play or stop.\n");
- DebugPrintf("- <state> is the new state (play or stop).\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Plays or stops the specified sound in the playlist\n");
+ debugPrintf("Usage: %s <address> <state>\n", argv[0]);
+ debugPrintf("Where:\n");
+ debugPrintf("- <address> is the address of the sound to play or stop.\n");
+ debugPrintf("- <state> is the new state (play or stop).\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t id;
if (parse_reg_t(_engine->_gamestate, argv[1], &id, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2183,7 +2183,7 @@ bool Console::cmdToggleSound(int argc, const char **argv) {
else if (newState == "stop")
g_sci->_soundCmd->processStopSound(id, false);
else
- DebugPrintf("New state can either be 'play' or 'stop'");
+ debugPrintf("New state can either be 'play' or 'stop'");
return true;
}
@@ -2191,40 +2191,40 @@ bool Console::cmdToggleSound(int argc, const char **argv) {
bool Console::cmdStopAllSounds(int argc, const char **argv) {
g_sci->_soundCmd->stopAllSounds();
- DebugPrintf("All sounds have been stopped\n");
+ debugPrintf("All sounds have been stopped\n");
return true;
}
bool Console::cmdIsSample(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Tests whether a given sound resource is a PCM sample, \n");
- DebugPrintf("and displays information on it if it is.\n");
- DebugPrintf("Usage: %s <sample id>\n", argv[0]);
+ debugPrintf("Tests whether a given sound resource is a PCM sample, \n");
+ debugPrintf("and displays information on it if it is.\n");
+ debugPrintf("Usage: %s <sample id>\n", argv[0]);
return true;
}
int16 number = atoi(argv[1]);
if (!_engine->getResMan()->testResource(ResourceId(kResourceTypeSound, number))) {
- DebugPrintf("Unable to load this sound resource, most probably it has an equivalent audio resource (SCI1.1)\n");
+ debugPrintf("Unable to load this sound resource, most probably it has an equivalent audio resource (SCI1.1)\n");
return true;
}
SoundResource *soundRes = new SoundResource(number, _engine->getResMan(), _engine->_features->detectDoSoundType());
if (!soundRes) {
- DebugPrintf("Not a sound resource!\n");
+ debugPrintf("Not a sound resource!\n");
return true;
}
SoundResource::Track *track = soundRes->getDigitalTrack();
if (!track || track->digitalChannelNr == -1) {
- DebugPrintf("Valid song, but not a sample.\n");
+ debugPrintf("Valid song, but not a sample.\n");
delete soundRes;
return true;
}
- DebugPrintf("Sample size: %d, sample rate: %d, channels: %d, digital channel number: %d\n",
+ debugPrintf("Sample size: %d, sample rate: %d, channels: %d, digital channel number: %d\n",
track->digitalSampleSize, track->digitalSampleRate, track->channelCount, track->digitalChannelNr);
delete soundRes;
@@ -2232,7 +2232,7 @@ bool Console::cmdIsSample(int argc, const char **argv) {
}
bool Console::cmdGCInvoke(int argc, const char **argv) {
- DebugPrintf("Performing garbage collection...\n");
+ debugPrintf("Performing garbage collection...\n");
run_gc(_engine->_gamestate);
return true;
}
@@ -2240,9 +2240,9 @@ bool Console::cmdGCInvoke(int argc, const char **argv) {
bool Console::cmdGCObjects(int argc, const char **argv) {
AddrSet *use_map = findAllActiveReferences(_engine->_gamestate);
- DebugPrintf("Reachable object references (normalised):\n");
+ debugPrintf("Reachable object references (normalised):\n");
for (AddrSet::iterator i = use_map->begin(); i != use_map->end(); ++i) {
- DebugPrintf(" - %04x:%04x\n", PRINT_REG(i->_key));
+ debugPrintf(" - %04x:%04x\n", PRINT_REG(i->_key));
}
delete use_map;
@@ -2252,93 +2252,93 @@ bool Console::cmdGCObjects(int argc, const char **argv) {
bool Console::cmdGCShowReachable(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Prints all addresses directly reachable from the memory object specified as parameter.\n");
- DebugPrintf("Usage: %s <address>\n", argv[0]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Prints all addresses directly reachable from the memory object specified as parameter.\n");
+ debugPrintf("Usage: %s <address>\n", argv[0]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t addr;
if (parse_reg_t(_engine->_gamestate, argv[1], &addr, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.getSegment());
if (!mobj) {
- DebugPrintf("Unknown segment : %x\n", addr.getSegment());
+ debugPrintf("Unknown segment : %x\n", addr.getSegment());
return 1;
}
- DebugPrintf("Reachable from %04x:%04x:\n", PRINT_REG(addr));
+ debugPrintf("Reachable from %04x:%04x:\n", PRINT_REG(addr));
const Common::Array<reg_t> tmp = mobj->listAllOutgoingReferences(addr);
for (Common::Array<reg_t>::const_iterator it = tmp.begin(); it != tmp.end(); ++it)
if (it->getSegment())
- g_sci->getSciDebugger()->DebugPrintf(" %04x:%04x\n", PRINT_REG(*it));
+ g_sci->getSciDebugger()->debugPrintf(" %04x:%04x\n", PRINT_REG(*it));
return true;
}
bool Console::cmdGCShowFreeable(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Prints all addresses freeable in the segment associated with the\n");
- DebugPrintf("given address (offset is ignored).\n");
- DebugPrintf("Usage: %s <address>\n", argv[0]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Prints all addresses freeable in the segment associated with the\n");
+ debugPrintf("given address (offset is ignored).\n");
+ debugPrintf("Usage: %s <address>\n", argv[0]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t addr;
if (parse_reg_t(_engine->_gamestate, argv[1], &addr, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.getSegment());
if (!mobj) {
- DebugPrintf("Unknown segment : %x\n", addr.getSegment());
+ debugPrintf("Unknown segment : %x\n", addr.getSegment());
return true;
}
- DebugPrintf("Freeable in segment %04x:\n", addr.getSegment());
+ debugPrintf("Freeable in segment %04x:\n", addr.getSegment());
const Common::Array<reg_t> tmp = mobj->listAllDeallocatable(addr.getSegment());
for (Common::Array<reg_t>::const_iterator it = tmp.begin(); it != tmp.end(); ++it)
if (it->getSegment())
- g_sci->getSciDebugger()->DebugPrintf(" %04x:%04x\n", PRINT_REG(*it));
+ g_sci->getSciDebugger()->debugPrintf(" %04x:%04x\n", PRINT_REG(*it));
return true;
}
bool Console::cmdGCNormalize(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Prints the \"normal\" address of a given address,\n");
- DebugPrintf("i.e. the address we would free in order to free\n");
- DebugPrintf("the object associated with the original address.\n");
- DebugPrintf("Usage: %s <address>\n", argv[0]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Prints the \"normal\" address of a given address,\n");
+ debugPrintf("i.e. the address we would free in order to free\n");
+ debugPrintf("the object associated with the original address.\n");
+ debugPrintf("Usage: %s <address>\n", argv[0]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t addr;
if (parse_reg_t(_engine->_gamestate, argv[1], &addr, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.getSegment());
if (!mobj) {
- DebugPrintf("Unknown segment : %x\n", addr.getSegment());
+ debugPrintf("Unknown segment : %x\n", addr.getSegment());
return true;
}
addr = mobj->findCanonicAddress(_engine->_gamestate->_segMan, addr);
- DebugPrintf(" %04x:%04x\n", PRINT_REG(addr));
+ debugPrintf(" %04x:%04x\n", PRINT_REG(addr));
return true;
}
@@ -2347,12 +2347,12 @@ bool Console::cmdVMVarlist(int argc, const char **argv) {
EngineState *s = _engine->_gamestate;
const char *varnames[] = {"global", "local", "temp", "param"};
- DebugPrintf("Addresses of variables in the VM:\n");
+ debugPrintf("Addresses of variables in the VM:\n");
for (int i = 0; i < 4; i++) {
- DebugPrintf("%s vars at %04x:%04x ", varnames[i], PRINT_REG(make_reg(s->variablesSegment[i], s->variables[i] - s->variablesBase[i])));
- DebugPrintf(" total %d", s->variablesMax[i]);
- DebugPrintf("\n");
+ debugPrintf("%s vars at %04x:%04x ", varnames[i], PRINT_REG(make_reg(s->variablesSegment[i], s->variables[i] - s->variablesBase[i])));
+ debugPrintf(" total %d", s->variablesMax[i]);
+ debugPrintf("\n");
}
return true;
@@ -2360,12 +2360,12 @@ bool Console::cmdVMVarlist(int argc, const char **argv) {
bool Console::cmdVMVars(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Displays or changes variables in the VM\n");
- DebugPrintf("Usage: %s <type> <varnum> [<value>]\n", argv[0]);
- DebugPrintf("First parameter is either g(lobal), l(ocal), t(emp), p(aram) or a(cc).\n");
- DebugPrintf("Second parameter is the var number (not specified on acc)\n");
- DebugPrintf("Third parameter (if specified) is the value to set the variable to, in address form\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Displays or changes variables in the VM\n");
+ debugPrintf("Usage: %s <type> <varnum> [<value>]\n", argv[0]);
+ debugPrintf("First parameter is either g(lobal), l(ocal), t(emp), p(aram) or a(cc).\n");
+ debugPrintf("Second parameter is the var number (not specified on acc)\n");
+ debugPrintf("Third parameter (if specified) is the value to set the variable to, in address form\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2379,7 +2379,7 @@ bool Console::cmdVMVars(int argc, const char **argv) {
const char *setValue = NULL;
if (!varType_pre) {
- DebugPrintf("Invalid variable type '%c'\n", *argv[1]);
+ debugPrintf("Invalid variable type '%c'\n", *argv[1]);
return true;
}
@@ -2392,11 +2392,11 @@ bool Console::cmdVMVars(int argc, const char **argv) {
case 3: {
// for global, local, temp and param, we need an index
if (argc < 3) {
- DebugPrintf("Variable number must be specified for requested type\n");
+ debugPrintf("Variable number must be specified for requested type\n");
return true;
}
if (argc > 4) {
- DebugPrintf("Too many arguments\n");
+ debugPrintf("Too many arguments\n");
return true;
}
@@ -2404,12 +2404,12 @@ bool Console::cmdVMVars(int argc, const char **argv) {
return true;
if (varIndex < 0) {
- DebugPrintf("Variable number may not be negative\n");
+ debugPrintf("Variable number may not be negative\n");
return true;
}
if (s->variablesMax[varType] <= varIndex) {
- DebugPrintf("Maximum variable number for this type is %d (0x%x)\n", s->variablesMax[varType], s->variablesMax[varType]);
+ debugPrintf("Maximum variable number for this type is %d (0x%x)\n", s->variablesMax[varType], s->variablesMax[varType]);
return true;
}
curValue = &s->variables[varType][varIndex];
@@ -2421,7 +2421,7 @@ bool Console::cmdVMVars(int argc, const char **argv) {
case 4:
// acc
if (argc > 3) {
- DebugPrintf("Too many arguments\n");
+ debugPrintf("Too many arguments\n");
return true;
}
curValue = &s->r_acc;
@@ -2435,16 +2435,16 @@ bool Console::cmdVMVars(int argc, const char **argv) {
if (!setValue) {
if (varType == 4)
- DebugPrintf("%s == %04x:%04x", varNames[varType], PRINT_REG(*curValue));
+ debugPrintf("%s == %04x:%04x", varNames[varType], PRINT_REG(*curValue));
else
- DebugPrintf("%s var %d == %04x:%04x", varNames[varType], varIndex, PRINT_REG(*curValue));
+ debugPrintf("%s var %d == %04x:%04x", varNames[varType], varIndex, PRINT_REG(*curValue));
printBasicVarInfo(*curValue);
- DebugPrintf("\n");
+ debugPrintf("\n");
} else {
if (parse_reg_t(s, setValue, curValue, true)) {
- DebugPrintf("Invalid value/address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
- DebugPrintf("Or pass a decimal or hexadecimal value directly (e.g. 12, 1Ah)\n");
+ debugPrintf("Invalid value/address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Or pass a decimal or hexadecimal value directly (e.g. 12, 1Ah)\n");
return true;
}
}
@@ -2453,13 +2453,13 @@ bool Console::cmdVMVars(int argc, const char **argv) {
bool Console::cmdStack(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Lists the specified number of stack elements.\n");
- DebugPrintf("Usage: %s <elements>\n", argv[0]);
+ debugPrintf("Lists the specified number of stack elements.\n");
+ debugPrintf("Usage: %s <elements>\n", argv[0]);
return true;
}
if (_engine->_gamestate->_executionStack.empty()) {
- DebugPrintf("No exec stack!");
+ debugPrintf("No exec stack!");
return true;
}
@@ -2468,9 +2468,9 @@ bool Console::cmdStack(int argc, const char **argv) {
for (int i = nr; i > 0; i--) {
if ((xs.sp - xs.fp - i) == 0)
- DebugPrintf("-- temp variables --\n");
+ debugPrintf("-- temp variables --\n");
if (xs.sp - i >= _engine->_gamestate->stack_base)
- DebugPrintf("ST:%04x = %04x:%04x\n", (unsigned)(xs.sp - i - _engine->_gamestate->stack_base), PRINT_REG(xs.sp[-i]));
+ debugPrintf("ST:%04x = %04x:%04x\n", (unsigned)(xs.sp - i - _engine->_gamestate->stack_base), PRINT_REG(xs.sp[-i]));
}
return true;
@@ -2478,19 +2478,19 @@ bool Console::cmdStack(int argc, const char **argv) {
bool Console::cmdValueType(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Determines the type of a value.\n");
- DebugPrintf("The type can be one of the following:\n");
- DebugPrintf("Invalid, list, object, reference or arithmetic\n");
- DebugPrintf("Usage: %s <address>\n", argv[0]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Determines the type of a value.\n");
+ debugPrintf("The type can be one of the following:\n");
+ debugPrintf("Invalid, list, object, reference or arithmetic\n");
+ debugPrintf("Usage: %s <address>\n", argv[0]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t val;
if (parse_reg_t(_engine->_gamestate, argv[1], &val, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2498,22 +2498,22 @@ bool Console::cmdValueType(int argc, const char **argv) {
switch (t) {
case SIG_TYPE_LIST:
- DebugPrintf("List");
+ debugPrintf("List");
break;
case SIG_TYPE_OBJECT:
- DebugPrintf("Object");
+ debugPrintf("Object");
break;
case SIG_TYPE_REFERENCE:
- DebugPrintf("Reference");
+ debugPrintf("Reference");
break;
case SIG_TYPE_INTEGER:
- DebugPrintf("Integer");
+ debugPrintf("Integer");
break;
case SIG_TYPE_INTEGER | SIG_TYPE_NULL:
- DebugPrintf("Null");
+ debugPrintf("Null");
break;
default:
- DebugPrintf("Erroneous unknown type 0x%02x (%d decimal)\n", t, t);
+ debugPrintf("Erroneous unknown type 0x%02x (%d decimal)\n", t, t);
}
return true;
@@ -2521,17 +2521,17 @@ bool Console::cmdValueType(int argc, const char **argv) {
bool Console::cmdViewListNode(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Examines the list node at the given address.\n");
- DebugPrintf("Usage: %s <address>\n", argv[0]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Examines the list node at the given address.\n");
+ debugPrintf("Usage: %s <address>\n", argv[0]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t addr;
if (parse_reg_t(_engine->_gamestate, argv[1], &addr, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2541,11 +2541,11 @@ bool Console::cmdViewListNode(int argc, const char **argv) {
bool Console::cmdViewReference(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Examines an arbitrary reference.\n");
- DebugPrintf("Usage: %s <start address> [<end address>]\n", argv[0]);
- DebugPrintf("Where <start address> is the starting address to examine\n");
- DebugPrintf("<end address>, if provided, is the address where examining ends at\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Examines an arbitrary reference.\n");
+ debugPrintf("Usage: %s <start address> [<end address>]\n", argv[0]);
+ debugPrintf("Where <start address> is the starting address to examine\n");
+ debugPrintf("<end address>, if provided, is the address where examining ends at\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2553,15 +2553,15 @@ bool Console::cmdViewReference(int argc, const char **argv) {
reg_t reg_end = NULL_REG;
if (parse_reg_t(_engine->_gamestate, argv[1], ®, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
if (argc > 2) {
if (parse_reg_t(_engine->_gamestate, argv[2], ®_end, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
}
@@ -2570,15 +2570,15 @@ bool Console::cmdViewReference(int argc, const char **argv) {
int filter;
int found = 0;
- DebugPrintf("%04x:%04x is of type 0x%x: ", PRINT_REG(reg), type_mask);
+ debugPrintf("%04x:%04x is of type 0x%x: ", PRINT_REG(reg), type_mask);
if (reg.getSegment() == 0 && reg.getOffset() == 0) {
- DebugPrintf("Null.\n");
+ debugPrintf("Null.\n");
return true;
}
if (reg_end.getSegment() != reg.getSegment() && reg_end != NULL_REG) {
- DebugPrintf("Ending segment different from starting segment. Assuming no bound on dump.\n");
+ debugPrintf("Ending segment different from starting segment. Assuming no bound on dump.\n");
reg_end = NULL_REG;
}
@@ -2586,7 +2586,7 @@ bool Console::cmdViewReference(int argc, const char **argv) {
int type = type_mask & filter;
if (found && type) {
- DebugPrintf("--- Alternatively, it could be a ");
+ debugPrintf("--- Alternatively, it could be a ");
}
@@ -2596,33 +2596,33 @@ bool Console::cmdViewReference(int argc, const char **argv) {
case SIG_TYPE_LIST: {
List *list = _engine->_gamestate->_segMan->lookupList(reg);
- DebugPrintf("list\n");
+ debugPrintf("list\n");
if (list)
printList(list);
else
- DebugPrintf("Invalid list.\n");
+ debugPrintf("Invalid list.\n");
}
break;
case SIG_TYPE_NODE:
- DebugPrintf("list node\n");
+ debugPrintf("list node\n");
printNode(reg);
break;
case SIG_TYPE_OBJECT:
- DebugPrintf("object\n");
+ debugPrintf("object\n");
printObject(reg);
break;
case SIG_TYPE_REFERENCE: {
switch (_engine->_gamestate->_segMan->getSegmentType(reg.getSegment())) {
#ifdef ENABLE_SCI32
case SEG_TYPE_STRING: {
- DebugPrintf("SCI32 string\n");
+ debugPrintf("SCI32 string\n");
const SciString *str = _engine->_gamestate->_segMan->lookupString(reg);
Common::hexdump((const byte *) str->getRawData(), str->getSize(), 16, 0);
break;
}
case SEG_TYPE_ARRAY: {
- DebugPrintf("SCI32 array:\n");
+ debugPrintf("SCI32 array:\n");
const SciArray<reg_t> *array = _engine->_gamestate->_segMan->lookupArray(reg);
hexDumpReg(array->getRawData(), array->getSize(), 4, 0, true);
break;
@@ -2632,10 +2632,10 @@ bool Console::cmdViewReference(int argc, const char **argv) {
const SegmentRef block = _engine->_gamestate->_segMan->dereference(reg);
uint16 size = block.maxSize;
- DebugPrintf("raw data\n");
+ debugPrintf("raw data\n");
if (reg_end.getSegment() != 0 && (size < reg_end.getOffset() - reg.getOffset())) {
- DebugPrintf("Block end out of bounds (size %d). Resetting.\n", size);
+ debugPrintf("Block end out of bounds (size %d). Resetting.\n", size);
reg_end = NULL_REG;
}
@@ -2643,7 +2643,7 @@ bool Console::cmdViewReference(int argc, const char **argv) {
size = reg_end.getOffset() - reg.getOffset();
if (reg_end.getSegment() != 0)
- DebugPrintf("Block size less than or equal to %d\n", size);
+ debugPrintf("Block size less than or equal to %d\n", size);
if (block.isRaw)
Common::hexdump(block.raw, size, 16, 0);
@@ -2654,14 +2654,14 @@ bool Console::cmdViewReference(int argc, const char **argv) {
break;
}
case SIG_TYPE_INTEGER:
- DebugPrintf("arithmetic value\n %d (%04x)\n", (int16) reg.getOffset(), reg.getOffset());
+ debugPrintf("arithmetic value\n %d (%04x)\n", (int16) reg.getOffset(), reg.getOffset());
break;
default:
- DebugPrintf("unknown type %d.\n", type);
+ debugPrintf("unknown type %d.\n", type);
}
if (type) {
- DebugPrintf("\n");
+ debugPrintf("\n");
found = 1;
}
}
@@ -2671,47 +2671,47 @@ bool Console::cmdViewReference(int argc, const char **argv) {
bool Console::cmdViewObject(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Examines the object at the given address.\n");
- DebugPrintf("Usage: %s <address>\n", argv[0]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Examines the object at the given address.\n");
+ debugPrintf("Usage: %s <address>\n", argv[0]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
reg_t addr;
if (parse_reg_t(_engine->_gamestate, argv[1], &addr, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
- DebugPrintf("Information on the object at the given address:\n");
+ debugPrintf("Information on the object at the given address:\n");
printObject(addr);
return true;
}
bool Console::cmdViewActiveObject(int argc, const char **argv) {
- DebugPrintf("Information on the currently active object or class:\n");
+ debugPrintf("Information on the currently active object or class:\n");
printObject(_engine->_gamestate->xs->objp);
return true;
}
bool Console::cmdViewAccumulatorObject(int argc, const char **argv) {
- DebugPrintf("Information on the currently active object or class at the address indexed by the accumulator:\n");
+ debugPrintf("Information on the currently active object or class at the address indexed by the accumulator:\n");
printObject(_engine->_gamestate->r_acc);
return true;
}
bool Console::cmdScriptSteps(int argc, const char **argv) {
- DebugPrintf("Number of executed SCI operations: %d\n", _engine->_gamestate->scriptStepCounter);
+ debugPrintf("Number of executed SCI operations: %d\n", _engine->_gamestate->scriptStepCounter);
return true;
}
bool Console::cmdBacktrace(int argc, const char **argv) {
- DebugPrintf("Call stack (current base: 0x%x):\n", _engine->_gamestate->executionStackBase);
+ debugPrintf("Call stack (current base: 0x%x):\n", _engine->_gamestate->executionStackBase);
Common::List<ExecStack>::const_iterator iter;
uint i = 0;
@@ -2724,22 +2724,22 @@ bool Console::cmdBacktrace(int argc, const char **argv) {
switch (call.type) {
case EXEC_STACK_TYPE_CALL: // Normal function
if (call.type == EXEC_STACK_TYPE_CALL)
- DebugPrintf(" %x: script %d - ", i, (*(Script *)_engine->_gamestate->_segMan->_heap[call.addr.pc.getSegment()]).getScriptNumber());
+ debugPrintf(" %x: script %d - ", i, (*(Script *)_engine->_gamestate->_segMan->_heap[call.addr.pc.getSegment()]).getScriptNumber());
if (call.debugSelector != -1) {
- DebugPrintf("%s::%s(", objname, _engine->getKernel()->getSelectorName(call.debugSelector).c_str());
+ debugPrintf("%s::%s(", objname, _engine->getKernel()->getSelectorName(call.debugSelector).c_str());
} else if (call.debugExportId != -1) {
- DebugPrintf("export %d (", call.debugExportId);
+ debugPrintf("export %d (", call.debugExportId);
} else if (call.debugLocalCallOffset != -1) {
- DebugPrintf("call %x (", call.debugLocalCallOffset);
+ debugPrintf("call %x (", call.debugLocalCallOffset);
}
break;
case EXEC_STACK_TYPE_KERNEL: // Kernel function
- DebugPrintf(" %x:[%x] k%s(", i, call.debugOrigin, _engine->getKernel()->getKernelName(call.debugSelector).c_str());
+ debugPrintf(" %x:[%x] k%s(", i, call.debugOrigin, _engine->getKernel()->getKernelName(call.debugSelector).c_str());
break;
case EXEC_STACK_TYPE_VARSELECTOR:
- DebugPrintf(" %x:[%x] vs%s %s::%s (", i, call.debugOrigin, (call.argc) ? "write" : "read",
+ debugPrintf(" %x:[%x] vs%s %s::%s (", i, call.debugOrigin, (call.argc) ? "write" : "read",
objname, _engine->getKernel()->getSelectorName(call.debugSelector).c_str());
break;
}
@@ -2750,32 +2750,32 @@ bool Console::cmdBacktrace(int argc, const char **argv) {
totalparamc = 16;
for (paramc = 1; paramc <= totalparamc; paramc++) {
- DebugPrintf("%04x:%04x", PRINT_REG(call.variables_argp[paramc]));
+ debugPrintf("%04x:%04x", PRINT_REG(call.variables_argp[paramc]));
if (paramc < call.argc)
- DebugPrintf(", ");
+ debugPrintf(", ");
}
if (call.argc > 16)
- DebugPrintf("...");
+ debugPrintf("...");
- DebugPrintf(")\n ");
+ debugPrintf(")\n ");
if (call.debugOrigin != -1)
- DebugPrintf("by %x ", call.debugOrigin);
- DebugPrintf("obj@%04x:%04x", PRINT_REG(call.objp));
+ debugPrintf("by %x ", call.debugOrigin);
+ debugPrintf("obj@%04x:%04x", PRINT_REG(call.objp));
if (call.type == EXEC_STACK_TYPE_CALL) {
- DebugPrintf(" pc=%04x:%04x", PRINT_REG(call.addr.pc));
+ debugPrintf(" pc=%04x:%04x", PRINT_REG(call.addr.pc));
if (call.sp == CALL_SP_CARRY)
- DebugPrintf(" sp,fp:carry");
+ debugPrintf(" sp,fp:carry");
else {
- DebugPrintf(" sp=ST:%04x", (unsigned)(call.sp - _engine->_gamestate->stack_base));
- DebugPrintf(" fp=ST:%04x", (unsigned)(call.fp - _engine->_gamestate->stack_base));
+ debugPrintf(" sp=ST:%04x", (unsigned)(call.sp - _engine->_gamestate->stack_base));
+ debugPrintf(" fp=ST:%04x", (unsigned)(call.fp - _engine->_gamestate->stack_base));
}
} else
- DebugPrintf(" pc:none");
+ debugPrintf(" pc:none");
- DebugPrintf(" argp:ST:%04x", (unsigned)(call.variables_argp - _engine->_gamestate->stack_base));
- DebugPrintf("\n");
+ debugPrintf(" argp:ST:%04x", (unsigned)(call.variables_argp - _engine->_gamestate->stack_base));
+ debugPrintf("\n");
}
return true;
@@ -2814,8 +2814,8 @@ bool Console::cmdStepRet(int argc, const char **argv) {
bool Console::cmdStepGlobal(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Steps until the global variable with the specified index is modified.\n");
- DebugPrintf("Usage: %s <global variable index>\n", argv[0]);
+ debugPrintf("Steps until the global variable with the specified index is modified.\n");
+ debugPrintf("Usage: %s <global variable index>\n", argv[0]);
return true;
}
@@ -2844,7 +2844,7 @@ bool Console::cmdStepCallk(int argc, const char **argv) {
}
if (callk_index == -1) {
- DebugPrintf("Unknown kernel function '%s'\n", argv[1]);
+ debugPrintf("Unknown kernel function '%s'\n", argv[1]);
return true;
}
}
@@ -2861,11 +2861,11 @@ bool Console::cmdStepCallk(int argc, const char **argv) {
bool Console::cmdDisassemble(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Disassembles a method by name.\n");
- DebugPrintf("Usage: %s <object> <method> <options>\n", argv[0]);
- DebugPrintf("Valid options are:\n");
- DebugPrintf(" bwt : Print byte/word tag\n");
- DebugPrintf(" bc : Print bytecode\n");
+ debugPrintf("Disassembles a method by name.\n");
+ debugPrintf("Usage: %s <object> <method> <options>\n", argv[0]);
+ debugPrintf("Valid options are:\n");
+ debugPrintf(" bwt : Print byte/word tag\n");
+ debugPrintf(" bc : Print bytecode\n");
return true;
}
@@ -2874,8 +2874,8 @@ bool Console::cmdDisassemble(int argc, const char **argv) {
bool printBWTag = false;
if (parse_reg_t(_engine->_gamestate, argv[1], &objAddr, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2884,17 +2884,17 @@ bool Console::cmdDisassemble(int argc, const char **argv) {
reg_t addr = NULL_REG;
if (!obj) {
- DebugPrintf("Not an object.\n");
+ debugPrintf("Not an object.\n");
return true;
}
if (selectorId < 0) {
- DebugPrintf("Not a valid selector name.\n");
+ debugPrintf("Not a valid selector name.\n");
return true;
}
if (lookupSelector(_engine->_gamestate->_segMan, objAddr, selectorId, NULL, &addr) != kSelectorMethod) {
- DebugPrintf("Not a method.\n");
+ debugPrintf("Not a method.\n");
return true;
}
@@ -2924,12 +2924,12 @@ bool Console::cmdDisassemble(int argc, const char **argv) {
bool Console::cmdDisassembleAddress(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Disassembles one or more commands.\n");
- DebugPrintf("Usage: %s [startaddr] <options>\n", argv[0]);
- DebugPrintf("Valid options are:\n");
- DebugPrintf(" bwt : Print byte/word tag\n");
- DebugPrintf(" c<x> : Disassemble <x> bytes\n");
- DebugPrintf(" bc : Print bytecode\n");
+ debugPrintf("Disassembles one or more commands.\n");
+ debugPrintf("Usage: %s [startaddr] <options>\n", argv[0]);
+ debugPrintf("Valid options are:\n");
+ debugPrintf(" bwt : Print byte/word tag\n");
+ debugPrintf(" c<x> : Disassemble <x> bytes\n");
+ debugPrintf(" bc : Print bytecode\n");
return true;
}
@@ -2940,8 +2940,8 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) {
uint16 size;
if (parse_reg_t(_engine->_gamestate, argv[1], &vpc, false)) {
- DebugPrintf("Invalid address passed.\n");
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address passed.\n");
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -2956,7 +2956,7 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) {
else if (toupper(argv[i][0]) == 'C')
opCount = atoi(argv[i] + 1);
else {
- DebugPrintf("Invalid option '%s'\n", argv[i]);
+ debugPrintf("Invalid option '%s'\n", argv[i]);
return true;
}
}
@@ -2974,7 +2974,7 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) {
Common::sort(resources.begin(), resources.end());
if (showFoundScripts)
- DebugPrintf("%d scripts found, dissassembling...\n", resources.size());
+ debugPrintf("%d scripts found, dissassembling...\n", resources.size());
int scriptSegment;
Script *script;
@@ -3023,7 +3023,7 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) {
uint16 argc2 = opparams[1];
if (kFuncNum == kernelFuncNum) {
- DebugPrintf("Called from script %d, object %s, method %s(%d) with %d bytes for arguments\n",
+ debugPrintf("Called from script %d, object %s, method %s(%d) with %d bytes for arguments\n",
itr->getNumber(), objName,
_engine->getKernel()->getSelectorName(obj->getFuncSelector(i)).c_str(), i, argc2);
}
@@ -3055,19 +3055,19 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) {
bool Console::cmdFindKernelFunctionCall(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Finds the scripts and methods that call a specific kernel function.\n");
- DebugPrintf("Usage: %s <kernel function>\n", argv[0]);
- DebugPrintf("Example: %s Display\n", argv[0]);
- DebugPrintf("Special usage:\n");
- DebugPrintf("%s Dummy - find all calls to actual dummy functions "
+ debugPrintf("Finds the scripts and methods that call a specific kernel function.\n");
+ debugPrintf("Usage: %s <kernel function>\n", argv[0]);
+ debugPrintf("Example: %s Display\n", argv[0]);
+ debugPrintf("Special usage:\n");
+ debugPrintf("%s Dummy - find all calls to actual dummy functions "
"(mapped to kDummy, and dummy in the kernel table). "
"There shouldn't be calls to these (apart from a known "
"one in Shivers)\n", argv[0]);
- DebugPrintf("%s Unused - find all calls to unused functions (mapped to "
+ debugPrintf("%s Unused - find all calls to unused functions (mapped to "
"kDummy - i.e. mapped in SSCI but dummy in ScummVM, thus "
"they'll error out when called). Only debug scripts should "
"be calling these\n", argv[0]);
- DebugPrintf("%s Unmapped - find all calls to currently unmapped or "
+ debugPrintf("%s Unmapped - find all calls to currently unmapped or "
"unimplemented functions (mapped to kStub/kStubNull)\n", argv[0]);
return true;
}
@@ -3080,7 +3080,7 @@ bool Console::cmdFindKernelFunctionCall(int argc, const char **argv) {
int kernelFuncNum = kernel->findKernelFuncPos(argv[1]);
if (kernelFuncNum < 0) {
- DebugPrintf("Invalid kernel function requested\n");
+ debugPrintf("Invalid kernel function requested\n");
return true;
}
@@ -3090,7 +3090,7 @@ bool Console::cmdFindKernelFunctionCall(int argc, const char **argv) {
// in the kernel table)
for (uint i = 0; i < kernel->_kernelFuncs.size(); i++) {
if (kernel->_kernelFuncs[i].function == &kDummy && kernel->getKernelName(i) == "Dummy") {
- DebugPrintf("Searching for kernel function %d (%s)...\n", i, kernel->getKernelName(i).c_str());
+ debugPrintf("Searching for kernel function %d (%s)...\n", i, kernel->getKernelName(i).c_str());
printKernelCallsFound(i, false);
}
}
@@ -3100,7 +3100,7 @@ bool Console::cmdFindKernelFunctionCall(int argc, const char **argv) {
// called)
for (uint i = 0; i < kernel->_kernelFuncs.size(); i++) {
if (kernel->_kernelFuncs[i].function == &kDummy && kernel->getKernelName(i) != "Dummy") {
- DebugPrintf("Searching for kernel function %d (%s)...\n", i, kernel->getKernelName(i).c_str());
+ debugPrintf("Searching for kernel function %d (%s)...\n", i, kernel->getKernelName(i).c_str());
printKernelCallsFound(i, false);
}
}
@@ -3109,7 +3109,7 @@ bool Console::cmdFindKernelFunctionCall(int argc, const char **argv) {
for (uint i = 0; i < kernel->_kernelFuncs.size(); i++) {
if (kernel->_kernelFuncs[i].function == &kStub ||
kernel->_kernelFuncs[i].function == &kStubNull) {
- DebugPrintf("Searching for kernel function %d (%s)...\n", i, kernel->getKernelName(i).c_str());
+ debugPrintf("Searching for kernel function %d (%s)...\n", i, kernel->getKernelName(i).c_str());
printKernelCallsFound(i, false);
}
}
@@ -3120,17 +3120,17 @@ bool Console::cmdFindKernelFunctionCall(int argc, const char **argv) {
bool Console::cmdSend(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Sends a message to an object.\n");
- DebugPrintf("Usage: %s <object> <selector name> <param1> <param2> ... <paramn>\n", argv[0]);
- DebugPrintf("Example: %s ?fooScript cue\n", argv[0]);
+ debugPrintf("Sends a message to an object.\n");
+ debugPrintf("Usage: %s <object> <selector name> <param1> <param2> ... <paramn>\n", argv[0]);
+ debugPrintf("Example: %s ?fooScript cue\n", argv[0]);
return true;
}
reg_t object;
if (parse_reg_t(_engine->_gamestate, argv[1], &object, false)) {
- DebugPrintf("Invalid address \"%s\" passed.\n", argv[1]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address \"%s\" passed.\n", argv[1]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
@@ -3138,20 +3138,20 @@ bool Console::cmdSend(int argc, const char **argv) {
int selectorId = _engine->getKernel()->findSelector(selectorName);
if (selectorId < 0) {
- DebugPrintf("Unknown selector: \"%s\"\n", selectorName);
+ debugPrintf("Unknown selector: \"%s\"\n", selectorName);
return true;
}
const Object *o = _engine->_gamestate->_segMan->getObject(object);
if (o == NULL) {
- DebugPrintf("Address \"%04x:%04x\" is not an object\n", PRINT_REG(object));
+ debugPrintf("Address \"%04x:%04x\" is not an object\n", PRINT_REG(object));
return true;
}
SelectorType selector_type = lookupSelector(_engine->_gamestate->_segMan, object, selectorId, NULL, NULL);
if (selector_type == kSelectorNone) {
- DebugPrintf("Object does not support selector: \"%s\"\n", selectorName);
+ debugPrintf("Object does not support selector: \"%s\"\n", selectorName);
return true;
}
@@ -3165,8 +3165,8 @@ bool Console::cmdSend(int argc, const char **argv) {
stackframe[1] = make_reg(0, send_argc);
for (int i = 0; i < send_argc; i++) {
if (parse_reg_t(_engine->_gamestate, argv[3+i], &stackframe[2+i], false)) {
- DebugPrintf("Invalid address \"%s\" passed.\n", argv[3+i]);
- DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ debugPrintf("Invalid address \"%s\" passed.\n", argv[3+i]);
+ debugPrintf("Check the \"addresses\" command on how to use addresses\n");
return true;
}
}
@@ -3184,7 +3184,7 @@ bool Console::cmdSend(int argc, const char **argv) {
if (old_xstack != xstack) {
_engine->_gamestate->_executionStackPosChanged = true;
- DebugPrintf("Message scheduled for execution\n");
+ debugPrintf("Message scheduled for execution\n");
// We call run_engine explictly so we can restore the value of r_acc
// after execution.
@@ -3194,7 +3194,7 @@ bool Console::cmdSend(int argc, const char **argv) {
if (restore_acc) {
// varselector read or message executed
- DebugPrintf("Message completed. Value returned: %04x:%04x\n", PRINT_REG(_engine->_gamestate->r_acc));
+ debugPrintf("Message completed. Value returned: %04x:%04x\n", PRINT_REG(_engine->_gamestate->r_acc));
_engine->_gamestate->r_acc = old_acc;
}
@@ -3210,9 +3210,9 @@ bool Console::cmdGo(int argc, const char **argv) {
bool Console::cmdLogKernel(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Logs calls to specified kernel function.\n");
- DebugPrintf("Usage: %s <kernel function/*> <on/off>\n", argv[0]);
- DebugPrintf("Example: %s StrCpy on\n", argv[0]);
+ debugPrintf("Logs calls to specified kernel function.\n");
+ debugPrintf("Usage: %s <kernel function/*> <on/off>\n", argv[0]);
+ debugPrintf("Example: %s StrCpy on\n", argv[0]);
return true;
}
@@ -3222,14 +3222,14 @@ bool Console::cmdLogKernel(int argc, const char **argv) {
else if (strcmp(argv[2], "off") == 0)
logging = false;
else {
- DebugPrintf("2nd parameter must be either on or off\n");
+ debugPrintf("2nd parameter must be either on or off\n");
return true;
}
if (g_sci->getKernel()->debugSetFunction(argv[1], logging, -1))
- DebugPrintf("Logging %s for k%s\n", logging ? "enabled" : "disabled", argv[1]);
+ debugPrintf("Logging %s for k%s\n", logging ? "enabled" : "disabled", argv[1]);
else
- DebugPrintf("Unknown kernel function %s\n", argv[1]);
+ debugPrintf("Unknown kernel function %s\n", argv[1]);
return true;
}
@@ -3237,25 +3237,25 @@ bool Console::cmdBreakpointList(int argc, const char **argv) {
int i = 0;
int bpdata;
- DebugPrintf("Breakpoint list:\n");
+ debugPrintf("Breakpoint list:\n");
Common::List<Breakpoint>::const_iterator bp = _debugState._breakpoints.begin();
Common::List<Breakpoint>::const_iterator end = _debugState._breakpoints.end();
for (; bp != end; ++bp) {
- DebugPrintf(" #%i: ", i);
+ debugPrintf(" #%i: ", i);
switch (bp->type) {
case BREAK_SELECTOREXEC:
- DebugPrintf("Execute %s\n", bp->name.c_str());
+ debugPrintf("Execute %s\n", bp->name.c_str());
break;
case BREAK_SELECTORREAD:
- DebugPrintf("Read %s\n", bp->name.c_str());
+ debugPrintf("Read %s\n", bp->name.c_str());
break;
case BREAK_SELECTORWRITE:
- DebugPrintf("Write %s\n", bp->name.c_str());
+ debugPrintf("Write %s\n", bp->name.c_str());
break;
case BREAK_EXPORT:
bpdata = bp->address;
- DebugPrintf("Execute script %d, export %d\n", bpdata >> 16, bpdata & 0xFFFF);
+ debugPrintf("Execute script %d, export %d\n", bpdata >> 16, bpdata & 0xFFFF);
break;
}
@@ -3263,16 +3263,16 @@ bool Console::cmdBreakpointList(int argc, const char **argv) {
}
if (!i)
- DebugPrintf(" No breakpoints defined.\n");
+ debugPrintf(" No breakpoints defined.\n");
return true;
}
bool Console::cmdBreakpointDelete(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Deletes a breakpoint with the specified index.\n");
- DebugPrintf("Usage: %s <breakpoint index>\n", argv[0]);
- DebugPrintf("<index> * will remove all breakpoints\n");
+ debugPrintf("Deletes a breakpoint with the specified index.\n");
+ debugPrintf("Usage: %s <breakpoint index>\n", argv[0]);
+ debugPrintf("<index> * will remove all breakpoints\n");
return true;
}
@@ -3292,7 +3292,7 @@ bool Console::cmdBreakpointDelete(int argc, const char **argv) {
}
if (bp == end) {
- DebugPrintf("Invalid breakpoint index %i\n", idx);
+ debugPrintf("Invalid breakpoint index %i\n", idx);
return true;
}
@@ -3312,11 +3312,11 @@ bool Console::cmdBreakpointDelete(int argc, const char **argv) {
bool Console::cmdBreakpointMethod(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Sets a breakpoint on execution of a specified method/selector.\n");
- DebugPrintf("Usage: %s <name>\n", argv[0]);
- DebugPrintf("Example: %s ego::doit\n", argv[0]);
- DebugPrintf("May also be used to set a breakpoint that applies whenever an object\n");
- DebugPrintf("of a specific type is touched: %s foo::\n", argv[0]);
+ debugPrintf("Sets a breakpoint on execution of a specified method/selector.\n");
+ debugPrintf("Usage: %s <name>\n", argv[0]);
+ debugPrintf("Example: %s ego::doit\n", argv[0]);
+ debugPrintf("May also be used to set a breakpoint that applies whenever an object\n");
+ debugPrintf("of a specific type is touched: %s foo::\n", argv[0]);
return true;
}
@@ -3334,9 +3334,9 @@ bool Console::cmdBreakpointMethod(int argc, const char **argv) {
bool Console::cmdBreakpointRead(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Sets a breakpoint on reading of a specified selector.\n");
- DebugPrintf("Usage: %s <name>\n", argv[0]);
- DebugPrintf("Example: %s ego::view\n", argv[0]);
+ debugPrintf("Sets a breakpoint on reading of a specified selector.\n");
+ debugPrintf("Usage: %s <name>\n", argv[0]);
+ debugPrintf("Example: %s ego::view\n", argv[0]);
return true;
}
@@ -3351,9 +3351,9 @@ bool Console::cmdBreakpointRead(int argc, const char **argv) {
bool Console::cmdBreakpointWrite(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Sets a breakpoint on writing of a specified selector.\n");
- DebugPrintf("Usage: %s <name>\n", argv[0]);
- DebugPrintf("Example: %s ego::view\n", argv[0]);
+ debugPrintf("Sets a breakpoint on writing of a specified selector.\n");
+ debugPrintf("Usage: %s <name>\n", argv[0]);
+ debugPrintf("Example: %s ego::view\n", argv[0]);
return true;
}
@@ -3368,9 +3368,9 @@ bool Console::cmdBreakpointWrite(int argc, const char **argv) {
bool Console::cmdBreakpointKernel(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("Sets a breakpoint on execution of a kernel function.\n");
- DebugPrintf("Usage: %s <name> <on/off>\n", argv[0]);
- DebugPrintf("Example: %s DrawPic on\n", argv[0]);
+ debugPrintf("Sets a breakpoint on execution of a kernel function.\n");
+ debugPrintf("Usage: %s <name> <on/off>\n", argv[0]);
+ debugPrintf("Example: %s DrawPic on\n", argv[0]);
return true;
}
@@ -3380,22 +3380,22 @@ bool Console::cmdBreakpointKernel(int argc, const char **argv) {
else if (strcmp(argv[2], "off") == 0)
breakpoint = false;
else {
- DebugPrintf("2nd parameter must be either on or off\n");
+ debugPrintf("2nd parameter must be either on or off\n");
return true;
}
if (g_sci->getKernel()->debugSetFunction(argv[1], -1, breakpoint))
- DebugPrintf("Breakpoint %s for k%s\n", (breakpoint ? "enabled" : "disabled"), argv[1]);
+ debugPrintf("Breakpoint %s for k%s\n", (breakpoint ? "enabled" : "disabled"), argv[1]);
else
- DebugPrintf("Unknown kernel function %s\n", argv[1]);
+ debugPrintf("Unknown kernel function %s\n", argv[1]);
return true;
}
bool Console::cmdBreakpointFunction(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Sets a breakpoint on the execution of the specified exported function.\n");
- DebugPrintf("Usage: %s <script number> <export number\n", argv[0]);
+ debugPrintf("Sets a breakpoint on the execution of the specified exported function.\n");
+ debugPrintf("Usage: %s <script number> <export number\n", argv[0]);
return true;
}
@@ -3415,21 +3415,21 @@ bool Console::cmdBreakpointFunction(int argc, const char **argv) {
bool Console::cmdSfx01Header(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Dumps the header of a SCI01 song\n");
- DebugPrintf("Usage: %s <track>\n", argv[0]);
+ debugPrintf("Dumps the header of a SCI01 song\n");
+ debugPrintf("Usage: %s <track>\n", argv[0]);
return true;
}
Resource *song = _engine->getResMan()->findResource(ResourceId(kResourceTypeSound, atoi(argv[1])), 0);
if (!song) {
- DebugPrintf("Doesn't exist\n");
+ debugPrintf("Doesn't exist\n");
return true;
}
uint32 offset = 0;
- DebugPrintf("SCI01 song track mappings:\n");
+ debugPrintf("SCI01 song track mappings:\n");
if (*song->data == 0xf0) // SCI1 priority spec
offset = 8;
@@ -3439,7 +3439,7 @@ bool Console::cmdSfx01Header(int argc, const char **argv) {
while (song->data[offset] != 0xff) {
byte device_id = song->data[offset];
- DebugPrintf("* Device %02x:\n", device_id);
+ debugPrintf("* Device %02x:\n", device_id);
offset++;
if (offset + 1 >= song->size)
@@ -3461,12 +3461,12 @@ bool Console::cmdSfx01Header(int argc, const char **argv) {
track_offset += 2;
end = READ_LE_UINT16(song->data + offset + 2);
- DebugPrintf(" - %04x -- %04x", track_offset, track_offset + end);
+ debugPrintf(" - %04x -- %04x", track_offset, track_offset + end);
if (track_offset == 0xfe)
- DebugPrintf(" (PCM data)\n");
+ debugPrintf(" (PCM data)\n");
else
- DebugPrintf(" (channel %d, special %d, %d playing notes, %d foo)\n",
+ debugPrintf(" (channel %d, special %d, %d playing notes, %d foo)\n",
header1 & 0xf, header1 >> 4, header2 & 0xf, header2 >> 4);
offset += 4;
}
@@ -3580,8 +3580,8 @@ static void midi_hexdump(byte *data, int size, int notational_offset) {
bool Console::cmdSfx01Track(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Dumps a track of a SCI01 song\n");
- DebugPrintf("Usage: %s <track> <offset>\n", argv[0]);
+ debugPrintf("Dumps a track of a SCI01 song\n");
+ debugPrintf("Usage: %s <track> <offset>\n", argv[0]);
return true;
}
@@ -3590,7 +3590,7 @@ bool Console::cmdSfx01Track(int argc, const char **argv) {
int offset = atoi(argv[2]);
if (!song) {
- DebugPrintf("Doesn't exist\n");
+ debugPrintf("Doesn't exist\n");
return true;
}
@@ -3614,8 +3614,8 @@ bool Console::cmdQuit(int argc, const char **argv) {
_debugState.runningStep = 0;
} else {
- DebugPrintf("%s [game] - exit gracefully\n", argv[0]);
- DebugPrintf("%s now - exit ungracefully\n", argv[0]);
+ debugPrintf("%s [game] - exit gracefully\n", argv[0]);
+ debugPrintf("%s now - exit ungracefully\n", argv[0]);
return true;
}
@@ -3623,20 +3623,20 @@ bool Console::cmdQuit(int argc, const char **argv) {
}
bool Console::cmdAddresses(int argc, const char **argv) {
- DebugPrintf("Address parameters may be passed in one of three forms:\n");
- DebugPrintf(" - ssss:oooo -- where 'ssss' denotes a segment and 'oooo' an offset.\n");
- DebugPrintf(" Example: \"a:c5\" would address something in segment 0xa at offset 0xc5.\n");
- DebugPrintf(" - &scr:oooo -- where 'scr' is a script number and oooo an offset within that script; will\n");
- DebugPrintf(" fail if the script is not currently loaded\n");
- DebugPrintf(" - $REG -- where 'REG' is one of 'PC', 'ACC', 'PREV' or 'OBJ': References the address\n");
- DebugPrintf(" indicated by the register of this name.\n");
- DebugPrintf(" - $REG+n (or -n) -- Like $REG, but modifies the offset part by a specific amount (which\n");
- DebugPrintf(" is specified in hexadecimal).\n");
- DebugPrintf(" - ?obj -- Looks up an object with the specified name, uses its address. This will abort if\n");
- DebugPrintf(" the object name is ambiguous; in that case, a list of addresses and indices is provided.\n");
- DebugPrintf(" ?obj.idx may be used to disambiguate 'obj' by the index 'idx'.\n");
- DebugPrintf(" Underscores are used as substitute characters for spaces in object names.\n");
- DebugPrintf(" For example, an object named \"Glass Jar\" can be accessed as \"Glass_Jar\".\n");
+ debugPrintf("Address parameters may be passed in one of three forms:\n");
+ debugPrintf(" - ssss:oooo -- where 'ssss' denotes a segment and 'oooo' an offset.\n");
+ debugPrintf(" Example: \"a:c5\" would address something in segment 0xa at offset 0xc5.\n");
+ debugPrintf(" - &scr:oooo -- where 'scr' is a script number and oooo an offset within that script; will\n");
+ debugPrintf(" fail if the script is not currently loaded\n");
+ debugPrintf(" - $REG -- where 'REG' is one of 'PC', 'ACC', 'PREV' or 'OBJ': References the address\n");
+ debugPrintf(" indicated by the register of this name.\n");
+ debugPrintf(" - $REG+n (or -n) -- Like $REG, but modifies the offset part by a specific amount (which\n");
+ debugPrintf(" is specified in hexadecimal).\n");
+ debugPrintf(" - ?obj -- Looks up an object with the specified name, uses its address. This will abort if\n");
+ debugPrintf(" the object name is ambiguous; in that case, a list of addresses and indices is provided.\n");
+ debugPrintf(" ?obj.idx may be used to disambiguate 'obj' by the index 'idx'.\n");
+ debugPrintf(" Underscores are used as substitute characters for spaces in object names.\n");
+ debugPrintf(" For example, an object named \"Glass Jar\" can be accessed as \"Glass_Jar\".\n");
return true;
}
@@ -3887,14 +3887,14 @@ bool Console::parseInteger(const char *argument, int &result) {
// hexadecimal number
result = strtol(argument, &endPtr, 16);
if ((*endPtr != 0) && (*endPtr != 'h')) {
- DebugPrintf("Invalid hexadecimal number '%s'\n", argument);
+ debugPrintf("Invalid hexadecimal number '%s'\n", argument);
return false;
}
} else {
// decimal number
result = strtol(argument, &endPtr, 10);
if (*endPtr != 0) {
- DebugPrintf("Invalid decimal number '%s'\n", argument);
+ debugPrintf("Invalid decimal number '%s'\n", argument);
return false;
}
}
@@ -3912,57 +3912,57 @@ void Console::printBasicVarInfo(reg_t variable) {
case SIG_TYPE_INTEGER: {
uint16 content = variable.toUint16();
if (content >= 10)
- DebugPrintf(" (%dd)", content);
+ debugPrintf(" (%dd)", content);
break;
}
case SIG_TYPE_OBJECT:
- DebugPrintf(" (object '%s')", segMan->getObjectName(variable));
+ debugPrintf(" (object '%s')", segMan->getObjectName(variable));
break;
case SIG_TYPE_REFERENCE:
- DebugPrintf(" (reference)");
+ debugPrintf(" (reference)");
break;
case SIG_TYPE_NODE:
- DebugPrintf(" (node)");
+ debugPrintf(" (node)");
break;
case SIG_TYPE_LIST:
- DebugPrintf(" (list)");
+ debugPrintf(" (list)");
break;
case SIG_TYPE_UNINITIALIZED:
- DebugPrintf(" (uninitialized)");
+ debugPrintf(" (uninitialized)");
break;
case SIG_TYPE_ERROR:
- DebugPrintf(" (error)");
+ debugPrintf(" (error)");
break;
default:
- DebugPrintf(" (??\?)");
+ debugPrintf(" (??\?)");
}
if (regType & SIG_IS_INVALID)
- DebugPrintf(" IS INVALID!");
+ debugPrintf(" IS INVALID!");
}
void Console::printList(List *list) {
reg_t pos = list->first;
reg_t my_prev = NULL_REG;
- DebugPrintf("\t<\n");
+ debugPrintf("\t<\n");
while (!pos.isNull()) {
Node *node;
NodeTable *nt = (NodeTable *)_engine->_gamestate->_segMan->getSegment(pos.getSegment(), SEG_TYPE_NODES);
if (!nt || !nt->isValidEntry(pos.getOffset())) {
- DebugPrintf(" WARNING: %04x:%04x: Doesn't contain list node!\n",
+ debugPrintf(" WARNING: %04x:%04x: Doesn't contain list node!\n",
PRINT_REG(pos));
return;
}
node = &(nt->_table[pos.getOffset()]);
- DebugPrintf("\t%04x:%04x : %04x:%04x -> %04x:%04x\n", PRINT_REG(pos), PRINT_REG(node->key), PRINT_REG(node->value));
+ debugPrintf("\t%04x:%04x : %04x:%04x -> %04x:%04x\n", PRINT_REG(pos), PRINT_REG(node->key), PRINT_REG(node->value));
if (my_prev != node->pred)
- DebugPrintf(" WARNING: current node gives %04x:%04x as predecessor!\n",
+ debugPrintf(" WARNING: current node gives %04x:%04x as predecessor!\n",
PRINT_REG(node->pred));
my_prev = pos;
@@ -3970,9 +3970,9 @@ void Console::printList(List *list) {
}
if (my_prev != list->last)
- DebugPrintf(" WARNING: Last node was expected to be %04x:%04x, was %04x:%04x!\n",
+ debugPrintf(" WARNING: Last node was expected to be %04x:%04x, was %04x:%04x!\n",
PRINT_REG(list->last), PRINT_REG(my_prev));
- DebugPrintf("\t>\n");
+ debugPrintf("\t>\n");
}
int Console::printNode(reg_t addr) {
@@ -3983,32 +3983,32 @@ int Console::printNode(reg_t addr) {
List *list;
if (!lt->isValidEntry(addr.getOffset())) {
- DebugPrintf("Address does not contain a list\n");
+ debugPrintf("Address does not contain a list\n");
return 1;
}
list = &(lt->_table[addr.getOffset()]);
- DebugPrintf("%04x:%04x : first x last = (%04x:%04x, %04x:%04x)\n", PRINT_REG(addr), PRINT_REG(list->first), PRINT_REG(list->last));
+ debugPrintf("%04x:%04x : first x last = (%04x:%04x, %04x:%04x)\n", PRINT_REG(addr), PRINT_REG(list->first), PRINT_REG(list->last));
} else {
NodeTable *nt;
Node *node;
mobj = _engine->_gamestate->_segMan->getSegment(addr.getSegment(), SEG_TYPE_NODES);
if (!mobj) {
- DebugPrintf("Segment #%04x is not a list or node segment\n", addr.getSegment());
+ debugPrintf("Segment #%04x is not a list or node segment\n", addr.getSegment());
return 1;
}
nt = (NodeTable *)mobj;
if (!nt->isValidEntry(addr.getOffset())) {
- DebugPrintf("Address does not contain a node\n");
+ debugPrintf("Address does not contain a node\n");
return 1;
}
node = &(nt->_table[addr.getOffset()]);
- DebugPrintf("%04x:%04x : prev x next = (%04x:%04x, %04x:%04x); maps %04x:%04x -> %04x:%04x\n",
+ debugPrintf("%04x:%04x : prev x next = (%04x:%04x, %04x:%04x); maps %04x:%04x -> %04x:%04x\n",
PRINT_REG(addr), PRINT_REG(node->pred), PRINT_REG(node->succ), PRINT_REG(node->key), PRINT_REG(node->value));
}
@@ -4022,44 +4022,44 @@ int Console::printObject(reg_t pos) {
uint i;
if (!obj) {
- DebugPrintf("[%04x:%04x]: Not an object.", PRINT_REG(pos));
+ debugPrintf("[%04x:%04x]: Not an object.", PRINT_REG(pos));
return 1;
}
// Object header
- DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(pos), s->_segMan->getObjectName(pos),
+ debugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(pos), s->_segMan->getObjectName(pos),
obj->getVarCount(), obj->getMethodCount());
if (!obj->isClass() && getSciVersion() != SCI_VERSION_3)
var_container = s->_segMan->getObject(obj->getSuperClassSelector());
- DebugPrintf(" -- member variables:\n");
+ debugPrintf(" -- member variables:\n");
for (i = 0; (uint)i < obj->getVarCount(); i++) {
- DebugPrintf(" ");
+ debugPrintf(" ");
if (var_container && i < var_container->getVarCount()) {
uint16 varSelector = var_container->getVarSelector(i);
- DebugPrintf("[%03x] %s = ", varSelector, _engine->getKernel()->getSelectorName(varSelector).c_str());
+ debugPrintf("[%03x] %s = ", varSelector, _engine->getKernel()->getSelectorName(varSelector).c_str());
} else
- DebugPrintf("p#%x = ", i);
+ debugPrintf("p#%x = ", i);
reg_t val = obj->getVariable(i);
- DebugPrintf("%04x:%04x", PRINT_REG(val));
+ debugPrintf("%04x:%04x", PRINT_REG(val));
if (!val.getSegment())
- DebugPrintf(" (%d)", val.getOffset());
+ debugPrintf(" (%d)", val.getOffset());
const Object *ref = s->_segMan->getObject(val);
if (ref)
- DebugPrintf(" (%s)", s->_segMan->getObjectName(val));
+ debugPrintf(" (%s)", s->_segMan->getObjectName(val));
- DebugPrintf("\n");
+ debugPrintf("\n");
}
- DebugPrintf(" -- methods:\n");
+ debugPrintf(" -- methods:\n");
for (i = 0; i < obj->getMethodCount(); i++) {
reg_t fptr = obj->getFunction(i);
- DebugPrintf(" [%03x] %s = %04x:%04x\n", obj->getFuncSelector(i), _engine->getKernel()->getSelectorName(obj->getFuncSelector(i)).c_str(), PRINT_REG(fptr));
+ debugPrintf(" [%03x] %s = %04x:%04x\n", obj->getFuncSelector(i), _engine->getKernel()->getSelectorName(obj->getFuncSelector(i)).c_str(), PRINT_REG(fptr));
}
if (s->_segMan->_heap[pos.getSegment()]->getType() == SEG_TYPE_SCRIPT)
- DebugPrintf("\nOwner script: %d\n", s->_segMan->getScript(pos.getSegment())->getScriptNumber());
+ debugPrintf("\nOwner script: %d\n", s->_segMan->getScript(pos.getSegment())->getScriptNumber());
return 0;
}
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index 59f741a..cb81da2 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -126,7 +126,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
// track left buttton clicks, if requested
if (curEvent.type == SCI_EVENT_MOUSE_PRESS && curEvent.data == 1 && g_debug_track_mouse_clicks) {
- g_sci->getSciDebugger()->DebugPrintf("Mouse clicked at %d, %d\n",
+ g_sci->getSciDebugger()->debugPrintf("Mouse clicked at %d, %d\n",
mousePos.x, mousePos.y);
}
@@ -163,20 +163,20 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
// A SCI event occurred, and we have been asked to stop, so open the debug console
Console *con = g_sci->getSciDebugger();
- con->DebugPrintf("SCI event occurred: ");
+ con->debugPrintf("SCI event occurred: ");
switch (curEvent.type) {
case SCI_EVENT_QUIT:
- con->DebugPrintf("quit event\n");
+ con->debugPrintf("quit event\n");
break;
case SCI_EVENT_KEYBOARD:
- con->DebugPrintf("keyboard event\n");
+ con->debugPrintf("keyboard event\n");
break;
case SCI_EVENT_MOUSE_RELEASE:
case SCI_EVENT_MOUSE_PRESS:
- con->DebugPrintf("mouse click event\n");
+ con->debugPrintf("mouse click event\n");
break;
default:
- con->DebugPrintf("unknown or no event (event type %d)\n", curEvent.type);
+ con->debugPrintf("unknown or no event (event type %d)\n", curEvent.type);
}
con->attach();
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 4491005..f0157a6 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -604,7 +604,7 @@ bool SciEngine::checkSelectorBreakpoint(BreakpointType breakpointType, reg_t sen
Common::List<Breakpoint>::const_iterator bpIter;
for (bpIter = _debugState._breakpoints.begin(); bpIter != _debugState._breakpoints.end(); ++bpIter) {
if ((*bpIter).type == breakpointType && (*bpIter).name == methodName) {
- _console->DebugPrintf("Break on %s (in [%04x:%04x])\n", methodName.c_str(), PRINT_REG(send_obj));
+ _console->debugPrintf("Break on %s (in [%04x:%04x])\n", methodName.c_str(), PRINT_REG(send_obj));
_debugState.debugging = true;
_debugState.breakpointWasHit = true;
return true;
@@ -620,7 +620,7 @@ bool SciEngine::checkExportBreakpoint(uint16 script, uint16 pubfunct) {
Common::List<Breakpoint>::const_iterator bp;
for (bp = _debugState._breakpoints.begin(); bp != _debugState._breakpoints.end(); ++bp) {
if (bp->type == BREAK_EXPORT && bp->address == bpaddress) {
- _console->DebugPrintf("Break on script %d, export %d\n", script, pubfunct);
+ _console->debugPrintf("Break on script %d, export %d\n", script, pubfunct);
_debugState.debugging = true;
_debugState.breakpointWasHit = true;
return true;
@@ -666,12 +666,12 @@ void debugSelectorCall(reg_t send_obj, Selector selector, int argc, StackPtr arg
reg_t selectorValue = *varp.getPointer(segMan);
if (!argc && (activeBreakpointTypes & BREAK_SELECTORREAD)) {
if (g_sci->checkSelectorBreakpoint(BREAK_SELECTORREAD, send_obj, selector))
- con->DebugPrintf("Read from selector (%s:%s): %04x:%04x\n",
+ con->debugPrintf("Read from selector (%s:%s): %04x:%04x\n",
objectName, selectorName,
PRINT_REG(selectorValue));
} else if (argc && (activeBreakpointTypes & BREAK_SELECTORWRITE)) {
if (g_sci->checkSelectorBreakpoint(BREAK_SELECTORWRITE, send_obj, selector))
- con->DebugPrintf("Write to selector (%s:%s): change %04x:%04x to %04x:%04x\n",
+ con->debugPrintf("Write to selector (%s:%s): change %04x:%04x to %04x:%04x\n",
objectName, selectorName,
PRINT_REG(selectorValue), PRINT_REG(argp[1]));
}
@@ -690,13 +690,13 @@ void debugSelectorCall(reg_t send_obj, Selector selector, int argc, StackPtr arg
if (true) {
if (true) {
#endif
- con->DebugPrintf("%s::%s(", objectName, selectorName);
+ con->debugPrintf("%s::%s(", objectName, selectorName);
for (int i = 0; i < argc; i++) {
- con->DebugPrintf("%04x:%04x", PRINT_REG(argp[i+1]));
+ con->debugPrintf("%04x:%04x", PRINT_REG(argp[i+1]));
if (i + 1 < argc)
- con->DebugPrintf(", ");
+ con->debugPrintf(", ");
}
- con->DebugPrintf(") at %04x:%04x\n", PRINT_REG(funcp));
+ con->debugPrintf(") at %04x:%04x\n", PRINT_REG(funcp));
}
}
break;
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 73cd724..7957ed6 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -726,7 +726,7 @@ void GfxAnimate::printAnimateList(Console *con) {
Script *scr = _s->_segMan->getScriptIfLoaded(it->object.getSegment());
int16 scriptNo = scr ? scr->getScriptNumber() : -1;
- con->DebugPrintf("%04x:%04x (%s), script %d, view %d (%d, %d), pal %d, "
+ con->debugPrintf("%04x:%04x (%s), script %d, view %d (%d, %d), pal %d, "
"at %d, %d, scale %d, %d / %d (z: %d, prio: %d, shown: %d, signal: %d)\n",
PRINT_REG(it->object), _s->_segMan->getObjectName(it->object),
scriptNo, it->viewId, it->loopNo, it->celNo, it->paletteNo,
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index ffed7b5..a322eb8 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -852,21 +852,21 @@ void GfxFrameout::printPlaneList(Console *con) {
Common::Rect r = p.upscaledPlaneRect;
Common::Rect cr = p.upscaledPlaneClipRect;
- con->DebugPrintf("%04x:%04x (%s): prio %d, lastprio %d, offsetX %d, offsetY %d, pic %d, mirror %d, back %d\n",
+ con->debugPrintf("%04x:%04x (%s): prio %d, lastprio %d, offsetX %d, offsetY %d, pic %d, mirror %d, back %d\n",
PRINT_REG(p.object), curPlaneName.c_str(),
(int16)p.priority, (int16)p.lastPriority,
p.planeOffsetX, p.planeOffsetY, p.pictureId,
p.planePictureMirrored, p.planeBack);
- con->DebugPrintf(" rect: (%d, %d, %d, %d), clip rect: (%d, %d, %d, %d)\n",
+ con->debugPrintf(" rect: (%d, %d, %d, %d), clip rect: (%d, %d, %d, %d)\n",
r.left, r.top, r.right, r.bottom,
cr.left, cr.top, cr.right, cr.bottom);
if (p.pictureId != 0xffff && p.pictureId != 0xfffe) {
- con->DebugPrintf("Pictures:\n");
+ con->debugPrintf("Pictures:\n");
for (PlanePictureList::iterator pictureIt = _planePictures.begin(); pictureIt != _planePictures.end(); pictureIt++) {
if (pictureIt->object == p.object) {
- con->DebugPrintf(" Picture %d: x %d, y %d\n", pictureIt->pictureId, pictureIt->startX, pictureIt->startY);
+ con->debugPrintf(" Picture %d: x %d, y %d\n", pictureIt->pictureId, pictureIt->startX, pictureIt->startY);
}
}
}
@@ -883,7 +883,7 @@ void GfxFrameout::printPlaneItemList(Console *con, reg_t planeObject) {
Common::Rect icr = e->celRect;
GuiResourceId picId = e->picture ? e->picture->getResourceId() : 0;
- con->DebugPrintf("%d: %04x:%04x (%s), view %d, loop %d, cel %d, x %d, y %d, z %d, "
+ con->debugPrintf("%d: %04x:%04x (%s), view %d, loop %d, cel %d, x %d, y %d, z %d, "
"signal %d, scale signal %d, scaleX %d, scaleY %d, rect (%d, %d, %d, %d), "
"pic %d, picX %d, picY %d, visible %d\n",
e->givenOrderNr, PRINT_REG(e->object), curItemName.c_str(),
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index bd0b5f4..56c63a7 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -748,7 +748,7 @@ void GfxPorts::printWindowList(Console *con) {
for (PortList::const_iterator it = _windowList.begin(); it != _windowList.end(); ++it) {
if ((*it)->isWindow()) {
Window *wnd = ((Window *)*it);
- con->DebugPrintf("%d: '%s' at %d, %d, (%d, %d, %d, %d), drawn: %d, style: %d\n",
+ con->debugPrintf("%d: '%s' at %d, %d, (%d, %d, %d, %d), drawn: %d, style: %d\n",
wnd->id, wnd->title.c_str(), wnd->left, wnd->top,
wnd->rect.left, wnd->rect.top, wnd->rect.right, wnd->rect.bottom,
wnd->bDrawn, wnd->wndStyle);
diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp
index ee0125b..05764ba 100644
--- a/engines/sci/parser/grammar.cpp
+++ b/engines/sci/parser/grammar.cpp
@@ -397,7 +397,7 @@ ParseRuleList *Vocabulary::buildGNF(bool verbose) {
ntrules_nr = _vocab_rule_list_length(ntlist);
if (verbose)
- con->DebugPrintf("Starting with %d rules\n", ntrules_nr);
+ con->debugPrintf("Starting with %d rules\n", ntrules_nr);
new_tlist = tlist;
tlist = NULL;
@@ -425,17 +425,17 @@ ParseRuleList *Vocabulary::buildGNF(bool verbose) {
termrules = _vocab_rule_list_length(new_new_tlist);
if (verbose)
- con->DebugPrintf("After iteration #%d: %d new term rules\n", ++iterations, termrules);
+ con->debugPrintf("After iteration #%d: %d new term rules\n", ++iterations, termrules);
} while (termrules && (iterations < 30));
freeRuleList(ntlist);
if (verbose) {
- con->DebugPrintf("\nGNF rules:\n");
+ con->debugPrintf("\nGNF rules:\n");
tlist->print();
- con->DebugPrintf("%d allocd rules\n", _allocd_rules);
- con->DebugPrintf("Freeing rule list...\n");
+ con->debugPrintf("%d allocd rules\n", _allocd_rules);
+ con->debugPrintf("Freeing rule list...\n");
freeRuleList(tlist);
return NULL;
}
@@ -548,7 +548,7 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
ParseRuleList *seeker, *subseeker;
if (verbose)
- con->DebugPrintf("Adding word %d...\n", word);
+ con->debugPrintf("Adding word %d...\n", word);
seeker = work;
while (seeker) {
@@ -562,7 +562,7 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
if (reduced_rules == NULL) {
freeRuleList(work);
if (verbose)
- con->DebugPrintf("No results.\n");
+ con->debugPrintf("No results.\n");
return 1;
}
@@ -592,10 +592,10 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
work = new_work;
if (verbose)
- con->DebugPrintf("Now at %d candidates\n", _vocab_rule_list_length(work));
+ con->debugPrintf("Now at %d candidates\n", _vocab_rule_list_length(work));
if (work == NULL) {
if (verbose)
- con->DebugPrintf("No results.\n");
+ con->debugPrintf("No results.\n");
return 1;
}
}
@@ -603,9 +603,9 @@ int Vocabulary::parseGNF(const ResultWordListList &words, bool verbose) {
results = work;
if (verbose) {
- con->DebugPrintf("All results (excluding the surrounding '(141 %03x' and ')'):\n", _parserBranches[0].id);
+ con->debugPrintf("All results (excluding the surrounding '(141 %03x' and ')'):\n", _parserBranches[0].id);
results->print();
- con->DebugPrintf("\n");
+ con->debugPrintf("\n");
}
// now use the first result
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index 7c560df..b4a223d 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -577,7 +577,7 @@ void Vocabulary::printSuffixes() const {
strncpy(alt_buf, suf->alt_suffix, suf->alt_suffix_length);
alt_buf[suf->alt_suffix_length] = 0;
- con->DebugPrintf("%4d: (%03x) -%12s => -%12s (%03x)\n", i, suf->class_mask, word_buf, alt_buf, suf->result_class);
+ con->debugPrintf("%4d: (%03x) -%12s => -%12s (%03x)\n", i, suf->class_mask, word_buf, alt_buf, suf->result_class);
++i;
}
}
@@ -588,14 +588,14 @@ void Vocabulary::printParserWords() const {
int n = 0;
for (WordMap::iterator i = _parserWords.begin(); i != _parserWords.end(); ++i) {
for (ResultWordList::iterator j = i->_value.begin(); j != i->_value.end(); ++j) {
- con->DebugPrintf("%4d: %03x [%03x] %20s |", n, j->_class, j->_group, i->_key.c_str());
+ con->debugPrintf("%4d: %03x [%03x] %20s |", n, j->_class, j->_group, i->_key.c_str());
if (n % 3 == 0)
- con->DebugPrintf("\n");
+ con->debugPrintf("\n");
n++;
}
}
- con->DebugPrintf("\n");
+ con->debugPrintf("\n");
}
void _vocab_recursive_ptree_dump(ParseTreeNode *tree, int blanks) {
@@ -665,15 +665,15 @@ void Vocabulary::printParserNodes(int num) {
Console *con = g_sci->getSciDebugger();
for (int i = 0; i < num; i++) {
- con->DebugPrintf(" Node %03x: ", i);
+ con->debugPrintf(" Node %03x: ", i);
if (_parserNodes[i].type == kParseTreeLeafNode)
- con->DebugPrintf("Leaf: %04x\n", _parserNodes[i].value);
+ con->debugPrintf("Leaf: %04x\n", _parserNodes[i].value);
else {
// FIXME: Do we really want to print the *addresses*
// of the left & right child?
// Note that one or both may be zero pointers, so we can't just
// print their values.
- con->DebugPrintf("Branch: ->%p, ->%p\n",
+ con->debugPrintf("Branch: ->%p, ->%p\n",
(const void *)_parserNodes[i].left,
(const void *)_parserNodes[i].right);
}
@@ -694,11 +694,11 @@ int Vocabulary::parseNodes(int *i, int *pos, int type, int nr, int argc, const c
return *pos;
}
if (type == kParseEndOfInput) {
- con->DebugPrintf("Unbalanced parentheses\n");
+ con->debugPrintf("Unbalanced parentheses\n");
return -1;
}
if (type == kParseClosingParenthesis) {
- con->DebugPrintf("Syntax error at token %d\n", *i);
+ con->debugPrintf("Syntax error at token %d\n", *i);
return -1;
}
@@ -735,7 +735,7 @@ int Vocabulary::parseNodes(int *i, int *pos, int type, int nr, int argc, const c
const char *token = argv[(*i)++];
if (strcmp(token, ")"))
- con->DebugPrintf("Expected ')' at token %d\n", *i);
+ con->debugPrintf("Expected ')' at token %d\n", *i);
return oldPos;
}
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 933dc06..99a963f 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -666,7 +666,7 @@ void SciMusic::printPlayList(Console *con) {
for (uint32 i = 0; i < _playList.size(); i++) {
MusicEntry *song = _playList[i];
- con->DebugPrintf("%d: %04x:%04x (%s), resource id: %d, status: %s, %s type\n",
+ con->debugPrintf("%d: %04x:%04x (%s), resource id: %d, status: %s, %s type\n",
i, PRINT_REG(song->soundObj),
g_sci->getEngineState()->_segMan->getObjectName(song->soundObj),
song->resourceId, musicStatus[song->status],
@@ -683,26 +683,26 @@ void SciMusic::printSongInfo(reg_t obj, Console *con) {
for (MusicList::iterator i = _playList.begin(); i != end; ++i) {
MusicEntry *song = *i;
if (song->soundObj == obj) {
- con->DebugPrintf("Resource id: %d, status: %s\n", song->resourceId, musicStatus[song->status]);
- con->DebugPrintf("dataInc: %d, hold: %d, loop: %d\n", song->dataInc, song->hold, song->loop);
- con->DebugPrintf("signal: %d, priority: %d\n", song->signal, song->priority);
- con->DebugPrintf("ticker: %d, volume: %d\n", song->ticker, song->volume);
+ con->debugPrintf("Resource id: %d, status: %s\n", song->resourceId, musicStatus[song->status]);
+ con->debugPrintf("dataInc: %d, hold: %d, loop: %d\n", song->dataInc, song->hold, song->loop);
+ con->debugPrintf("signal: %d, priority: %d\n", song->signal, song->priority);
+ con->debugPrintf("ticker: %d, volume: %d\n", song->ticker, song->volume);
if (song->pMidiParser) {
- con->DebugPrintf("Type: MIDI\n");
+ con->debugPrintf("Type: MIDI\n");
if (song->soundRes) {
SoundResource::Track *track = song->soundRes->getTrackByType(_pMidiDrv->getPlayId());
- con->DebugPrintf("Channels: %d\n", track->channelCount);
+ con->debugPrintf("Channels: %d\n", track->channelCount);
}
} else if (song->pStreamAud || song->pLoopStream) {
- con->DebugPrintf("Type: digital audio (%s), sound active: %s\n",
+ con->debugPrintf("Type: digital audio (%s), sound active: %s\n",
song->pStreamAud ? "non looping" : "looping",
_pMixer->isSoundHandleActive(song->hCurrentAud) ? "yes" : "no");
if (song->soundRes) {
- con->DebugPrintf("Sound resource information:\n");
+ con->debugPrintf("Sound resource information:\n");
SoundResource::Track *track = song->soundRes->getTrackByType(_pMidiDrv->getPlayId());
if (track && track->digitalChannelNr != -1) {
- con->DebugPrintf("Sample size: %d, sample rate: %d, channels: %d, digital channel number: %d\n",
+ con->debugPrintf("Sample size: %d, sample rate: %d, channels: %d, digital channel number: %d\n",
track->digitalSampleSize, track->digitalSampleRate, track->channelCount, track->digitalChannelNr);
}
}
@@ -712,7 +712,7 @@ void SciMusic::printSongInfo(reg_t obj, Console *con) {
}
}
- con->DebugPrintf("Song object not found in playlist");
+ con->debugPrintf("Song object not found in playlist");
}
MusicEntry::MusicEntry() {
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 3dd7b4c..665609b 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -128,51 +128,51 @@ bool ScummDebugger::Cmd_Restart(int argc, const char **argv) {
bool ScummDebugger::Cmd_IMuse(int argc, const char **argv) {
if (!_vm->_imuse && !_vm->_musicEngine) {
- DebugPrintf("No iMuse engine is active.\n");
+ debugPrintf("No iMuse engine is active.\n");
return true;
}
if (argc > 1) {
if (!strcmp(argv[1], "panic")) {
_vm->_musicEngine->stopAllSounds();
- DebugPrintf("AAAIIIEEEEEE!\n");
- DebugPrintf("Shutting down all music tracks\n");
+ debugPrintf("AAAIIIEEEEEE!\n");
+ debugPrintf("Shutting down all music tracks\n");
return true;
} else if (!strcmp(argv[1], "play")) {
if (argc > 2 && (!strcmp(argv[2], "random") || atoi(argv[2]) != 0)) {
int sound = atoi(argv[2]);
if (!strcmp(argv[2], "random")) {
- DebugPrintf("Selecting from %d songs...\n", _vm->_numSounds);
+ debugPrintf("Selecting from %d songs...\n", _vm->_numSounds);
sound = _vm->_rnd.getRandomNumber(_vm->_numSounds);
}
_vm->ensureResourceLoaded(rtSound, sound);
_vm->_musicEngine->startSound(sound);
- DebugPrintf("Attempted to start music %d.\n", sound);
+ debugPrintf("Attempted to start music %d.\n", sound);
} else {
- DebugPrintf("Specify a music resource # from 1-255.\n");
+ debugPrintf("Specify a music resource # from 1-255.\n");
}
return true;
} else if (!strcmp(argv[1], "stop")) {
if (argc > 2 && (!strcmp(argv[2], "all") || atoi(argv[2]) != 0)) {
if (!strcmp(argv[2], "all")) {
_vm->_musicEngine->stopAllSounds();
- DebugPrintf("Shutting down all music tracks.\n");
+ debugPrintf("Shutting down all music tracks.\n");
} else {
_vm->_musicEngine->stopSound(atoi(argv[2]));
- DebugPrintf("Attempted to stop music %d.\n", atoi(argv[2]));
+ debugPrintf("Attempted to stop music %d.\n", atoi(argv[2]));
}
} else {
- DebugPrintf("Specify a music resource # or \"all\".\n");
+ debugPrintf("Specify a music resource # or \"all\".\n");
}
return true;
}
}
- DebugPrintf("Available iMuse commands:\n");
- DebugPrintf(" panic - Stop all music tracks\n");
- DebugPrintf(" play # - Play a music resource\n");
- DebugPrintf(" stop # - Stop a music resource\n");
+ debugPrintf("Available iMuse commands:\n");
+ debugPrintf(" panic - Stop all music tracks\n");
+ debugPrintf(" play # - Play a music resource\n");
+ debugPrintf(" stop # - Stop a music resource\n");
return true;
}
@@ -185,7 +185,7 @@ bool ScummDebugger::Cmd_Room(int argc, const char **argv) {
_vm->_fullRedraw = true;
return false;
} else {
- DebugPrintf("Current room: %d [%d] - use 'room <roomnum>' to switch\n", _vm->_currentRoom, _vm->_roomResource);
+ debugPrintf("Current room: %d [%d] - use 'room <roomnum>' to switch\n", _vm->_currentRoom, _vm->_roomResource);
return true;
}
}
@@ -200,7 +200,7 @@ bool ScummDebugger::Cmd_LoadGame(int argc, const char **argv) {
return false;
}
- DebugPrintf("Syntax: loadgame <slotnum>\n");
+ debugPrintf("Syntax: loadgame <slotnum>\n");
return true;
}
@@ -210,7 +210,7 @@ bool ScummDebugger::Cmd_SaveGame(int argc, const char **argv) {
_vm->requestSave(slot, argv[2]);
} else
- DebugPrintf("Syntax: savegame <slotnum> <name>\n");
+ debugPrintf("Syntax: savegame <slotnum> <name>\n");
return true;
}
@@ -218,18 +218,18 @@ bool ScummDebugger::Cmd_SaveGame(int argc, const char **argv) {
bool ScummDebugger::Cmd_Show(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Syntax: show <parameter>\n");
+ debugPrintf("Syntax: show <parameter>\n");
return true;
}
if (!strcmp(argv[1], "hex")) {
_vm->_hexdumpScripts = true;
- DebugPrintf("Script hex dumping on\n");
+ debugPrintf("Script hex dumping on\n");
} else if (!strncmp(argv[1], "sta", 3)) {
_vm->_showStack = 1;
- DebugPrintf("Stack tracing on\n");
+ debugPrintf("Stack tracing on\n");
} else {
- DebugPrintf("Unknown show parameter '%s'\nParameters are 'hex' for hex dumping and 'sta' for stack tracing\n", argv[1]);
+ debugPrintf("Unknown show parameter '%s'\nParameters are 'hex' for hex dumping and 'sta' for stack tracing\n", argv[1]);
}
return true;
}
@@ -237,18 +237,18 @@ bool ScummDebugger::Cmd_Show(int argc, const char **argv) {
bool ScummDebugger::Cmd_Hide(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Syntax: hide <parameter>\n");
+ debugPrintf("Syntax: hide <parameter>\n");
return true;
}
if (!strcmp(argv[1], "hex")) {
_vm->_hexdumpScripts = false;
- DebugPrintf("Script hex dumping off\n");
+ debugPrintf("Script hex dumping off\n");
} else if (!strncmp(argv[1], "sta", 3)) {
_vm->_showStack = 0;
- DebugPrintf("Stack tracing off\n");
+ debugPrintf("Stack tracing off\n");
} else {
- DebugPrintf("Unknown hide parameter '%s'\nParameters are 'hex' to turn off hex dumping and 'sta' to turn off stack tracing\n", argv[1]);
+ debugPrintf("Unknown hide parameter '%s'\nParameters are 'hex' to turn off hex dumping and 'sta' to turn off stack tracing\n", argv[1]);
}
return true;
}
@@ -257,7 +257,7 @@ bool ScummDebugger::Cmd_Script(int argc, const char** argv) {
int scriptnum;
if (argc < 2) {
- DebugPrintf("Syntax: script <scriptnum> <command>\n");
+ debugPrintf("Syntax: script <scriptnum> <command>\n");
return true;
}
@@ -265,7 +265,7 @@ bool ScummDebugger::Cmd_Script(int argc, const char** argv) {
// FIXME: what is the max range on these?
// if (scriptnum >= _vm->_numScripts) {
- // DebugPrintf("Script number %d is out of range (range: 1 - %d)\n", scriptnum, _vm->_numScripts);
+ // debugPrintf("Script number %d is out of range (range: 1 - %d)\n", scriptnum, _vm->_numScripts);
// return true;
//}
@@ -275,7 +275,7 @@ bool ScummDebugger::Cmd_Script(int argc, const char** argv) {
_vm->runScript(scriptnum, 0, 0, 0);
return false;
} else {
- DebugPrintf("Unknown script command '%s'\nUse <kill/stop | run/start> as command\n", argv[2]);
+ debugPrintf("Unknown script command '%s'\nUse <kill/stop | run/start> as command\n", argv[2]);
}
return true;
@@ -287,7 +287,7 @@ bool ScummDebugger::Cmd_ImportRes(int argc, const char** argv) {
int resnum;
if (argc != 4) {
- DebugPrintf("Syntax: importres <restype> <filename> <resnum>\n");
+ debugPrintf("Syntax: importres <restype> <filename> <resnum>\n");
return true;
}
@@ -297,7 +297,7 @@ bool ScummDebugger::Cmd_ImportRes(int argc, const char** argv) {
if (!strncmp(argv[1], "scr", 3)) {
file.open(argv[2]);
if (file.isOpen() == false) {
- DebugPrintf("Could not open file %s\n", argv[2]);
+ debugPrintf("Could not open file %s\n", argv[2]);
return true;
}
if (_vm->_game.features & GF_SMALL_HEADER) {
@@ -318,25 +318,25 @@ bool ScummDebugger::Cmd_ImportRes(int argc, const char** argv) {
file.read(_vm->_res->createResource(rtScript, resnum, size), size);
} else
- DebugPrintf("Unknown importres type '%s'\n", argv[1]);
+ debugPrintf("Unknown importres type '%s'\n", argv[1]);
return true;
}
bool ScummDebugger::Cmd_PrintScript(int argc, const char **argv) {
int i;
ScriptSlot *ss = _vm->vm.slot;
- DebugPrintf("+-----------------------------------+\n");
- DebugPrintf("|# | num|offst|sta|typ|fr|rec|fc|cut|\n");
- DebugPrintf("+--+----+-----+---+---+--+---+--+---+\n");
+ debugPrintf("+-----------------------------------+\n");
+ debugPrintf("|# | num|offst|sta|typ|fr|rec|fc|cut|\n");
+ debugPrintf("+--+----+-----+---+---+--+---+--+---+\n");
for (i = 0; i < NUM_SCRIPT_SLOT; i++, ss++) {
if (ss->number) {
- DebugPrintf("|%2d|%4d|%05x|%3d|%3d|%2d|%3d|%2d|%3d|\n",
+ debugPrintf("|%2d|%4d|%05x|%3d|%3d|%2d|%3d|%2d|%3d|\n",
i, ss->number, ss->offs, ss->status, ss->where,
ss->freezeResistant, ss->recursive,
ss->freezeCount, ss->cutsceneOverride);
}
}
- DebugPrintf("+-----------------------------------+\n");
+ debugPrintf("+-----------------------------------+\n");
return true;
}
@@ -347,13 +347,13 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) {
int value = 0, value2 = 0;
if (argc < 3) {
- DebugPrintf("Syntax: actor <actornum> <command> <parameter>\n");
+ debugPrintf("Syntax: actor <actornum> <command> <parameter>\n");
return true;
}
actnum = atoi(argv[1]);
if (actnum >= _vm->_numActors) {
- DebugPrintf("Actor %d is out of range (range: 1 - %d)\n", actnum, _vm->_numActors);
+ debugPrintf("Actor %d is out of range (range: 1 - %d)\n", actnum, _vm->_numActors);
return true;
}
@@ -365,43 +365,43 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) {
if (!strcmp(argv[2], "animvar")) {
a->setAnimVar(value, value2);
- DebugPrintf("Actor[%d].animVar[%d] = %d\n", actnum, value, a->getAnimVar(value));
+ debugPrintf("Actor[%d].animVar[%d] = %d\n", actnum, value, a->getAnimVar(value));
} else if (!strcmp(argv[2], "anim")) {
a->animateActor(value);
- DebugPrintf("Actor[%d].animateActor(%d)\n", actnum, value);
+ debugPrintf("Actor[%d].animateActor(%d)\n", actnum, value);
} else if (!strcmp(argv[2], "ignoreboxes")) {
a->_ignoreBoxes = (value > 0);
- DebugPrintf("Actor[%d].ignoreBoxes = %d\n", actnum, a->_ignoreBoxes);
+ debugPrintf("Actor[%d].ignoreBoxes = %d\n", actnum, a->_ignoreBoxes);
} else if (!strcmp(argv[2], "x")) {
a->putActor(value, a->getRealPos().y);
- DebugPrintf("Actor[%d].x = %d\n", actnum, a->getRealPos().x);
+ debugPrintf("Actor[%d].x = %d\n", actnum, a->getRealPos().x);
_vm->_fullRedraw = true;
} else if (!strcmp(argv[2], "y")) {
a->putActor(a->getRealPos().x, value);
- DebugPrintf("Actor[%d].y = %d\n", actnum, a->getRealPos().y);
+ debugPrintf("Actor[%d].y = %d\n", actnum, a->getRealPos().y);
_vm->_fullRedraw = true;
} else if (!strcmp(argv[2], "_elevation")) {
a->setElevation(value);
- DebugPrintf("Actor[%d]._elevation = %d\n", actnum, a->getElevation());
+ debugPrintf("Actor[%d]._elevation = %d\n", actnum, a->getElevation());
_vm->_fullRedraw = true;
} else if (!strcmp(argv[2], "costume")) {
if (value >= (int)_vm->_res->_types[rtCostume].size())
- DebugPrintf("Costume not changed as %d exceeds max of %d\n", value, _vm->_res->_types[rtCostume].size());
+ debugPrintf("Costume not changed as %d exceeds max of %d\n", value, _vm->_res->_types[rtCostume].size());
else {
a->setActorCostume(value);
_vm->_fullRedraw = true;
- DebugPrintf("Actor[%d].costume = %d\n", actnum, a->_costume);
+ debugPrintf("Actor[%d].costume = %d\n", actnum, a->_costume);
}
} else if (!strcmp(argv[2], "name")) {
- DebugPrintf("Name of actor %d: %s\n", actnum,
+ debugPrintf("Name of actor %d: %s\n", actnum,
_vm->getObjOrActorName(_vm->actorToObj(actnum)));
} else if (!strcmp(argv[2], "condmask")) {
if (argc > 3) {
a->_heCondMask = value;
}
- DebugPrintf("Actor[%d]._heCondMask = 0x%X\n", actnum, a->_heCondMask);
+ debugPrintf("Actor[%d]._heCondMask = 0x%X\n", actnum, a->_heCondMask);
} else {
- DebugPrintf("Unknown actor command '%s'\nUse <ignoreboxes |costume> as command\n", argv[2]);
+ debugPrintf("Unknown actor command '%s'\nUse <ignoreboxes |costume> as command\n", argv[2]);
}
return true;
@@ -411,40 +411,40 @@ bool ScummDebugger::Cmd_PrintActor(int argc, const char **argv) {
int i;
Actor *a;
- DebugPrintf("+---------------------------------------------------------------+\n");
- DebugPrintf("|# | x | y | w | h |elev|cos|box|mov| zp|frm|scl|dir| cls |\n");
- DebugPrintf("+--+----+----+---+---+----+---+---+---+---+---+---+---+---------+\n");
+ debugPrintf("+---------------------------------------------------------------+\n");
+ debugPrintf("|# | x | y | w | h |elev|cos|box|mov| zp|frm|scl|dir| cls |\n");
+ debugPrintf("+--+----+----+---+---+----+---+---+---+---+---+---+---+---------+\n");
for (i = 1; i < _vm->_numActors; i++) {
a = _vm->_actors[i];
if (a->_visible)
- DebugPrintf("|%2d|%4d|%4d|%3d|%3d|%4d|%3d|%3d|%3d|%3d|%3d|%3d|%3d|$%08x|\n",
+ debugPrintf("|%2d|%4d|%4d|%3d|%3d|%4d|%3d|%3d|%3d|%3d|%3d|%3d|%3d|$%08x|\n",
a->_number, a->getRealPos().x, a->getRealPos().y, a->_width, a->_bottom - a->_top,
a->getElevation(),
a->_costume, a->_walkbox, a->_moving, a->_forceClip, a->_frame,
a->_scalex, a->getFacing(), _vm->_classData[a->_number]);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
bool ScummDebugger::Cmd_PrintObjects(int argc, const char **argv) {
int i;
ObjectData *o;
- DebugPrintf("Objects in current room\n");
- DebugPrintf("+---------------------------------+------------+\n");
- DebugPrintf("|num | x | y |width|height|state|fl| cls |\n");
- DebugPrintf("+----+----+----+-----+------+-----+--+---------+\n");
+ debugPrintf("Objects in current room\n");
+ debugPrintf("+---------------------------------+------------+\n");
+ debugPrintf("|num | x | y |width|height|state|fl| cls |\n");
+ debugPrintf("+----+----+----+-----+------+-----+--+---------+\n");
for (i = 1; i < _vm->_numLocalObjects; i++) {
o = &(_vm->_objs[i]);
if (o->obj_nr == 0)
continue;
int classData = (_vm->_game.version != 0 ? _vm->_classData[o->obj_nr] : 0);
- DebugPrintf("|%4d|%4d|%4d|%5d|%6d|%5d|%2d|$%08x|\n",
+ debugPrintf("|%4d|%4d|%4d|%5d|%6d|%5d|%2d|$%08x|\n",
o->obj_nr, o->x_pos, o->y_pos, o->width, o->height, o->state,
o->fl_object_index, classData);
}
- DebugPrintf("\n");
+ debugPrintf("\n");
return true;
}
@@ -454,13 +454,13 @@ bool ScummDebugger::Cmd_Object(int argc, const char **argv) {
int obj;
if (argc < 3) {
- DebugPrintf("Syntax: object <objectnum> <command> <parameter>\n");
+ debugPrintf("Syntax: object <objectnum> <command> <parameter>\n");
return true;
}
obj = atoi(argv[1]);
if (_vm->_game.version != 0 && obj >= _vm->_numGlobalObjects) {
- DebugPrintf("Object %d is out of range (range: 1 - %d)\n", obj, _vm->_numGlobalObjects);
+ debugPrintf("Object %d is out of range (range: 1 - %d)\n", obj, _vm->_numGlobalObjects);
return true;
}
@@ -490,12 +490,12 @@ bool ScummDebugger::Cmd_Object(int argc, const char **argv) {
//is BgNeedsRedraw enough?
_vm->_bgNeedsRedraw = true;
} else {
- DebugPrintf("State of object %d: %d\n", obj, _vm->getState(obj));
+ debugPrintf("State of object %d: %d\n", obj, _vm->getState(obj));
}
} else if (!strcmp(argv[2], "name")) {
- DebugPrintf("Name of object %d: %s\n", obj, _vm->getObjOrActorName(obj));
+ debugPrintf("Name of object %d: %s\n", obj, _vm->getObjOrActorName(obj));
} else {
- DebugPrintf("Unknown object command '%s'\nUse <pickup | state | name> as command\n", argv[2]);
+ debugPrintf("Unknown object command '%s'\nUse <pickup | state | name> as command\n", argv[2]);
}
return true;
@@ -506,9 +506,9 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
// No parameters given: Print out a list of all channels and their status
if (argc <= 1) {
- DebugPrintf("Available debug channels:\n");
+ debugPrintf("Available debug channels:\n");
for (Common::DebugManager::DebugChannelList::const_iterator i = lvls.begin(); i != lvls.end(); ++i) {
- DebugPrintf("%c%s - %s (%s)\n", i->enabled ? '+' : ' ',
+ debugPrintf("%c%s - %s (%s)\n", i->enabled ? '+' : ' ',
i->name.c_str(), i->description.c_str(),
i->enabled ? "enabled" : "disabled");
}
@@ -524,18 +524,18 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
}
if (result) {
- DebugPrintf("%s %s\n", (argv[1][0] == '+') ? "Enabled" : "Disabled", argv[1] + 1);
+ debugPrintf("%s %s\n", (argv[1][0] == '+') ? "Enabled" : "Disabled", argv[1] + 1);
} else {
- DebugPrintf("Usage: debug [+CHANNEL|-CHANNEL]\n");
- DebugPrintf("Enables or disables the given debug channel.\n");
- DebugPrintf("When used without parameters, lists all available debug channels and their status.\n");
+ debugPrintf("Usage: debug [+CHANNEL|-CHANNEL]\n");
+ debugPrintf("Enables or disables the given debug channel.\n");
+ debugPrintf("When used without parameters, lists all available debug channels and their status.\n");
}
return true;
}
bool ScummDebugger::Cmd_Camera(int argc, const char **argv) {
- DebugPrintf("Camera: cur (%d,%d) - dest (%d,%d) - accel (%d,%d) -- last (%d,%d)\n",
+ debugPrintf("Camera: cur (%d,%d) - dest (%d,%d) - accel (%d,%d) -- last (%d,%d)\n",
_vm->camera._cur.x, _vm->camera._cur.y, _vm->camera._dest.x, _vm->camera._dest.y,
_vm->camera._accel.x, _vm->camera._accel.y, _vm->camera._last.x, _vm->camera._last.y);
@@ -550,7 +550,7 @@ bool ScummDebugger::Cmd_PrintBox(int argc, const char **argv) {
printBox(atoi(argv[i]));
} else {
num = _vm->getNumBoxes();
- DebugPrintf("\nWalk boxes:\n");
+ debugPrintf("\nWalk boxes:\n");
for (i = 0; i < num; i++)
printBox(i);
}
@@ -562,29 +562,29 @@ bool ScummDebugger::Cmd_PrintBoxMatrix(int argc, const char **argv) {
int num = _vm->getNumBoxes();
int i, j;
- DebugPrintf("Walk matrix:\n");
+ debugPrintf("Walk matrix:\n");
if (_vm->_game.version <= 2)
boxm += num;
for (i = 0; i < num; i++) {
- DebugPrintf("%d: ", i);
+ debugPrintf("%d: ", i);
if (_vm->_game.version <= 2) {
for (j = 0; j < num; j++)
- DebugPrintf("[%d] ", *boxm++);
+ debugPrintf("[%d] ", *boxm++);
} else {
while (*boxm != 0xFF) {
- DebugPrintf("[%d-%d=>%d] ", boxm[0], boxm[1], boxm[2]);
+ debugPrintf("[%d-%d=>%d] ", boxm[0], boxm[1], boxm[2]);
boxm += 3;
}
boxm++;
}
- DebugPrintf("\n");
+ debugPrintf("\n");
}
return true;
}
void ScummDebugger::printBox(int box) {
if (box < 0 || box >= _vm->getNumBoxes()) {
- DebugPrintf("%d is not a valid box!\n", box);
+ debugPrintf("%d is not a valid box!\n", box);
return;
}
BoxCoords coords;
@@ -595,7 +595,7 @@ void ScummDebugger::printBox(int box) {
coords = _vm->getBoxCoordinates(box);
// Print out coords, flags, zbuffer mask
- DebugPrintf("%d: [%d x %d] [%d x %d] [%d x %d] [%d x %d], flags=0x%02x, mask=%d, scale=%d\n",
+ debugPrintf("%d: [%d x %d] [%d x %d] [%d x %d] [%d x %d], flags=0x%02x, mask=%d, scale=%d\n",
box,
coords.ul.x, coords.ul.y, coords.ll.x, coords.ll.y,
coords.ur.x, coords.ur.y, coords.lr.x, coords.lr.y,
@@ -736,7 +736,7 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
int i, base, draft;
if (_vm->_game.id != GID_LOOM) {
- DebugPrintf("Command only works with Loom/LoomCD\n");
+ debugPrintf("Command only works with Loom/LoomCD\n");
return true;
}
@@ -787,7 +787,7 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
// the distaff, but I don't know if that's a safe
// thing to do.
- DebugPrintf("Learned all drafts and notes.\n");
+ debugPrintf("Learned all drafts and notes.\n");
return true;
}
}
@@ -796,7 +796,7 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
for (i = 0; i < 16; i++) {
draft = _vm->_scummVars[base + i * 2];
- DebugPrintf("%d %-13s %c%c%c%c %c%c\n",
+ debugPrintf("%d %-13s %c%c%c%c %c%c\n",
base + 2 * i,
names[i],
notes[draft & 0x0007],
@@ -820,7 +820,7 @@ bool ScummDebugger::Cmd_Passcode(int argc, const char **argv) {
_vm->runScript(61, 0, 0, args);
if (_vm->_bootParam != _vm->_scummVars[411]){
- DebugPrintf("Invalid Passcode\n");
+ debugPrintf("Invalid Passcode\n");
return true;
}
@@ -828,7 +828,7 @@ bool ScummDebugger::Cmd_Passcode(int argc, const char **argv) {
detach();
} else {
- DebugPrintf("Current Passcode is %d \nUse 'passcode <SEGA CD Passcode>'\n",_vm->_scummVars[411]);
+ debugPrintf("Current Passcode is %d \nUse 'passcode <SEGA CD Passcode>'\n",_vm->_scummVars[411]);
return true;
}
return false;
diff --git a/engines/sky/debug.cpp b/engines/sky/debug.cpp
index 63da42e..f79ce2b 100644
--- a/engines/sky/debug.cpp
+++ b/engines/sky/debug.cpp
@@ -1119,14 +1119,14 @@ static bool isNumeric(const char *arg) {
bool Debugger::Cmd_ShowGrid(int argc, const char **argv) {
_showGrid = !_showGrid;
- DebugPrintf("Show grid: %s\n", _showGrid ? "On" : "Off");
+ debugPrintf("Show grid: %s\n", _showGrid ? "On" : "Off");
if (!_showGrid) _screen->forceRefresh();
return true;
}
bool Debugger::Cmd_ReloadGrid(int argc, const char **argv) {
_logic->_skyGrid->loadGrids();
- DebugPrintf("Grid reloaded\n");
+ debugPrintf("Grid reloaded\n");
return true;
}
@@ -1143,35 +1143,35 @@ void Debugger::dumpCompact(uint16 cptId) {
Compact *cpt = _skyCompact->fetchCptInfo(cptId, &size, &type, name);
if (type == COMPACT) {
- DebugPrintf("Compact %s: id = %04X, section %d, id %d\n", name, cptId, cptId >> 12, cptId & 0xFFF);
- DebugPrintf("logic : %04X: %s\n", cpt->logic, (cpt->logic <= 16) ? logicTypes[cpt->logic] : "unknown");
- DebugPrintf("status : %04X\n", cpt->status);
- DebugPrintf(" : background : %s\n", noYes[(cpt->status & ST_BACKGROUND) >> 0]);
- DebugPrintf(" : foreground : %s\n", noYes[(cpt->status & ST_FOREGROUND) >> 1]);
- DebugPrintf(" : sort list : %s\n", noYes[(cpt->status & ST_SORT) >> 2]);
- DebugPrintf(" : recreate : %s\n", noYes[(cpt->status & ST_RECREATE) >> 3]);
- DebugPrintf(" : mouse : %s\n", noYes[(cpt->status & ST_MOUSE) >> 4]);
- DebugPrintf(" : collision : %s\n", noYes[(cpt->status & ST_COLLISION) >> 5]);
- DebugPrintf(" : logic : %s\n", noYes[(cpt->status & ST_LOGIC) >> 6]);
- DebugPrintf(" : on grid : %s\n", noYes[(cpt->status & ST_GRID_PLOT) >> 7]);
- DebugPrintf(" : ar priority : %s\n", noYes[(cpt->status & ST_AR_PRIORITY) >> 8]);
- DebugPrintf("sync : %04X\n", cpt->sync);
- DebugPrintf("screen : %d\n", cpt->screen);
+ debugPrintf("Compact %s: id = %04X, section %d, id %d\n", name, cptId, cptId >> 12, cptId & 0xFFF);
+ debugPrintf("logic : %04X: %s\n", cpt->logic, (cpt->logic <= 16) ? logicTypes[cpt->logic] : "unknown");
+ debugPrintf("status : %04X\n", cpt->status);
+ debugPrintf(" : background : %s\n", noYes[(cpt->status & ST_BACKGROUND) >> 0]);
+ debugPrintf(" : foreground : %s\n", noYes[(cpt->status & ST_FOREGROUND) >> 1]);
+ debugPrintf(" : sort list : %s\n", noYes[(cpt->status & ST_SORT) >> 2]);
+ debugPrintf(" : recreate : %s\n", noYes[(cpt->status & ST_RECREATE) >> 3]);
+ debugPrintf(" : mouse : %s\n", noYes[(cpt->status & ST_MOUSE) >> 4]);
+ debugPrintf(" : collision : %s\n", noYes[(cpt->status & ST_COLLISION) >> 5]);
+ debugPrintf(" : logic : %s\n", noYes[(cpt->status & ST_LOGIC) >> 6]);
+ debugPrintf(" : on grid : %s\n", noYes[(cpt->status & ST_GRID_PLOT) >> 7]);
+ debugPrintf(" : ar priority : %s\n", noYes[(cpt->status & ST_AR_PRIORITY) >> 8]);
+ debugPrintf("sync : %04X\n", cpt->sync);
+ debugPrintf("screen : %d\n", cpt->screen);
_skyCompact->fetchCptInfo(cpt->place, NULL, NULL, name);
- DebugPrintf("place : %04X: %s\n", cpt->place, name);
+ debugPrintf("place : %04X: %s\n", cpt->place, name);
_skyCompact->fetchCptInfo(cpt->getToTableId, NULL, NULL, name);
- DebugPrintf("get to tab : %04X: %s\n", cpt->getToTableId, name);
- DebugPrintf("x/y : %d/%d\n", cpt->xcood, cpt->ycood);
+ debugPrintf("get to tab : %04X: %s\n", cpt->getToTableId, name);
+ debugPrintf("x/y : %d/%d\n", cpt->xcood, cpt->ycood);
} else {
- DebugPrintf("Can't dump binary data\n");
+ debugPrintf("Can't dump binary data\n");
}
}
bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Example: \"%s foster\" dumps compact \"foster\"\n", argv[0]);
- DebugPrintf("Example: \"%s list 1\" lists all compacts from section 1\n", argv[0]);
- DebugPrintf("Example: \"%s list 1 all\" lists all entities from section 1\n", argv[0]);
+ debugPrintf("Example: \"%s foster\" dumps compact \"foster\"\n", argv[0]);
+ debugPrintf("Example: \"%s list 1\" lists all compacts from section 1\n", argv[0]);
+ debugPrintf("Example: \"%s list 1 all\" lists all entities from section 1\n", argv[0]);
return true;
}
@@ -1181,7 +1181,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
if (argc >= 3) {
sectionNumber = atoi(argv[2]);
if (sectionNumber >= _skyCompact->giveNumDataLists()) {
- DebugPrintf("Section number %d does not exist\n", sectionNumber);
+ debugPrintf("Section number %d does not exist\n", sectionNumber);
return true;
}
if ((argc == 4) && (scumm_stricmp(argv[3], "all") == 0))
@@ -1189,14 +1189,14 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
}
for (int sec = 0; sec < _skyCompact->giveNumDataLists(); sec++) {
if ((sectionNumber == -1) || (sectionNumber == sec)) {
- DebugPrintf("Compacts in section %d:\n", sec);
+ debugPrintf("Compacts in section %d:\n", sec);
if (showAll) {
char line[256];
char *linePos = line;
for (int cpt = 0; cpt < _skyCompact->giveDataListLen(sec); cpt++) {
if (cpt != 0) {
if ((cpt % 3) == 0) {
- DebugPrintf("%s\n", line);
+ debugPrintf("%s\n", line);
linePos = line;
} else
linePos += sprintf(linePos, ", ");
@@ -1208,7 +1208,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
linePos += sprintf(linePos, "%04X: %10s %22s", cptId, _skyCompact->nameForType(type), name);
}
if (linePos != line)
- DebugPrintf("%s\n", line);
+ debugPrintf("%s\n", line);
} else {
for (int cpt = 0; cpt < _skyCompact->giveDataListLen(sec); cpt++) {
uint16 cptId = (uint16)((sec << 12) | cpt);
@@ -1216,7 +1216,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
char name[256];
_skyCompact->fetchCptInfo(cptId, &size, &type, name);
if (type == COMPACT)
- DebugPrintf("%04X: %s\n", cptId, name);
+ debugPrintf("%04X: %s\n", cptId, name);
}
}
}
@@ -1224,7 +1224,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
} else {
uint16 cptId = _skyCompact->findCptId(argv[1]);
if (cptId == 0)
- DebugPrintf("Unknown compact: '%s'\n", argv[1]);
+ debugPrintf("Unknown compact: '%s'\n", argv[1]);
else
dumpCompact(cptId);
}
@@ -1233,7 +1233,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
bool Debugger::Cmd_LogicCommand(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Example: %s fn_printf 42\n", argv[0]);
+ debugPrintf("Example: %s fn_printf 42\n", argv[0]);
return true;
}
@@ -1241,7 +1241,7 @@ bool Debugger::Cmd_LogicCommand(int argc, const char **argv) {
if (0 == strcmp(argv[1], "list")) {
for (int i = 0; i < numMCodes; ++i) {
- DebugPrintf("%s\n", mcodes[i]);
+ debugPrintf("%s\n", mcodes[i]);
}
return true;
}
@@ -1264,21 +1264,21 @@ bool Debugger::Cmd_LogicCommand(int argc, const char **argv) {
}
}
- DebugPrintf("Unknown function: '%s'\n", argv[1]);
+ debugPrintf("Unknown function: '%s'\n", argv[1]);
return true;
}
bool Debugger::Cmd_Info(int argc, const char **argv) {
- DebugPrintf("Beneath a Steel Sky version: 0.0%d\n", SkyEngine::_systemVars.gameVersion);
- DebugPrintf("Speech: %s\n", (SkyEngine::_systemVars.systemFlags & SF_ALLOW_SPEECH) ? "on" : "off");
- DebugPrintf("Text : %s\n", (SkyEngine::_systemVars.systemFlags & SF_ALLOW_TEXT) ? "on" : "off");
+ debugPrintf("Beneath a Steel Sky version: 0.0%d\n", SkyEngine::_systemVars.gameVersion);
+ debugPrintf("Speech: %s\n", (SkyEngine::_systemVars.systemFlags & SF_ALLOW_SPEECH) ? "on" : "off");
+ debugPrintf("Text : %s\n", (SkyEngine::_systemVars.systemFlags & SF_ALLOW_TEXT) ? "on" : "off");
return true;
}
bool Debugger::Cmd_ScriptVar(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Example: %s lamb_friend <value>\n", argv[0]);
+ debugPrintf("Example: %s lamb_friend <value>\n", argv[0]);
return true;
}
@@ -1286,7 +1286,7 @@ bool Debugger::Cmd_ScriptVar(int argc, const char **argv) {
if (0 == strcmp(argv[1], "list")) {
for (int i = 0; i < numScriptVars; ++i) {
- DebugPrintf("%s\n", scriptVars[i]);
+ debugPrintf("%s\n", scriptVars[i]);
}
return true;
}
@@ -1296,13 +1296,13 @@ bool Debugger::Cmd_ScriptVar(int argc, const char **argv) {
if (argc == 3) {
Logic::_scriptVariables[i] = atoi(argv[2]);
}
- DebugPrintf("%s = %d\n", argv[1], Logic::_scriptVariables[i]);
+ debugPrintf("%s = %d\n", argv[1], Logic::_scriptVariables[i]);
return true;
}
}
- DebugPrintf("Unknown ScriptVar: '%s'\n", argv[1]);
+ debugPrintf("Unknown ScriptVar: '%s'\n", argv[1]);
return true;
}
@@ -1317,30 +1317,30 @@ bool Debugger::Cmd_Section(int argc, const char **argv) {
_logic->fnAssignBase(ID_FOSTER, baseId[section], 0);
_skyCompact->fetchCpt(ID_FOSTER)->megaSet = 0;
} else {
- DebugPrintf("Section %d is out of range (range: %d - %d)\n", section, 0, 6);
+ debugPrintf("Section %d is out of range (range: %d - %d)\n", section, 0, 6);
}
} else {
- DebugPrintf("Example: %s 4\n", argv[0]);
+ debugPrintf("Example: %s 4\n", argv[0]);
}
return true;
}
bool Debugger::Cmd_LogicList(int argc, const char **argv) {
if (argc != 1)
- DebugPrintf("%s does not expect any parameters\n", argv[0]);
+ debugPrintf("%s does not expect any parameters\n", argv[0]);
char cptName[256];
uint16 numElems, type;
uint16 *logicList = (uint16 *)_skyCompact->fetchCptInfo(Logic::_scriptVariables[LOGIC_LIST_NO], &numElems, &type, cptName);
- DebugPrintf("Current LogicList: %04X (%s)\n", Logic::_scriptVariables[LOGIC_LIST_NO], cptName);
+ debugPrintf("Current LogicList: %04X (%s)\n", Logic::_scriptVariables[LOGIC_LIST_NO], cptName);
while (*logicList != 0) {
if (*logicList == 0xFFFF) {
uint16 newList = logicList[1];
logicList = (uint16 *)_skyCompact->fetchCptInfo(newList, &numElems, &type, cptName);
- DebugPrintf("New List: %04X (%s)\n", newList, cptName);
+ debugPrintf("New List: %04X (%s)\n", newList, cptName);
} else {
_skyCompact->fetchCptInfo(*logicList, &numElems, &type, cptName);
- DebugPrintf(" Cpt %04X (%s) (%s)\n", *logicList, cptName, _skyCompact->nameForType(type));
+ debugPrintf(" Cpt %04X (%s) (%s)\n", *logicList, cptName, _skyCompact->nameForType(type));
logicList++;
}
}
diff --git a/engines/sword2/console.cpp b/engines/sword2/console.cpp
index 4838bd1..7c45368 100644
--- a/engines/sword2/console.cpp
+++ b/engines/sword2/console.cpp
@@ -124,13 +124,13 @@ Debugger::Debugger(Sword2Engine *vm)
}
void Debugger::varGet(int var) {
- DebugPrintf("%d\n", _vm->_logic->readVar(var));
+ debugPrintf("%d\n", _vm->_logic->readVar(var));
}
void Debugger::varSet(int var, int val) {
- DebugPrintf("was %d, ", _vm->_logic->readVar(var));
+ debugPrintf("was %d, ", _vm->_logic->readVar(var));
_vm->_logic->writeVar(var, val);
- DebugPrintf("now %d\n", _vm->_logic->readVar(var));
+ debugPrintf("now %d\n", _vm->_logic->readVar(var));
}
void Debugger::preEnter() {
@@ -184,8 +184,8 @@ bool Debugger::Cmd_Mem(int argc, const char **argv) {
qsort(blocks, numBlocks, sizeof(MemBlock *), compare_blocks);
- DebugPrintf(" size id res type name\n");
- DebugPrintf("---------------------------------------------------------------------------\n");
+ debugPrintf(" size id res type name\n");
+ debugPrintf("---------------------------------------------------------------------------\n");
for (i = 0; i < numBlocks; i++) {
const char *type;
@@ -235,21 +235,21 @@ bool Debugger::Cmd_Mem(int argc, const char **argv) {
break;
}
- DebugPrintf("%9d %-3d %-4d %-20s %s\n",
+ debugPrintf("%9d %-3d %-4d %-20s %s\n",
blocks[i]->size, blocks[i]->id, blocks[i]->uid,
type, _vm->_resman->fetchName(blocks[i]->ptr));
}
free(blocks);
- DebugPrintf("---------------------------------------------------------------------------\n");
- DebugPrintf("%9d\n", _vm->_memory->getTotAlloc());
+ debugPrintf("---------------------------------------------------------------------------\n");
+ debugPrintf("%9d\n", _vm->_memory->getTotAlloc());
return true;
}
bool Debugger::Cmd_Tony(int argc, const char **argv) {
- DebugPrintf("What about him?\n");
+ debugPrintf("What about him?\n");
return true;
}
@@ -257,7 +257,7 @@ bool Debugger::Cmd_Res(int argc, const char **argv) {
uint32 numClusters = _vm->_resman->getNumClusters();
if (!numClusters) {
- DebugPrintf("Argh! No resources!\n");
+ debugPrintf("Argh! No resources!\n");
return true;
}
@@ -266,10 +266,10 @@ bool Debugger::Cmd_Res(int argc, const char **argv) {
for (uint i = 0; i < numClusters; i++) {
const char *locStr[3] = { "HDD", "CD1", "CD2" };
- DebugPrintf("%-20s %s\n", resFiles[i].fileName, locStr[resFiles[i].cd]);
+ debugPrintf("%-20s %s\n", resFiles[i].fileName, locStr[resFiles[i].cd]);
}
- DebugPrintf("%d resources\n", _vm->_resman->getNumResFiles());
+ debugPrintf("%d resources\n", _vm->_resman->getNumResFiles());
return true;
}
@@ -285,7 +285,7 @@ bool Debugger::Cmd_ResList(int argc, const char **argv) {
for (uint i = 0; i < numResFiles; i++) {
if (resList[i].ptr && resList[i].refCount >= minCount) {
- DebugPrintf("%-4d: %-35s refCount: %-3d\n", i, _vm->_resman->fetchName(resList[i].ptr), resList[i].refCount);
+ debugPrintf("%-4d: %-35s refCount: %-3d\n", i, _vm->_resman->fetchName(resList[i].ptr), resList[i].refCount);
}
}
@@ -296,21 +296,21 @@ bool Debugger::Cmd_Starts(int argc, const char **argv) {
uint32 numStarts = _vm->getNumStarts();
if (!numStarts) {
- DebugPrintf("Sorry - no startup positions registered?\n");
+ debugPrintf("Sorry - no startup positions registered?\n");
uint32 numScreenManagers = _vm->getNumScreenManagers();
if (!numScreenManagers)
- DebugPrintf("There is a problem with startup.inf\n");
+ debugPrintf("There is a problem with startup.inf\n");
else
- DebugPrintf(" (%d screen managers found in startup.inf)\n", numScreenManagers);
+ debugPrintf(" (%d screen managers found in startup.inf)\n", numScreenManagers);
return true;
}
StartUp *startList = _vm->getStartList();
for (uint i = 0; i < numStarts; i++)
- DebugPrintf("%d (%s)\n", i, startList[i].description);
+ debugPrintf("%d (%s)\n", i, startList[i].description);
return true;
}
@@ -319,25 +319,25 @@ bool Debugger::Cmd_Start(int argc, const char **argv) {
uint8 pal[3] = { 255, 255, 255 };
if (argc != 2) {
- DebugPrintf("Usage: %s number\n", argv[0]);
+ debugPrintf("Usage: %s number\n", argv[0]);
return true;
}
uint32 numStarts = _vm->getNumStarts();
if (!numStarts) {
- DebugPrintf("Sorry - there are no startups!\n");
+ debugPrintf("Sorry - there are no startups!\n");
return true;
}
int start = atoi(argv[1]);
if (start < 0 || start >= (int)numStarts) {
- DebugPrintf("Not a legal start position\n");
+ debugPrintf("Not a legal start position\n");
return true;
}
- DebugPrintf("Running start %d\n", start);
+ debugPrintf("Running start %d\n", start);
_vm->runStart(start);
_vm->_screen->setPalette(187, 1, pal, RDPAL_INSTANT);
@@ -348,9 +348,9 @@ bool Debugger::Cmd_Info(int argc, const char **argv) {
_displayDebugText = !_displayDebugText;
if (_displayDebugText)
- DebugPrintf("Info text on\n");
+ debugPrintf("Info text on\n");
else
- DebugPrintf("Info Text off\n");
+ debugPrintf("Info Text off\n");
return true;
}
@@ -359,9 +359,9 @@ bool Debugger::Cmd_WalkGrid(int argc, const char **argv) {
_displayWalkGrid = !_displayWalkGrid;
if (_displayWalkGrid)
- DebugPrintf("Walk-grid display on\n");
+ debugPrintf("Walk-grid display on\n");
else
- DebugPrintf("Walk-grid display off\n");
+ debugPrintf("Walk-grid display off\n");
return true;
}
@@ -370,9 +370,9 @@ bool Debugger::Cmd_Mouse(int argc, const char **argv) {
_displayMouseMarker = !_displayMouseMarker;
if (_displayMouseMarker)
- DebugPrintf("Mouse marker on\n");
+ debugPrintf("Mouse marker on\n");
else
- DebugPrintf("Mouse marker off\n");
+ debugPrintf("Mouse marker off\n");
return true;
}
@@ -381,16 +381,16 @@ bool Debugger::Cmd_Player(int argc, const char **argv) {
_displayPlayerMarker = !_displayPlayerMarker;
if (_displayPlayerMarker)
- DebugPrintf("Player feet marker on\n");
+ debugPrintf("Player feet marker on\n");
else
- DebugPrintf("Player feet marker off\n");
+ debugPrintf("Player feet marker off\n");
return true;
}
bool Debugger::Cmd_ResLook(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s number\n", argv[0]);
+ debugPrintf("Usage: %s number\n", argv[0]);
return true;
}
@@ -398,13 +398,13 @@ bool Debugger::Cmd_ResLook(int argc, const char **argv) {
uint32 numResFiles = _vm->_resman->getNumResFiles();
if (res < 0 || res >= (int)numResFiles) {
- DebugPrintf("Illegal resource %d. There are %d resources, 0-%d.\n",
+ debugPrintf("Illegal resource %d. There are %d resources, 0-%d.\n",
res, numResFiles, numResFiles - 1);
return true;
}
if (!_vm->_resman->checkValid(res)) {
- DebugPrintf("%d is a null & void resource number\n", res);
+ debugPrintf("%d is a null & void resource number\n", res);
return true;
}
@@ -413,40 +413,40 @@ bool Debugger::Cmd_ResLook(int argc, const char **argv) {
switch (type) {
case ANIMATION_FILE:
- DebugPrintf("<anim> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<anim> %s\n", _vm->_resman->fetchName(res));
break;
case SCREEN_FILE:
- DebugPrintf("<layer> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<layer> %s\n", _vm->_resman->fetchName(res));
break;
case GAME_OBJECT:
- DebugPrintf("<game object> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<game object> %s\n", _vm->_resman->fetchName(res));
break;
case WALK_GRID_FILE:
- DebugPrintf("<walk grid> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<walk grid> %s\n", _vm->_resman->fetchName(res));
break;
case GLOBAL_VAR_FILE:
- DebugPrintf("<global variables> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<global variables> %s\n", _vm->_resman->fetchName(res));
break;
case PARALLAX_FILE_null:
- DebugPrintf("<parallax file NOT USED!> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<parallax file NOT USED!> %s\n", _vm->_resman->fetchName(res));
break;
case RUN_LIST:
- DebugPrintf("<run list> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<run list> %s\n", _vm->_resman->fetchName(res));
break;
case TEXT_FILE:
- DebugPrintf("<text file> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<text file> %s\n", _vm->_resman->fetchName(res));
break;
case SCREEN_MANAGER:
- DebugPrintf("<screen manager> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<screen manager> %s\n", _vm->_resman->fetchName(res));
break;
case MOUSE_FILE:
- DebugPrintf("<mouse pointer> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<mouse pointer> %s\n", _vm->_resman->fetchName(res));
break;
case ICON_FILE:
- DebugPrintf("<menu icon> %s\n", _vm->_resman->fetchName(res));
+ debugPrintf("<menu icon> %s\n", _vm->_resman->fetchName(res));
break;
default:
- DebugPrintf("unrecognized fileType %d\n", type);
+ debugPrintf("unrecognized fileType %d\n", type);
break;
}
@@ -458,13 +458,13 @@ bool Debugger::Cmd_CurrentInfo(int argc, const char **argv) {
ScreenInfo *screenInfo = _vm->_screen->getScreenInfo();
if (screenInfo->background_layer_id) {
- DebugPrintf("background layer id %d\n", screenInfo->background_layer_id);
- DebugPrintf("%d wide, %d high\n", screenInfo->screen_wide, screenInfo->screen_deep);
- DebugPrintf("%d normal layers\n", screenInfo->number_of_layers);
+ debugPrintf("background layer id %d\n", screenInfo->background_layer_id);
+ debugPrintf("%d wide, %d high\n", screenInfo->screen_wide, screenInfo->screen_deep);
+ debugPrintf("%d normal layers\n", screenInfo->number_of_layers);
Cmd_RunList(argc, argv);
} else
- DebugPrintf("No screen\n");
+ debugPrintf("No screen\n");
return true;
}
@@ -476,26 +476,26 @@ bool Debugger::Cmd_RunList(int argc, const char **argv) {
readS.seek(ResHeader::size());
- DebugPrintf("Runlist number %d\n", runList);
+ debugPrintf("Runlist number %d\n", runList);
while (1) {
uint32 res = readS.readUint32LE();
if (!res)
break;
- DebugPrintf("%d %s\n", res, _vm->_resman->fetchName(res));
+ debugPrintf("%d %s\n", res, _vm->_resman->fetchName(res));
}
_vm->_resman->closeResource(runList);
} else
- DebugPrintf("No run list set\n");
+ debugPrintf("No run list set\n");
return true;
}
bool Debugger::Cmd_Kill(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s number\n", argv[0]);
+ debugPrintf("Usage: %s number\n", argv[0]);
return true;
}
@@ -503,7 +503,7 @@ bool Debugger::Cmd_Kill(int argc, const char **argv) {
uint32 numResFiles = _vm->_resman->getNumResFiles();
if (res < 0 || res >= (int)numResFiles) {
- DebugPrintf("Illegal resource %d. There are %d resources, 0-%d.\n",
+ debugPrintf("Illegal resource %d. There are %d resources, 0-%d.\n",
res, numResFiles, numResFiles - 1);
return true;
}
@@ -511,22 +511,22 @@ bool Debugger::Cmd_Kill(int argc, const char **argv) {
Resource *resList = _vm->_resman->getResList();
if (!resList[res].ptr) {
- DebugPrintf("Resource %d is not in memory\n", res);
+ debugPrintf("Resource %d is not in memory\n", res);
return true;
}
if (resList[res].refCount) {
- DebugPrintf("Resource %d is open - cannot remove\n", res);
+ debugPrintf("Resource %d is open - cannot remove\n", res);
return true;
}
_vm->_resman->remove(res);
- DebugPrintf("Trashed %d\n", res);
+ debugPrintf("Trashed %d\n", res);
return true;
}
bool Debugger::Cmd_Nuke(int argc, const char **argv) {
- DebugPrintf("Killing all resources except variable file and player object\n");
+ debugPrintf("Killing all resources except variable file and player object\n");
_vm->_resman->killAll(true);
return true;
}
@@ -540,7 +540,7 @@ bool Debugger::Cmd_Var(int argc, const char **argv) {
varSet(atoi(argv[1]), atoi(argv[2]));
break;
default:
- DebugPrintf("Usage: %s number value\n", argv[0]);
+ debugPrintf("Usage: %s number value\n", argv[0]);
break;
}
@@ -554,10 +554,10 @@ bool Debugger::Cmd_Rect(int argc, const char **argv) {
if (_definingRectangles) {
_vm->setInputEventFilter(filter & ~(RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP));
- DebugPrintf("Mouse rectangles enabled\n");
+ debugPrintf("Mouse rectangles enabled\n");
} else {
_vm->setInputEventFilter(filter | RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP);
- DebugPrintf("Mouse rectangles disabled\n");
+ debugPrintf("Mouse rectangles disabled\n");
}
_draggingRectangle = 0;
@@ -575,7 +575,7 @@ bool Debugger::Cmd_DebugOn(int argc, const char **argv) {
_displayMouseMarker = true;
_displayPlayerMarker = true;
_displayTextNumbers = true;
- DebugPrintf("Enabled all on-screen debug info\n");
+ debugPrintf("Enabled all on-screen debug info\n");
return true;
}
@@ -585,7 +585,7 @@ bool Debugger::Cmd_DebugOff(int argc, const char **argv) {
_displayMouseMarker = false;
_displayPlayerMarker = false;
_displayTextNumbers = false;
- DebugPrintf("Disabled all on-screen debug info\n");
+ debugPrintf("Disabled all on-screen debug info\n");
return true;
}
@@ -593,9 +593,9 @@ bool Debugger::Cmd_SaveRest(int argc, const char **argv) {
_testingSnR = !_testingSnR;
if (_testingSnR)
- DebugPrintf("Enabled S&R logic_script stability checking\n");
+ debugPrintf("Enabled S&R logic_script stability checking\n");
else
- DebugPrintf("Disabled S&R logic_script stability checking\n");
+ debugPrintf("Disabled S&R logic_script stability checking\n");
return true;
}
@@ -606,13 +606,13 @@ bool Debugger::Cmd_TimeOn(int argc, const char **argv) {
else if (_startTime == 0)
_startTime = _vm->_system->getMillis();
_displayTime = true;
- DebugPrintf("Timer display on\n");
+ debugPrintf("Timer display on\n");
return true;
}
bool Debugger::Cmd_TimeOff(int argc, const char **argv) {
_displayTime = false;
- DebugPrintf("Timer display off\n");
+ debugPrintf("Timer display off\n");
return true;
}
@@ -620,9 +620,9 @@ bool Debugger::Cmd_Text(int argc, const char **argv) {
_displayTextNumbers = !_displayTextNumbers;
if (_displayTextNumbers)
- DebugPrintf("Text numbers on\n");
+ debugPrintf("Text numbers on\n");
else
- DebugPrintf("Text numbers off\n");
+ debugPrintf("Text numbers off\n");
return true;
}
@@ -632,7 +632,7 @@ bool Debugger::Cmd_ShowVar(int argc, const char **argv) {
int32 varNo;
if (argc != 2) {
- DebugPrintf("Usage: %s number\n", argv[0]);
+ debugPrintf("Usage: %s number\n", argv[0]);
return true;
}
@@ -649,11 +649,11 @@ bool Debugger::Cmd_ShowVar(int argc, const char **argv) {
if (_showVar[showVarNo] == 0) {
// empty slot - add it to the list at this slot
_showVar[showVarNo] = varNo;
- DebugPrintf("var(%d) added to the watch-list\n", varNo);
+ debugPrintf("var(%d) added to the watch-list\n", varNo);
} else
- DebugPrintf("var(%d) already in the watch-list!\n", varNo);
+ debugPrintf("var(%d) already in the watch-list!\n", varNo);
} else
- DebugPrintf("Sorry - no more allowed - hide one or extend the system watch-list\n");
+ debugPrintf("Sorry - no more allowed - hide one or extend the system watch-list\n");
return true;
}
@@ -663,7 +663,7 @@ bool Debugger::Cmd_HideVar(int argc, const char **argv) {
int32 varNo;
if (argc != 2) {
- DebugPrintf("Usage: %s number\n", argv[0]);
+ debugPrintf("Usage: %s number\n", argv[0]);
return true;
}
@@ -676,9 +676,9 @@ bool Debugger::Cmd_HideVar(int argc, const char **argv) {
if (showVarNo < MAX_SHOWVARS) {
// We've found 'varNo' in the list - clear this slot
_showVar[showVarNo] = 0;
- DebugPrintf("var(%d) removed from watch-list\n", varNo);
+ debugPrintf("var(%d) removed from watch-list\n", varNo);
} else
- DebugPrintf("Sorry - can't find var(%d) in the list\n", varNo);
+ debugPrintf("Sorry - can't find var(%d) in the list\n", varNo);
return true;
}
@@ -687,13 +687,13 @@ bool Debugger::Cmd_Version(int argc, const char **argv) {
// This function used to print more information, but nothing we
// particularly care about.
- DebugPrintf("\"Broken Sword II\" (c) Revolution Software 1997.\n");
+ debugPrintf("\"Broken Sword II\" (c) Revolution Software 1997.\n");
return true;
}
bool Debugger::Cmd_AnimTest(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s value\n", argv[0]);
+ debugPrintf("Usage: %s value\n", argv[0]);
return true;
}
@@ -703,13 +703,13 @@ bool Debugger::Cmd_AnimTest(int argc, const char **argv) {
// Same as typing "VAR 912 <value>" at the console
varSet(912, atoi(argv[1]));
- DebugPrintf("Setting flag 'system_testing_anims'\n");
+ debugPrintf("Setting flag 'system_testing_anims'\n");
return true;
}
bool Debugger::Cmd_TextTest(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s value\n", argv[0]);
+ debugPrintf("Usage: %s value\n", argv[0]);
return true;
}
@@ -721,14 +721,14 @@ bool Debugger::Cmd_TextTest(int argc, const char **argv) {
_displayTextNumbers = true;
- DebugPrintf("Setting flag 'system_testing_text'\n");
- DebugPrintf("Text numbers on\n");
+ debugPrintf("Setting flag 'system_testing_text'\n");
+ debugPrintf("Text numbers on\n");
return true;
}
bool Debugger::Cmd_LineTest(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Usage: %s value1 value2\n", argv[0]);
+ debugPrintf("Usage: %s value1 value2\n", argv[0]);
return true;
}
@@ -743,24 +743,24 @@ bool Debugger::Cmd_LineTest(int argc, const char **argv) {
_displayTextNumbers = true;
- DebugPrintf("Setting flag 'system_testing_text'\n");
- DebugPrintf("Setting flag 'system_test_line_no'\n");
- DebugPrintf("Text numbers on\n");
+ debugPrintf("Setting flag 'system_testing_text'\n");
+ debugPrintf("Setting flag 'system_test_line_no'\n");
+ debugPrintf("Text numbers on\n");
return true;
}
bool Debugger::Cmd_Events(int argc, const char **argv) {
EventUnit *eventList = _vm->_logic->getEventList();
- DebugPrintf("EVENT LIST:\n");
+ debugPrintf("EVENT LIST:\n");
for (uint32 i = 0; i < MAX_events; i++) {
if (eventList[i].id) {
uint32 target = eventList[i].id;
uint32 script = eventList[i].interact_id;
- DebugPrintf("slot %2d: id = %s (%d)\n", i, _vm->_resman->fetchName(target), target);
- DebugPrintf(" script = %s (%d) pos %d\n", _vm->_resman->fetchName(script / 65536), script / 65536, script % 65536);
+ debugPrintf("slot %2d: id = %s (%d)\n", i, _vm->_resman->fetchName(target), target);
+ debugPrintf(" script = %s (%d) pos %d\n", _vm->_resman->fetchName(script / 65536), script / 65536, script % 65536);
}
}
@@ -771,28 +771,28 @@ bool Debugger::Cmd_Sfx(int argc, const char **argv) {
_vm->_wantSfxDebug = !_vm->_wantSfxDebug;
if (_vm->_wantSfxDebug)
- DebugPrintf("SFX logging activated\n");
+ debugPrintf("SFX logging activated\n");
else
- DebugPrintf("SFX logging deactivated\n");
+ debugPrintf("SFX logging deactivated\n");
return true;
}
bool Debugger::Cmd_English(int argc, const char **argv) {
_vm->initializeFontResourceFlags(DEFAULT_TEXT);
- DebugPrintf("Default fonts selected\n");
+ debugPrintf("Default fonts selected\n");
return true;
}
bool Debugger::Cmd_Finnish(int argc, const char **argv) {
_vm->initializeFontResourceFlags(FINNISH_TEXT);
- DebugPrintf("Finnish fonts selected\n");
+ debugPrintf("Finnish fonts selected\n");
return true;
}
bool Debugger::Cmd_Polish(int argc, const char **argv) {
_vm->initializeFontResourceFlags(POLISH_TEXT);
- DebugPrintf("Polish fonts selected\n");
+ debugPrintf("Polish fonts selected\n");
return true;
}
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index a056164..44027fd 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -38,7 +38,7 @@
#include "sword2/screen.h"
#include "sword2/sound.h"
-#define Debug_Printf _vm->_debugger->DebugPrintf
+#define Debug_Printf _vm->_debugger->debugPrintf
namespace Sword2 {
diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp
index aea33e9..1e1687b 100644
--- a/engines/sword2/sound.cpp
+++ b/engines/sword2/sound.cpp
@@ -49,7 +49,7 @@
#include "audio/decoders/wave.h"
#include "audio/decoders/xa.h"
-#define Debug_Printf _vm->_debugger->DebugPrintf
+#define Debug_Printf _vm->_debugger->debugPrintf
namespace Sword2 {
diff --git a/engines/teenagent/console.cpp b/engines/teenagent/console.cpp
index 13d5c68..294b9f9 100644
--- a/engines/teenagent/console.cpp
+++ b/engines/teenagent/console.cpp
@@ -37,13 +37,13 @@ Console::Console(TeenAgentEngine *engine) : _engine(engine) {
bool Console::enableObject(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("usage: %s object_id [scene_id]\n", argv[0]);
+ debugPrintf("usage: %s object_id [scene_id]\n", argv[0]);
return true;
}
int id = atoi(argv[1]);
if (id < 0) {
- DebugPrintf("object id %d is invalid\n", id);
+ debugPrintf("object id %d is invalid\n", id);
return true;
}
@@ -51,7 +51,7 @@ bool Console::enableObject(int argc, const char **argv) {
if (argc > 2) {
scene_id = atoi(argv[2]);
if (scene_id < 0) {
- DebugPrintf("scene id %d is invalid\n", scene_id);
+ debugPrintf("scene id %d is invalid\n", scene_id);
return true;
}
}
@@ -66,20 +66,20 @@ bool Console::enableObject(int argc, const char **argv) {
bool Console::setOns(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("usage: %s index(0-3) value [scene_id]\n", argv[0]);
+ debugPrintf("usage: %s index(0-3) value [scene_id]\n", argv[0]);
return true;
}
int index = atoi(argv[1]);
if (index < 0 || index > 3) {
- DebugPrintf("index %d is invalid\n", index);
+ debugPrintf("index %d is invalid\n", index);
return true;
}
int value = 0;
value = atoi(argv[2]);
if (value < 0) {
- DebugPrintf("invalid value\n");
+ debugPrintf("invalid value\n");
return true;
}
@@ -87,7 +87,7 @@ bool Console::setOns(int argc, const char **argv) {
if (argc > 3) {
scene_id = atoi(argv[3]);
if (scene_id < 0) {
- DebugPrintf("scene id %d is invalid\n", scene_id);
+ debugPrintf("scene id %d is invalid\n", scene_id);
return true;
}
}
@@ -98,13 +98,13 @@ bool Console::setOns(int argc, const char **argv) {
bool Console::setMusic(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("usage: %s index(1-11)\n", argv[0]);
+ debugPrintf("usage: %s index(1-11)\n", argv[0]);
return true;
}
int index = atoi(argv[1]);
if (index <= 0 || index > 11) {
- DebugPrintf("invalid value\n");
+ debugPrintf("invalid value\n");
return true;
}
@@ -114,14 +114,14 @@ bool Console::setMusic(int argc, const char **argv) {
bool Console::playAnimation(int argc, const char **argv) {
if (argc < 3) {
- DebugPrintf("usage: %s id slot(0-3)\n", argv[0]);
+ debugPrintf("usage: %s id slot(0-3)\n", argv[0]);
return true;
}
int id = atoi(argv[1]);
int slot = atoi(argv[2]);
if (id < 0 || slot < 0 || slot > 3) {
- DebugPrintf("invalid slot or animation id\n");
+ debugPrintf("invalid slot or animation id\n");
return true;
}
@@ -131,13 +131,13 @@ bool Console::playAnimation(int argc, const char **argv) {
bool Console::playActorAnimation(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("usage: %s id\n", argv[0]);
+ debugPrintf("usage: %s id\n", argv[0]);
return true;
}
int id = atoi(argv[1]);
if (id < 0) {
- DebugPrintf("invalid animation id\n");
+ debugPrintf("invalid animation id\n");
return true;
}
@@ -147,18 +147,18 @@ bool Console::playActorAnimation(int argc, const char **argv) {
bool Console::call(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("usage: %s 0xHEXADDR\n", argv[0]);
+ debugPrintf("usage: %s 0xHEXADDR\n", argv[0]);
return true;
}
uint addr;
if (sscanf(argv[1], "0x%x", &addr) != 1) {
- DebugPrintf("invalid address\n");
+ debugPrintf("invalid address\n");
return true;
}
if (!_engine->processCallback(addr))
- DebugPrintf("calling callback %04x failed\n", addr);
+ debugPrintf("calling callback %04x failed\n", addr);
return true;
}
diff --git a/engines/tinsel/debugger.cpp b/engines/tinsel/debugger.cpp
index 45e3a05..ab2e0f1 100644
--- a/engines/tinsel/debugger.cpp
+++ b/engines/tinsel/debugger.cpp
@@ -74,8 +74,8 @@ Console::~Console() {
bool Console::cmd_item(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("%s item_number\n", argv[0]);
- DebugPrintf("Sets the currently active 'held' item\n");
+ debugPrintf("%s item_number\n", argv[0]);
+ debugPrintf("Sets the currently active 'held' item\n");
return true;
}
@@ -86,14 +86,14 @@ bool Console::cmd_item(int argc, const char **argv) {
bool Console::cmd_scene(int argc, const char **argv) {
if (argc < 1 || argc > 3) {
- DebugPrintf("%s [scene_number [entry number]]\n", argv[0]);
- DebugPrintf("If no parameters are given, prints the current scene.\n");
- DebugPrintf("Otherwise changes to the specified scene number. Entry number defaults to 1 if none provided\n");
+ debugPrintf("%s [scene_number [entry number]]\n", argv[0]);
+ debugPrintf("If no parameters are given, prints the current scene.\n");
+ debugPrintf("Otherwise changes to the specified scene number. Entry number defaults to 1 if none provided\n");
return true;
}
if (argc == 1) {
- DebugPrintf("Current scene is %d\n", GetSceneHandle() >> SCNHANDLE_SHIFT);
+ debugPrintf("Current scene is %d\n", GetSceneHandle() >> SCNHANDLE_SHIFT);
return true;
}
@@ -106,15 +106,15 @@ bool Console::cmd_scene(int argc, const char **argv) {
bool Console::cmd_music(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("%s track_number or %s -offset\n", argv[0], argv[0]);
- DebugPrintf("Plays the MIDI track number provided, or the offset inside midi.dat\n");
- DebugPrintf("A positive number signifies a track number, whereas a negative signifies an offset\n");
+ debugPrintf("%s track_number or %s -offset\n", argv[0], argv[0]);
+ debugPrintf("Plays the MIDI track number provided, or the offset inside midi.dat\n");
+ debugPrintf("A positive number signifies a track number, whereas a negative signifies an offset\n");
return true;
}
int param = strToInt(argv[1]);
if (param == 0) {
- DebugPrintf("Track number/offset can't be 0!\n");
+ debugPrintf("Track number/offset can't be 0!\n");
} else if (param > 0) {
// Track provided
PlayMidiSequence(GetTrackOffset(param - 1), false);
@@ -128,8 +128,8 @@ bool Console::cmd_music(int argc, const char **argv) {
bool Console::cmd_sound(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("%s id\n", argv[0]);
- DebugPrintf("Plays the sound with the given ID\n");
+ debugPrintf("%s id\n", argv[0]);
+ debugPrintf("Plays the sound with the given ID\n");
return true;
}
@@ -140,7 +140,7 @@ bool Console::cmd_sound(int argc, const char **argv) {
else
_vm->_sound->playSample(id, 0, false, 0, 0, PRIORITY_TALK, Audio::Mixer::kSpeechSoundType);
} else {
- DebugPrintf("Sample %d does not exist!\n", id);
+ debugPrintf("Sample %d does not exist!\n", id);
}
return true;
@@ -148,15 +148,15 @@ bool Console::cmd_sound(int argc, const char **argv) {
bool Console::cmd_string(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("%s id\n", argv[0]);
- DebugPrintf("Prints the string with the given ID\n");
+ debugPrintf("%s id\n", argv[0]);
+ debugPrintf("Prints the string with the given ID\n");
return true;
}
char tmp[TBUFSZ];
int id = strToInt(argv[1]);
LoadStringRes(id, tmp, TBUFSZ);
- DebugPrintf("%s\n", tmp);
+ debugPrintf("%s\n", tmp);
return true;
}
diff --git a/engines/toltecs/console.cpp b/engines/toltecs/console.cpp
index f84a8e3..5dcd923 100644
--- a/engines/toltecs/console.cpp
+++ b/engines/toltecs/console.cpp
@@ -40,10 +40,10 @@ Console::~Console() {
bool Console::Cmd_Room(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Current room number is %d\n", _vm->_sceneResIndex);
+ debugPrintf("Current room number is %d\n", _vm->_sceneResIndex);
#if 0
- DebugPrintf("Calling this command with the room number changes the room\n");
- DebugPrintf("WARNING: It's a bad idea to warp to rooms with this, as the room object scripts are not loaded\n");
+ debugPrintf("Calling this command with the room number changes the room\n");
+ debugPrintf("WARNING: It's a bad idea to warp to rooms with this, as the room object scripts are not loaded\n");
#endif
return true;
#if 0
@@ -65,13 +65,13 @@ bool Console::Cmd_Room(int argc, const char **argv) {
bool Console::Cmd_Dump(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: dump <resource number>\n");
+ debugPrintf("Usage: dump <resource number>\n");
return true;
}
int resNum = atoi(argv[1]);
_vm->_arc->dump(resNum);
- DebugPrintf("Resource %d has been dumped to disk\n", resNum);
+ debugPrintf("Resource %d has been dumped to disk\n", resNum);
return true;
}
diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp
index 22c218a..2a90868 100644
--- a/engines/tony/debugger.cpp
+++ b/engines/tony/debugger.cpp
@@ -82,13 +82,13 @@ void DebugChangeScene(CORO_PARAM, const void *param) {
*/
bool Debugger::Cmd_Scene(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: %s <scene number> [<x> <y>]\n", argv[0]);
+ debugPrintf("Usage: %s <scene number> [<x> <y>]\n", argv[0]);
return true;
}
int sceneNumber = strToInt(argv[1]);
if (sceneNumber >= g_vm->_theBoxes.getLocBoxesCount()) {
- DebugPrintf("Invalid scene\n");
+ debugPrintf("Invalid scene\n");
return true;
}
@@ -118,7 +118,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
*/
bool Debugger::Cmd_DirtyRects(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage; %s [on | off]\n", argv[0]);
+ debugPrintf("Usage; %s [on | off]\n", argv[0]);
return true;
} else {
g_vm->_window.showDirtyRects(strcmp(argv[1], "on") == 0);
diff --git a/engines/touche/console.cpp b/engines/touche/console.cpp
index c427203..2cd8572 100644
--- a/engines/touche/console.cpp
+++ b/engines/touche/console.cpp
@@ -35,7 +35,7 @@ ToucheConsole::~ToucheConsole() {
bool ToucheConsole::Cmd_StartMusic(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: startMusic <num>\n");
+ debugPrintf("Usage: startMusic <num>\n");
return true;
}
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index 5a520b0..b014e4e 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -66,7 +66,7 @@ static int strToInt(const char *s) {
*/
bool Debugger::Cmd_Scene(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("Usage: %s <scene number> [prior scene #]\n", argv[0]);
+ debugPrintf("Usage: %s <scene number> [prior scene #]\n", argv[0]);
return true;
}
@@ -82,7 +82,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
*/
bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
@@ -120,8 +120,8 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
// Mark the scene as requiring a full redraw
g_globals->_paneRefreshFlag[0] = 2;
- DebugPrintf("Total regions = %d\n", g_globals->_walkRegions._regionList.size());
- DebugPrintf("%s\n", regionsDesc.c_str());
+ debugPrintf("Total regions = %d\n", g_globals->_walkRegions._regionList.size());
+ debugPrintf("%s\n", regionsDesc.c_str());
return false;
}
@@ -172,8 +172,8 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) {
// Mark the scene as requiring a full redraw
g_globals->_paneRefreshFlag[0] = 2;
- DebugPrintf("Total regions = %d\n", count);
- DebugPrintf("%s", regionsDesc.c_str());
+ debugPrintf("Total regions = %d\n", count);
+ debugPrintf("%s", regionsDesc.c_str());
return true;
}
@@ -225,8 +225,8 @@ bool Debugger::Cmd_SceneRegions(int argc, const char **argv) {
// Mark the scene as requiring a full redraw
g_globals->_paneRefreshFlag[0] = 2;
- DebugPrintf("Total regions = %d\n", count);
- DebugPrintf("%s", regionsDesc.c_str());
+ debugPrintf("Total regions = %d\n", count);
+ debugPrintf("%s", regionsDesc.c_str());
return true;
}
@@ -237,7 +237,7 @@ bool Debugger::Cmd_SceneRegions(int argc, const char **argv) {
bool Debugger::Cmd_SetFlag(int argc, const char **argv) {
// Check for a flag to set
if (argc != 2) {
- DebugPrintf("Usage: %s <flag number>\n", argv[0]);
+ debugPrintf("Usage: %s <flag number>\n", argv[0]);
return true;
}
@@ -252,12 +252,12 @@ bool Debugger::Cmd_SetFlag(int argc, const char **argv) {
bool Debugger::Cmd_GetFlag(int argc, const char **argv) {
// Check for an flag to display
if (argc != 2) {
- DebugPrintf("Usage: %s <flag number>\n", argv[0]);
+ debugPrintf("Usage: %s <flag number>\n", argv[0]);
return true;
}
int flagNum = strToInt(argv[1]);
- DebugPrintf("Value: %d\n", g_globals->getFlag(flagNum));
+ debugPrintf("Value: %d\n", g_globals->getFlag(flagNum));
return true;
}
@@ -267,7 +267,7 @@ bool Debugger::Cmd_GetFlag(int argc, const char **argv) {
bool Debugger::Cmd_ClearFlag(int argc, const char **argv) {
// Check for a flag to clear
if (argc != 2) {
- DebugPrintf("Usage: %s <flag number>\n", argv[0]);
+ debugPrintf("Usage: %s <flag number>\n", argv[0]);
return true;
}
@@ -332,7 +332,7 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
*/
bool Debugger::Cmd_Sound(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Usage: %s <sound number>\n", argv[0]);
+ debugPrintf("Usage: %s <sound number>\n", argv[0]);
return true;
}
@@ -345,7 +345,7 @@ bool Debugger::Cmd_Sound(int argc, const char **argv) {
* Activate internal debugger, when available
*/
bool Debugger::Cmd_SetDebug(int argc, const char **argv) {
- DebugPrintf("Not available in this game\n");
+ debugPrintf("Not available in this game\n");
return true;
}
@@ -353,12 +353,12 @@ bool Debugger::Cmd_SetDebug(int argc, const char **argv) {
* This command lists the objects available, and their ID
*/
bool DemoDebugger::Cmd_ListObjects(int argc, const char **argv) {
- DebugPrintf("Not available in Demo\n");
+ debugPrintf("Not available in Demo\n");
return true;
}
bool DemoDebugger::Cmd_MoveObject(int argc, const char **argv) {
- DebugPrintf("Not available in Demo\n");
+ debugPrintf("Not available in Demo\n");
return true;
}
@@ -367,44 +367,44 @@ bool DemoDebugger::Cmd_MoveObject(int argc, const char **argv) {
*/
bool RingworldDebugger::Cmd_ListObjects(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
- DebugPrintf("Available objects for this game are:\n");
- DebugPrintf("0 - Stunner\n");
- DebugPrintf("1 - Scanner\n");
- DebugPrintf("2 - Stasis Box\n");
- DebugPrintf("3 - Info Disk\n");
- DebugPrintf("4 - Stasis Negator\n");
- DebugPrintf("5 - Key Device\n");
- DebugPrintf("6 - Medkit\n");
- DebugPrintf("7 - Ladder\n");
- DebugPrintf("8 - Rope\n");
- DebugPrintf("9 - Key\n");
- DebugPrintf("10 - Translator\n");
- DebugPrintf("11 - Ale\n");
- DebugPrintf("12 - Paper\n");
- DebugPrintf("13 - Waldos\n");
- DebugPrintf("14 - Stasis Box 2\n");
- DebugPrintf("15 - Ring\n");
- DebugPrintf("16 - Cloak\n");
- DebugPrintf("17 - Tunic\n");
- DebugPrintf("18 - Candle\n");
- DebugPrintf("19 - Straw\n");
- DebugPrintf("20 - Scimitar\n");
- DebugPrintf("21 - Sword\n");
- DebugPrintf("22 - Helmet\n");
- DebugPrintf("23 - Items\n");
- DebugPrintf("24 - Concentrator\n");
- DebugPrintf("25 - Nullifier\n");
- DebugPrintf("26 - Peg\n");
- DebugPrintf("27 - Vial\n");
- DebugPrintf("28 - Jacket\n");
- DebugPrintf("29 - Tunic 2\n");
- DebugPrintf("30 - Bone\n");
- DebugPrintf("31 - Empty Jar\n");
- DebugPrintf("32 - Jar\n");
+ debugPrintf("Available objects for this game are:\n");
+ debugPrintf("0 - Stunner\n");
+ debugPrintf("1 - Scanner\n");
+ debugPrintf("2 - Stasis Box\n");
+ debugPrintf("3 - Info Disk\n");
+ debugPrintf("4 - Stasis Negator\n");
+ debugPrintf("5 - Key Device\n");
+ debugPrintf("6 - Medkit\n");
+ debugPrintf("7 - Ladder\n");
+ debugPrintf("8 - Rope\n");
+ debugPrintf("9 - Key\n");
+ debugPrintf("10 - Translator\n");
+ debugPrintf("11 - Ale\n");
+ debugPrintf("12 - Paper\n");
+ debugPrintf("13 - Waldos\n");
+ debugPrintf("14 - Stasis Box 2\n");
+ debugPrintf("15 - Ring\n");
+ debugPrintf("16 - Cloak\n");
+ debugPrintf("17 - Tunic\n");
+ debugPrintf("18 - Candle\n");
+ debugPrintf("19 - Straw\n");
+ debugPrintf("20 - Scimitar\n");
+ debugPrintf("21 - Sword\n");
+ debugPrintf("22 - Helmet\n");
+ debugPrintf("23 - Items\n");
+ debugPrintf("24 - Concentrator\n");
+ debugPrintf("25 - Nullifier\n");
+ debugPrintf("26 - Peg\n");
+ debugPrintf("27 - Vial\n");
+ debugPrintf("28 - Jacket\n");
+ debugPrintf("29 - Tunic 2\n");
+ debugPrintf("30 - Bone\n");
+ debugPrintf("31 - Empty Jar\n");
+ debugPrintf("32 - Jar\n");
return true;
}
@@ -414,8 +414,8 @@ bool RingworldDebugger::Cmd_ListObjects(int argc, const char **argv) {
bool RingworldDebugger::Cmd_MoveObject(int argc, const char **argv) {
// Check for a flag to clear
if ((argc < 2) || (argc > 3)){
- DebugPrintf("Usage: %s <object number> [<scene number>]\n", argv[0]);
- DebugPrintf("If no scene is specified, the object will be added to inventory\n");
+ debugPrintf("Usage: %s <object number> [<scene number>]\n", argv[0]);
+ debugPrintf("If no scene is specified, the object will be added to inventory\n");
return true;
}
@@ -525,7 +525,7 @@ bool RingworldDebugger::Cmd_MoveObject(int argc, const char **argv) {
RING_INVENTORY._jar._sceneNumber = sceneNum;
break;
default:
- DebugPrintf("Invalid object Id %s\n", argv[1]);
+ debugPrintf("Invalid object Id %s\n", argv[1]);
break;
}
@@ -537,83 +537,83 @@ bool RingworldDebugger::Cmd_MoveObject(int argc, const char **argv) {
*/
bool BlueForceDebugger::Cmd_ListObjects(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
- DebugPrintf("Available objects for this game are:\n");
- DebugPrintf("1 - INV_COLT45\n");
- DebugPrintf("2 - INV_AMMO_CLIP\n");
- DebugPrintf("3 - INV_SPARE_CLIP\n");
- DebugPrintf("4 - INV_HANDCUFFS\n");
- DebugPrintf("5 - INV_GREENS_GUN\n");
- DebugPrintf("6 - INV_TICKET_BOOK\n");
- DebugPrintf("7 - INV_MIRANDA_CARD\n");
- DebugPrintf("8 - INV_FOREST_RAP\n");
- DebugPrintf("9 - INV_GREEN_ID\n");
- DebugPrintf("10 - INV_BASEBALL_CARD\n");
- DebugPrintf("11 - INV_BOOKING_GREEN\n");
- DebugPrintf("12 - INV_FLARE\n");
- DebugPrintf("13 - INV_COBB_RAP\n");
- DebugPrintf("14 - INV_22_BULLET\n");
- DebugPrintf("15 - INV_AUTO_RIFLE\n");
- DebugPrintf("16 - INV_WIG\n");
- DebugPrintf("17 - INV_FRANKIE_ID\n");
- DebugPrintf("18 - INV_TYRONE_ID\n");
- DebugPrintf("19 - INV_22_SNUB\n");
- DebugPrintf("20 - INV_BOOKING_FRANKIE\n");
- DebugPrintf("21 - INV_BOOKING_GANG\n");
- DebugPrintf("22 - INV_FBI_TELETYPE\n");
- DebugPrintf("23 - INV_DA_NOTE\n");
- DebugPrintf("24 - INV_PRINT_OUT\n");
- DebugPrintf("25 - INV_WAREHOUSE_KEYS\n");
- DebugPrintf("26 - INV_CENTER_PUNCH\n");
- DebugPrintf("27 - INV_TRANQ_GUN\n");
- DebugPrintf("28 - INV_HOOK\n");
- DebugPrintf("29 - INV_RAGS\n");
- DebugPrintf("30 - INV_JAR\n");
- DebugPrintf("31 - INV_SCREWDRIVER\n");
- DebugPrintf("32 - INV_D_FLOPPY\n");
- DebugPrintf("33 - INV_BLANK_DISK\n");
- DebugPrintf("34 - INV_STICK\n");
- DebugPrintf("35 - INV_CRATE1\n");
- DebugPrintf("36 - INV_CRATE2\n");
- DebugPrintf("37 - INV_SHOEBOX\n");
- DebugPrintf("38 - INV_BADGE\n");
- DebugPrintf("39 - INV_RENTAL_COUPON\n");
- DebugPrintf("40 - INV_NICKEL\n");
- DebugPrintf("41 - INV_LYLE_CARD\n");
- DebugPrintf("42 - INV_CARTER_NOTE\n");
- DebugPrintf("43 - INV_MUG_SHOT\n");
- DebugPrintf("44 - INV_CLIPPING\n");
- DebugPrintf("45 - INV_MICROFILM \n");
- DebugPrintf("46 - INV_WAVE_KEYS\n");
- DebugPrintf("47 - INV_RENTAL_KEYS\n");
- DebugPrintf("48 - INV_NAPKIN\n");
- DebugPrintf("49 - INV_DMV_PRINTOUT\n");
- DebugPrintf("50 - INV_FISHING_NET\n");
- DebugPrintf("51 - INV_ID\n");
- DebugPrintf("52 - INV_9MM_BULLETS\n");
- DebugPrintf("53 - INV_SCHEDULE\n");
- DebugPrintf("54 - INV_GRENADES\n");
- DebugPrintf("55 - INV_YELLOW_CORD\n");
- DebugPrintf("56 - INV_HALF_YELLOW_CORD\n");
- DebugPrintf("57 - INV_BLACK_CORD\n");
- DebugPrintf("58 - INV_HALF_BLACK_CORD\n");
- DebugPrintf("59 - INV_WARRANT\n");
- DebugPrintf("60 - INV_JACKET\n");
- DebugPrintf("61 - INV_GREENS_KNIFE\n");
- DebugPrintf("62 - INV_DOG_WHISTLE\n");
- DebugPrintf("63 - INV_AMMO_BELT\n");
- DebugPrintf("64 - INV_CARAVAN_KEY\n");
+ debugPrintf("Available objects for this game are:\n");
+ debugPrintf("1 - INV_COLT45\n");
+ debugPrintf("2 - INV_AMMO_CLIP\n");
+ debugPrintf("3 - INV_SPARE_CLIP\n");
+ debugPrintf("4 - INV_HANDCUFFS\n");
+ debugPrintf("5 - INV_GREENS_GUN\n");
+ debugPrintf("6 - INV_TICKET_BOOK\n");
+ debugPrintf("7 - INV_MIRANDA_CARD\n");
+ debugPrintf("8 - INV_FOREST_RAP\n");
+ debugPrintf("9 - INV_GREEN_ID\n");
+ debugPrintf("10 - INV_BASEBALL_CARD\n");
+ debugPrintf("11 - INV_BOOKING_GREEN\n");
+ debugPrintf("12 - INV_FLARE\n");
+ debugPrintf("13 - INV_COBB_RAP\n");
+ debugPrintf("14 - INV_22_BULLET\n");
+ debugPrintf("15 - INV_AUTO_RIFLE\n");
+ debugPrintf("16 - INV_WIG\n");
+ debugPrintf("17 - INV_FRANKIE_ID\n");
+ debugPrintf("18 - INV_TYRONE_ID\n");
+ debugPrintf("19 - INV_22_SNUB\n");
+ debugPrintf("20 - INV_BOOKING_FRANKIE\n");
+ debugPrintf("21 - INV_BOOKING_GANG\n");
+ debugPrintf("22 - INV_FBI_TELETYPE\n");
+ debugPrintf("23 - INV_DA_NOTE\n");
+ debugPrintf("24 - INV_PRINT_OUT\n");
+ debugPrintf("25 - INV_WAREHOUSE_KEYS\n");
+ debugPrintf("26 - INV_CENTER_PUNCH\n");
+ debugPrintf("27 - INV_TRANQ_GUN\n");
+ debugPrintf("28 - INV_HOOK\n");
+ debugPrintf("29 - INV_RAGS\n");
+ debugPrintf("30 - INV_JAR\n");
+ debugPrintf("31 - INV_SCREWDRIVER\n");
+ debugPrintf("32 - INV_D_FLOPPY\n");
+ debugPrintf("33 - INV_BLANK_DISK\n");
+ debugPrintf("34 - INV_STICK\n");
+ debugPrintf("35 - INV_CRATE1\n");
+ debugPrintf("36 - INV_CRATE2\n");
+ debugPrintf("37 - INV_SHOEBOX\n");
+ debugPrintf("38 - INV_BADGE\n");
+ debugPrintf("39 - INV_RENTAL_COUPON\n");
+ debugPrintf("40 - INV_NICKEL\n");
+ debugPrintf("41 - INV_LYLE_CARD\n");
+ debugPrintf("42 - INV_CARTER_NOTE\n");
+ debugPrintf("43 - INV_MUG_SHOT\n");
+ debugPrintf("44 - INV_CLIPPING\n");
+ debugPrintf("45 - INV_MICROFILM \n");
+ debugPrintf("46 - INV_WAVE_KEYS\n");
+ debugPrintf("47 - INV_RENTAL_KEYS\n");
+ debugPrintf("48 - INV_NAPKIN\n");
+ debugPrintf("49 - INV_DMV_PRINTOUT\n");
+ debugPrintf("50 - INV_FISHING_NET\n");
+ debugPrintf("51 - INV_ID\n");
+ debugPrintf("52 - INV_9MM_BULLETS\n");
+ debugPrintf("53 - INV_SCHEDULE\n");
+ debugPrintf("54 - INV_GRENADES\n");
+ debugPrintf("55 - INV_YELLOW_CORD\n");
+ debugPrintf("56 - INV_HALF_YELLOW_CORD\n");
+ debugPrintf("57 - INV_BLACK_CORD\n");
+ debugPrintf("58 - INV_HALF_BLACK_CORD\n");
+ debugPrintf("59 - INV_WARRANT\n");
+ debugPrintf("60 - INV_JACKET\n");
+ debugPrintf("61 - INV_GREENS_KNIFE\n");
+ debugPrintf("62 - INV_DOG_WHISTLE\n");
+ debugPrintf("63 - INV_AMMO_BELT\n");
+ debugPrintf("64 - INV_CARAVAN_KEY\n");
return true;
}
bool BlueForceDebugger::Cmd_MoveObject(int argc, const char **argv) {
// Check for a flag to clear
if ((argc < 2) || (argc > 3)){
- DebugPrintf("Usage: %s <object number> [<scene number>]\n", argv[0]);
- DebugPrintf("If no scene is specified, the object will be added to inventory\n");
+ debugPrintf("Usage: %s <object number> [<scene number>]\n", argv[0]);
+ debugPrintf("If no scene is specified, the object will be added to inventory\n");
return true;
}
@@ -625,7 +625,7 @@ bool BlueForceDebugger::Cmd_MoveObject(int argc, const char **argv) {
if ((objNum > 0) && (objNum < 65))
BF_INVENTORY.setObjectScene(objNum, sceneNum);
else
- DebugPrintf("Invalid object Id %s\n", argv[1]);
+ debugPrintf("Invalid object Id %s\n", argv[1]);
return true;
}
@@ -635,63 +635,63 @@ bool BlueForceDebugger::Cmd_MoveObject(int argc, const char **argv) {
*/
bool Ringworld2Debugger::Cmd_ListObjects(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
- DebugPrintf("Available objects for this game are:\n");
- DebugPrintf("1 - Scene %d - R2_OPTO_DISK\n", BF_INVENTORY.getObjectScene(1));
- DebugPrintf("2 - Scene %d - R2_READER\n", BF_INVENTORY.getObjectScene(2));
- DebugPrintf("3 - Scene %d - R2_NEGATOR_GUN\n", BF_INVENTORY.getObjectScene(3));
- DebugPrintf("4 - Scene %d - R2_STEPPING_DISKS\n", BF_INVENTORY.getObjectScene(4));
- DebugPrintf("5 - Scene %d - R2_ATTRACTOR_UNIT\n", BF_INVENTORY.getObjectScene(5));
- DebugPrintf("6 - Scene %d - R2_SENSOR_PROBE\n", BF_INVENTORY.getObjectScene(6));
- DebugPrintf("7 - Scene %d - R2_SONIC_STUNNER\n", BF_INVENTORY.getObjectScene(7));
- DebugPrintf("8 - Scene %d - R2_CABLE_HARNESS\n", BF_INVENTORY.getObjectScene(8));
- DebugPrintf("9 - Scene %d - R2_COM_SCANNER\n", BF_INVENTORY.getObjectScene(9));
- DebugPrintf("10 - Scene %d - R2_SPENT_POWER_CAPSULE\n", BF_INVENTORY.getObjectScene(10));
- DebugPrintf("11 - Scene %d - R2_CHARGED_POWER_CAPSULE\n", BF_INVENTORY.getObjectScene(11));
- DebugPrintf("12 - Scene %d - R2_AEROSOL\n", BF_INVENTORY.getObjectScene(12));
- DebugPrintf("13 - Scene %d - R2_REMOTE_CONTROL\n", BF_INVENTORY.getObjectScene(13));
- DebugPrintf("14 - Scene %d - R2_OPTICAL_FIBER\n", BF_INVENTORY.getObjectScene(14));
- DebugPrintf("15 - Scene %d - R2_CLAMP\n", BF_INVENTORY.getObjectScene(15));
- DebugPrintf("16 - Scene %d - R2_ATTRACTOR_CABLE_HARNESS\n", BF_INVENTORY.getObjectScene(16));
- DebugPrintf("17 - Scene %d - R2_FUEL_CELL\n", BF_INVENTORY.getObjectScene(17));
- DebugPrintf("18 - Scene %d - R2_GYROSCOPE\n", BF_INVENTORY.getObjectScene(18));
- DebugPrintf("19 - Scene %d - R2_AIRBAG\n", BF_INVENTORY.getObjectScene(19));
- DebugPrintf("20 - Scene %d - R2_REBREATHER_TANK\n", BF_INVENTORY.getObjectScene(20));
- DebugPrintf("21 - Scene %d - R2_RESERVE_REBREATHER_TANK\n", BF_INVENTORY.getObjectScene(21));
- DebugPrintf("22 - Scene %d - R2_GUIDANCE_MODULE\n", BF_INVENTORY.getObjectScene(22));
- DebugPrintf("23 - Scene %d - R2_THRUSTER_VALVE\n", BF_INVENTORY.getObjectScene(23));
- DebugPrintf("24 - Scene %d - R2_BALLOON_BACKPACK\n", BF_INVENTORY.getObjectScene(24));
- DebugPrintf("25 - Scene %d - R2_RADAR_MECHANISM\n", BF_INVENTORY.getObjectScene(25));
- DebugPrintf("26 - Scene %d - R2_JOYSTICK\n", BF_INVENTORY.getObjectScene(26));
- DebugPrintf("27 - Scene %d - R2_IGNITOR\n", BF_INVENTORY.getObjectScene(27));
- DebugPrintf("28 - Scene %d - R2_DIAGNOSTICS_DISPLAY\n", BF_INVENTORY.getObjectScene(28));
- DebugPrintf("29 - Scene %d - R2_GLASS_DOME\n", BF_INVENTORY.getObjectScene(29));
- DebugPrintf("30 - Scene %d - R2_WICK_LAMP\n", BF_INVENTORY.getObjectScene(30));
- DebugPrintf("31 - Scene %d - R2_SCRITH_KEY\n", BF_INVENTORY.getObjectScene(31));
- DebugPrintf("32 - Scene %d - R2_TANNER_MASK\n", BF_INVENTORY.getObjectScene(32));
- DebugPrintf("33 - Scene %d - R2_PURE_GRAIN_ALCOHOL\n", BF_INVENTORY.getObjectScene(33));
- DebugPrintf("34 - Scene %d - R2_SAPPHIRE_BLUE\n", BF_INVENTORY.getObjectScene(34));
- DebugPrintf("35 - Scene %d - R2_ANCIENT_SCROLLS\n", BF_INVENTORY.getObjectScene(35));
- DebugPrintf("36 - Scene %d - R2_FLUTE\n", BF_INVENTORY.getObjectScene(36));
- DebugPrintf("37 - Scene %d - R2_GUNPOWDER\n", BF_INVENTORY.getObjectScene(37));
- DebugPrintf("38 - Scene %d - R2_NONAME\n", BF_INVENTORY.getObjectScene(38));
- DebugPrintf("39 - Scene %d - R2_COM_SCANNER_2\n", BF_INVENTORY.getObjectScene(39));
- DebugPrintf("40 - Scene %d - R2_SUPERCONDUCTOR_WIRE\n", BF_INVENTORY.getObjectScene(40));
- DebugPrintf("41 - Scene %d - R2_PILLOW\n", BF_INVENTORY.getObjectScene(41));
- DebugPrintf("42 - Scene %d - R2_FOOD_TRAY\n", BF_INVENTORY.getObjectScene(42));
- DebugPrintf("43 - Scene %d - R2_LASER_HACKSAW\n", BF_INVENTORY.getObjectScene(43));
- DebugPrintf("44 - Scene %d - R2_PHOTON_STUNNER\n", BF_INVENTORY.getObjectScene(44));
- DebugPrintf("45 - Scene %d - R2_BATTERY\n", BF_INVENTORY.getObjectScene(45));
- DebugPrintf("46 - Scene %d - R2_SOAKED_FACEMASK\n", BF_INVENTORY.getObjectScene(46));
- DebugPrintf("47 - Scene %d - R2_LIGHT_BULB\n", BF_INVENTORY.getObjectScene(47));
- DebugPrintf("48 - Scene %d - R2_ALCOHOL_LAMP\n", BF_INVENTORY.getObjectScene(48));
- DebugPrintf("49 - Scene %d - R2_ALCOHOL_LAMP_2\n", BF_INVENTORY.getObjectScene(49));
- DebugPrintf("50 - Scene %d - R2_ALCOHOL_LAMP_3\n", BF_INVENTORY.getObjectScene(50));
- DebugPrintf("51 - Scene %d - R2_BROKEN_DISPLAY\n", BF_INVENTORY.getObjectScene(51));
- DebugPrintf("52 - Scene %d - R2_TOOLBOX\n", BF_INVENTORY.getObjectScene(52));
+ debugPrintf("Available objects for this game are:\n");
+ debugPrintf("1 - Scene %d - R2_OPTO_DISK\n", BF_INVENTORY.getObjectScene(1));
+ debugPrintf("2 - Scene %d - R2_READER\n", BF_INVENTORY.getObjectScene(2));
+ debugPrintf("3 - Scene %d - R2_NEGATOR_GUN\n", BF_INVENTORY.getObjectScene(3));
+ debugPrintf("4 - Scene %d - R2_STEPPING_DISKS\n", BF_INVENTORY.getObjectScene(4));
+ debugPrintf("5 - Scene %d - R2_ATTRACTOR_UNIT\n", BF_INVENTORY.getObjectScene(5));
+ debugPrintf("6 - Scene %d - R2_SENSOR_PROBE\n", BF_INVENTORY.getObjectScene(6));
+ debugPrintf("7 - Scene %d - R2_SONIC_STUNNER\n", BF_INVENTORY.getObjectScene(7));
+ debugPrintf("8 - Scene %d - R2_CABLE_HARNESS\n", BF_INVENTORY.getObjectScene(8));
+ debugPrintf("9 - Scene %d - R2_COM_SCANNER\n", BF_INVENTORY.getObjectScene(9));
+ debugPrintf("10 - Scene %d - R2_SPENT_POWER_CAPSULE\n", BF_INVENTORY.getObjectScene(10));
+ debugPrintf("11 - Scene %d - R2_CHARGED_POWER_CAPSULE\n", BF_INVENTORY.getObjectScene(11));
+ debugPrintf("12 - Scene %d - R2_AEROSOL\n", BF_INVENTORY.getObjectScene(12));
+ debugPrintf("13 - Scene %d - R2_REMOTE_CONTROL\n", BF_INVENTORY.getObjectScene(13));
+ debugPrintf("14 - Scene %d - R2_OPTICAL_FIBER\n", BF_INVENTORY.getObjectScene(14));
+ debugPrintf("15 - Scene %d - R2_CLAMP\n", BF_INVENTORY.getObjectScene(15));
+ debugPrintf("16 - Scene %d - R2_ATTRACTOR_CABLE_HARNESS\n", BF_INVENTORY.getObjectScene(16));
+ debugPrintf("17 - Scene %d - R2_FUEL_CELL\n", BF_INVENTORY.getObjectScene(17));
+ debugPrintf("18 - Scene %d - R2_GYROSCOPE\n", BF_INVENTORY.getObjectScene(18));
+ debugPrintf("19 - Scene %d - R2_AIRBAG\n", BF_INVENTORY.getObjectScene(19));
+ debugPrintf("20 - Scene %d - R2_REBREATHER_TANK\n", BF_INVENTORY.getObjectScene(20));
+ debugPrintf("21 - Scene %d - R2_RESERVE_REBREATHER_TANK\n", BF_INVENTORY.getObjectScene(21));
+ debugPrintf("22 - Scene %d - R2_GUIDANCE_MODULE\n", BF_INVENTORY.getObjectScene(22));
+ debugPrintf("23 - Scene %d - R2_THRUSTER_VALVE\n", BF_INVENTORY.getObjectScene(23));
+ debugPrintf("24 - Scene %d - R2_BALLOON_BACKPACK\n", BF_INVENTORY.getObjectScene(24));
+ debugPrintf("25 - Scene %d - R2_RADAR_MECHANISM\n", BF_INVENTORY.getObjectScene(25));
+ debugPrintf("26 - Scene %d - R2_JOYSTICK\n", BF_INVENTORY.getObjectScene(26));
+ debugPrintf("27 - Scene %d - R2_IGNITOR\n", BF_INVENTORY.getObjectScene(27));
+ debugPrintf("28 - Scene %d - R2_DIAGNOSTICS_DISPLAY\n", BF_INVENTORY.getObjectScene(28));
+ debugPrintf("29 - Scene %d - R2_GLASS_DOME\n", BF_INVENTORY.getObjectScene(29));
+ debugPrintf("30 - Scene %d - R2_WICK_LAMP\n", BF_INVENTORY.getObjectScene(30));
+ debugPrintf("31 - Scene %d - R2_SCRITH_KEY\n", BF_INVENTORY.getObjectScene(31));
+ debugPrintf("32 - Scene %d - R2_TANNER_MASK\n", BF_INVENTORY.getObjectScene(32));
+ debugPrintf("33 - Scene %d - R2_PURE_GRAIN_ALCOHOL\n", BF_INVENTORY.getObjectScene(33));
+ debugPrintf("34 - Scene %d - R2_SAPPHIRE_BLUE\n", BF_INVENTORY.getObjectScene(34));
+ debugPrintf("35 - Scene %d - R2_ANCIENT_SCROLLS\n", BF_INVENTORY.getObjectScene(35));
+ debugPrintf("36 - Scene %d - R2_FLUTE\n", BF_INVENTORY.getObjectScene(36));
+ debugPrintf("37 - Scene %d - R2_GUNPOWDER\n", BF_INVENTORY.getObjectScene(37));
+ debugPrintf("38 - Scene %d - R2_NONAME\n", BF_INVENTORY.getObjectScene(38));
+ debugPrintf("39 - Scene %d - R2_COM_SCANNER_2\n", BF_INVENTORY.getObjectScene(39));
+ debugPrintf("40 - Scene %d - R2_SUPERCONDUCTOR_WIRE\n", BF_INVENTORY.getObjectScene(40));
+ debugPrintf("41 - Scene %d - R2_PILLOW\n", BF_INVENTORY.getObjectScene(41));
+ debugPrintf("42 - Scene %d - R2_FOOD_TRAY\n", BF_INVENTORY.getObjectScene(42));
+ debugPrintf("43 - Scene %d - R2_LASER_HACKSAW\n", BF_INVENTORY.getObjectScene(43));
+ debugPrintf("44 - Scene %d - R2_PHOTON_STUNNER\n", BF_INVENTORY.getObjectScene(44));
+ debugPrintf("45 - Scene %d - R2_BATTERY\n", BF_INVENTORY.getObjectScene(45));
+ debugPrintf("46 - Scene %d - R2_SOAKED_FACEMASK\n", BF_INVENTORY.getObjectScene(46));
+ debugPrintf("47 - Scene %d - R2_LIGHT_BULB\n", BF_INVENTORY.getObjectScene(47));
+ debugPrintf("48 - Scene %d - R2_ALCOHOL_LAMP\n", BF_INVENTORY.getObjectScene(48));
+ debugPrintf("49 - Scene %d - R2_ALCOHOL_LAMP_2\n", BF_INVENTORY.getObjectScene(49));
+ debugPrintf("50 - Scene %d - R2_ALCOHOL_LAMP_3\n", BF_INVENTORY.getObjectScene(50));
+ debugPrintf("51 - Scene %d - R2_BROKEN_DISPLAY\n", BF_INVENTORY.getObjectScene(51));
+ debugPrintf("52 - Scene %d - R2_TOOLBOX\n", BF_INVENTORY.getObjectScene(52));
return true;
}
@@ -699,8 +699,8 @@ bool Ringworld2Debugger::Cmd_ListObjects(int argc, const char **argv) {
bool Ringworld2Debugger::Cmd_MoveObject(int argc, const char **argv) {
// Check for a flag to clear
if ((argc < 2) || (argc > 3)){
- DebugPrintf("Usage: %s <object number> [<scene number>]\n", argv[0]);
- DebugPrintf("If no scene is specified, the object will be added to inventory\n");
+ debugPrintf("Usage: %s <object number> [<scene number>]\n", argv[0]);
+ debugPrintf("If no scene is specified, the object will be added to inventory\n");
return true;
}
@@ -712,7 +712,7 @@ bool Ringworld2Debugger::Cmd_MoveObject(int argc, const char **argv) {
if ((objNum > 0) && (objNum < 53))
R2_INVENTORY.setObjectScene(objNum, sceneNum);
else
- DebugPrintf("Invalid object Id %s\n", argv[1]);
+ debugPrintf("Invalid object Id %s\n", argv[1]);
return true;
}
@@ -722,7 +722,7 @@ bool Ringworld2Debugger::Cmd_MoveObject(int argc, const char **argv) {
*/
bool Ringworld2Debugger::Cmd_SetDebug(int argc, const char **argv) {
if (argc != 1) {
- DebugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Usage: %s\n", argv[0]);
return true;
}
diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp
index 234300b..90b9255 100644
--- a/engines/voyeur/debugger.cpp
+++ b/engines/voyeur/debugger.cpp
@@ -52,38 +52,38 @@ bool Debugger::Cmd_Time(int argc, const char **argv) {
if (!timeString.empty())
dtString += " " + timeString;
- DebugPrintf("Time period = %d, date/time is: %s, time is %s\n",
+ debugPrintf("Time period = %d, date/time is: %s, time is %s\n",
_vm->_voy->_transitionId, dtString.c_str(), _isTimeActive ? "on" : "off");
- DebugPrintf("Format: %s [on | off | 1..17 | val <amount>]\n\n", argv[0]);
+ debugPrintf("Format: %s [on | off | 1..17 | val <amount>]\n\n", argv[0]);
} else {
if (!strcmp(argv[1], "on")) {
_isTimeActive = true;
- DebugPrintf("Time is now on\n\n");
+ debugPrintf("Time is now on\n\n");
} else if (!strcmp(argv[1], "off")) {
_isTimeActive = false;
- DebugPrintf("Time is now off\n\n");
+ debugPrintf("Time is now off\n\n");
} else if (!strcmp(argv[1], "val")) {
if (argc < 3) {
- DebugPrintf("Time expired is currently %d.\n", _vm->_voy->_RTVNum);
+ debugPrintf("Time expired is currently %d.\n", _vm->_voy->_RTVNum);
} else {
_vm->_voy->_RTVNum = atoi(argv[2]);
- DebugPrintf("Time expired is now %d.\n", _vm->_voy->_RTVNum);
+ debugPrintf("Time expired is now %d.\n", _vm->_voy->_RTVNum);
}
} else {
int timeId = atoi(argv[1]);
if (timeId >= 1 && timeId < 17) {
int stateId = TIME_STATES[timeId - 1];
if (!stateId) {
- DebugPrintf("Given time period is not used in-game\n");
+ debugPrintf("Given time period is not used in-game\n");
} else {
- DebugPrintf("Changing to time period: %d\n", timeId);
+ debugPrintf("Changing to time period: %d\n", timeId);
if (_vm->_mainThread->goToState(-1, stateId))
_vm->_mainThread->parsePlayCommands();
return false;
}
} else {
- DebugPrintf("Unknown parameter\n\n");
+ debugPrintf("Unknown parameter\n\n");
}
}
}
@@ -93,7 +93,7 @@ bool Debugger::Cmd_Time(int argc, const char **argv) {
bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
if (_vm->_voy->_computerTextId >= 0) {
- DebugPrintf("Hotspot Computer Screen %d - %d,%d->%d,%d\n",
+ debugPrintf("Hotspot Computer Screen %d - %d,%d->%d,%d\n",
_vm->_voy->_computerTextId,
_vm->_voy->_computerScreenRect.left,
_vm->_voy->_computerScreenRect.top,
@@ -112,9 +112,9 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
hotspots[hotspotIdx].right, hotspots[hotspotIdx].bottom);
int arrIndex = hotspots[hotspotIdx]._arrIndex;
if (_vm->_voy->_roomHotspotsEnabled[arrIndex - 1]) {
- DebugPrintf("Hotspot Room %d - %s - Enabled\n", arrIndex, pos);
+ debugPrintf("Hotspot Room %d - %s - Enabled\n", arrIndex, pos);
} else {
- DebugPrintf("Hotspot Room - %s - Disabled\n", pos);
+ debugPrintf("Hotspot Room - %s - Disabled\n", pos);
}
}
}
@@ -132,14 +132,14 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
for (int arrIndex = 0; arrIndex < 3; ++arrIndex) {
if (_vm->_voy->_audioHotspotTimes._min[arrIndex][hotspotIdx] != 9999) {
- DebugPrintf("Hotspot %d %s Audio slot %d, time: %d to %d\n",
+ debugPrintf("Hotspot %d %s Audio slot %d, time: %d to %d\n",
hotspotIdx, pos.c_str(), arrIndex,
_vm->_voy->_audioHotspotTimes._min[arrIndex][hotspotIdx],
_vm->_voy->_audioHotspotTimes._max[arrIndex][hotspotIdx]);
}
if (_vm->_voy->_evidenceHotspotTimes._min[arrIndex][hotspotIdx] != 9999) {
- DebugPrintf("Hotspot %d %s Evidence slot %d, time: %d to %d\n",
+ debugPrintf("Hotspot %d %s Evidence slot %d, time: %d to %d\n",
hotspotIdx, pos.c_str(), arrIndex,
_vm->_voy->_evidenceHotspotTimes._min[arrIndex][hotspotIdx],
_vm->_voy->_evidenceHotspotTimes._max[arrIndex][hotspotIdx]);
@@ -148,7 +148,7 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
for (int arrIndex = 0; arrIndex < 8; ++arrIndex) {
if (_vm->_voy->_videoHotspotTimes._min[arrIndex][hotspotIdx] != 9999) {
- DebugPrintf("Hotspot %d %s Video slot %d, time: %d to %d\n",
+ debugPrintf("Hotspot %d %s Video slot %d, time: %d to %d\n",
hotspotIdx, pos.c_str(), arrIndex,
_vm->_voy->_videoHotspotTimes._min[arrIndex][hotspotIdx],
_vm->_voy->_videoHotspotTimes._max[arrIndex][hotspotIdx]);
@@ -157,16 +157,16 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
}
}
- DebugPrintf("\nEnd of list\n");
+ debugPrintf("\nEnd of list\n");
return true;
}
bool Debugger::Cmd_Mouse(int argc, const char **argv) {
if (argc < 2) {
- DebugPrintf("mouse [ on | off ]\n");
+ debugPrintf("mouse [ on | off ]\n");
} else {
_showMousePosition = !strcmp(argv[1], "on");
- DebugPrintf("Mouse position is now %s\n", _showMousePosition ? "on" : "off");
+ debugPrintf("Mouse position is now %s\n", _showMousePosition ? "on" : "off");
}
return true;
diff --git a/engines/wintermute/debugger.cpp b/engines/wintermute/debugger.cpp
index 51fd74e..f1f300c 100644
--- a/engines/wintermute/debugger.cpp
+++ b/engines/wintermute/debugger.cpp
@@ -50,7 +50,7 @@ bool Console::Cmd_ShowFps(int argc, const char **argv) {
bool Console::Cmd_DumpFile(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Usage: %s <file path> <output file name>\n", argv[0]);
+ debugPrintf("Usage: %s <file path> <output file name>\n", argv[0]);
return true;
}
@@ -60,7 +60,7 @@ bool Console::Cmd_DumpFile(int argc, const char **argv) {
BaseFileManager *fileManager = BaseEngine::instance().getFileManager();
Common::SeekableReadStream *inFile = fileManager->openFile(filePath);
if (!inFile) {
- DebugPrintf("File '%s' not found\n", argv[1]);
+ debugPrintf("File '%s' not found\n", argv[1]);
return true;
}
@@ -77,7 +77,7 @@ bool Console::Cmd_DumpFile(int argc, const char **argv) {
delete outFile;
delete inFile;
- DebugPrintf("Resource file '%s' dumped to file '%s'\n", argv[1], argv[2]);
+ debugPrintf("Resource file '%s' dumped to file '%s'\n", argv[1], argv[2]);
return true;
}
diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp
index 22382bc..a1037a1 100644
--- a/engines/zvision/core/console.cpp
+++ b/engines/zvision/core/console.cpp
@@ -63,7 +63,7 @@ bool Console::cmdLoadImage(int argc, const char **argv) {
if (argc == 4)
_engine->getRenderManager()->renderImageToScreen(argv[1], atoi(argv[2]), atoi(argv[3]));
else {
- DebugPrintf("Use loadimage <fileName> <destinationX> <destinationY> to load an image to the screen\n");
+ debugPrintf("Use loadimage <fileName> <destinationX> <destinationY> to load an image to the screen\n");
return true;
}
@@ -72,7 +72,7 @@ bool Console::cmdLoadImage(int argc, const char **argv) {
bool Console::cmdLoadVideo(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Use loadvideo <fileName> to load a video to the screen\n");
+ debugPrintf("Use loadvideo <fileName> to load a video to the screen\n");
return true;
}
@@ -86,7 +86,7 @@ bool Console::cmdLoadVideo(int argc, const char **argv) {
bool Console::cmdLoadSound(int argc, const char **argv) {
if (!Common::File::exists(argv[1])) {
- DebugPrintf("File does not exist\n");
+ debugPrintf("File does not exist\n");
return true;
}
@@ -105,7 +105,7 @@ bool Console::cmdLoadSound(int argc, const char **argv) {
Audio::SoundHandle handle;
_engine->_mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, soundStream, -1, 100, 0, DisposeAfterUse::YES, false, false);
} else {
- DebugPrintf("Use loadsound <fileName> [<rate> <isStereo: 1 or 0>] to load a sound\n");
+ debugPrintf("Use loadsound <fileName> [<rate> <isStereo: 1 or 0>] to load a sound\n");
return true;
}
@@ -114,7 +114,7 @@ bool Console::cmdLoadSound(int argc, const char **argv) {
bool Console::cmdRawToWav(int argc, const char **argv) {
if (argc != 3) {
- DebugPrintf("Use raw2wav <rawFilePath> <wavFileName> to dump a .RAW file to .WAV\n");
+ debugPrintf("Use raw2wav <rawFilePath> <wavFileName> to dump a .RAW file to .WAV\n");
return true;
}
@@ -124,7 +124,7 @@ bool Console::cmdRawToWav(int argc, const char **argv) {
bool Console::cmdSetRenderState(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Use setrenderstate <RenderState: panorama, tilt, flat> to change the current render state\n");
+ debugPrintf("Use setrenderstate <RenderState: panorama, tilt, flat> to change the current render state\n");
return true;
}
@@ -137,7 +137,7 @@ bool Console::cmdSetRenderState(int argc, const char **argv) {
else if (renderState.matchString("flat", true))
_engine->getRenderManager()->getRenderTable()->setRenderState(RenderTable::FLAT);
else
- DebugPrintf("Use setrenderstate <RenderState: panorama, tilt, flat> to change the current render state\n");
+ debugPrintf("Use setrenderstate <RenderState: panorama, tilt, flat> to change the current render state\n");
return true;
}
@@ -150,7 +150,7 @@ bool Console::cmdGenerateRenderTable(int argc, const char **argv) {
bool Console::cmdSetPanoramaFoV(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Use setpanoramafov <fieldOfView> to change the current panorama field of view\n");
+ debugPrintf("Use setpanoramafov <fieldOfView> to change the current panorama field of view\n");
return true;
}
@@ -161,7 +161,7 @@ bool Console::cmdSetPanoramaFoV(int argc, const char **argv) {
bool Console::cmdSetPanoramaScale(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Use setpanoramascale <scale> to change the current panorama scale\n");
+ debugPrintf("Use setpanoramascale <scale> to change the current panorama scale\n");
return true;
}
@@ -172,7 +172,7 @@ bool Console::cmdSetPanoramaScale(int argc, const char **argv) {
bool Console::cmdChangeLocation(int argc, const char **argv) {
if (argc != 6) {
- DebugPrintf("Use changelocation <char: world> <char: room> <char:node> <char:view> <int: x position> to change your location\n");
+ debugPrintf("Use changelocation <char: world> <char: room> <char:node> <char:view> <int: x position> to change your location\n");
return true;
}
@@ -183,7 +183,7 @@ bool Console::cmdChangeLocation(int argc, const char **argv) {
bool Console::cmdDumpFile(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("Use dumpfile <fileName> to dump a file\n");
+ debugPrintf("Use dumpfile <fileName> to dump a file\n");
return true;
}
@@ -205,7 +205,7 @@ bool Console::cmdParseAllScrFiles(int argc, const char **argv) {
bool Console::cmdRenderText(int argc, const char **argv) {
if (argc != 7) {
- DebugPrintf("Use rendertext <text> <fontNumber> <destX> <destY> <maxWidth> <1 or 0: wrap> to render text\n");
+ debugPrintf("Use rendertext <text> <fontNumber> <destX> <destY> <maxWidth> <1 or 0: wrap> to render text\n");
return true;
}
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index d14b786..498f19d 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -76,7 +76,7 @@ Debugger::~Debugger() {
// Initialisation Functions
-int Debugger::DebugPrintf(const char *format, ...) {
+int Debugger::debugPrintf(const char *format, ...) {
va_list argptr;
va_start(argptr, format);
@@ -153,13 +153,13 @@ void Debugger::enter() {
#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
if (_firstTime) {
- DebugPrintf("Debugger started, type 'exit' to return to the game.\n");
- DebugPrintf("Type 'help' to see a little list of commands and variables.\n");
+ debugPrintf("Debugger started, type 'exit' to return to the game.\n");
+ debugPrintf("Type 'help' to see a little list of commands and variables.\n");
_firstTime = false;
}
if (_errStr) {
- DebugPrintf("ERROR: %s\n\n", _errStr);
+ debugPrintf("ERROR: %s\n\n", _errStr);
free(_errStr);
_errStr = NULL;
}
@@ -250,37 +250,37 @@ bool Debugger::parseCommand(const char *inputOrig) {
// Integer
case DVAR_BYTE:
*(byte *)_dvars[i].variable = atoi(param[1]);
- DebugPrintf("byte%s = %d\n", param[0], *(byte *)_dvars[i].variable);
+ debugPrintf("byte%s = %d\n", param[0], *(byte *)_dvars[i].variable);
break;
case DVAR_INT:
*(int32 *)_dvars[i].variable = atoi(param[1]);
- DebugPrintf("(int)%s = %d\n", param[0], *(int32 *)_dvars[i].variable);
+ debugPrintf("(int)%s = %d\n", param[0], *(int32 *)_dvars[i].variable);
break;
case DVAR_BOOL:
if (Common::parseBool(param[1], *(bool *)_dvars[i].variable))
- DebugPrintf("(bool)%s = %s\n", param[0], *(bool *)_dvars[i].variable ? "true" : "false");
+ debugPrintf("(bool)%s = %s\n", param[0], *(bool *)_dvars[i].variable ? "true" : "false");
else
- DebugPrintf("Invalid value for boolean variable. Valid values are \"true\", \"false\", \"1\", \"0\", \"yes\", \"no\"\n");
+ debugPrintf("Invalid value for boolean variable. Valid values are \"true\", \"false\", \"1\", \"0\", \"yes\", \"no\"\n");
break;
// Integer Array
case DVAR_INTARRAY: {
const char *chr = strchr(param[0], '[');
if (!chr) {
- DebugPrintf("You must access this array as %s[element]\n", param[0]);
+ debugPrintf("You must access this array as %s[element]\n", param[0]);
} else {
int element = atoi(chr+1);
int32 *var = *(int32 **)_dvars[i].variable;
if (element >= _dvars[i].arraySize) {
- DebugPrintf("%s is out of range (array is %d elements big)\n", param[0], _dvars[i].arraySize);
+ debugPrintf("%s is out of range (array is %d elements big)\n", param[0], _dvars[i].arraySize);
} else {
var[element] = atoi(param[1]);
- DebugPrintf("(int)%s = %d\n", param[0], var[element]);
+ debugPrintf("(int)%s = %d\n", param[0], var[element]);
}
}
}
break;
default:
- DebugPrintf("Failed to set variable %s to %s - unknown type\n", _dvars[i].name.c_str(), param[1]);
+ debugPrintf("Failed to set variable %s to %s - unknown type\n", _dvars[i].name.c_str(), param[1]);
break;
Commit: 0adca2c579c29274f3c76bfe88b80b8ba9df26da
https://github.com/scummvm/scummvm/commit/0adca2c579c29274f3c76bfe88b80b8ba9df26da
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:07+02:00
Commit Message:
ALL: Rename Debugger::DVar_Register to Debugger::registerVar.
Changed paths:
engines/sci/console.cpp
engines/scumm/debugger.cpp
gui/debugger.cpp
gui/debugger.h
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 4f7aed7..b02429c 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -79,11 +79,11 @@ Console::Console(SciEngine *engine) : GUI::Debugger(),
assert(_engine->_gamestate);
// Variables
- DVar_Register("sleeptime_factor", &g_debug_sleeptime_factor, DVAR_INT, 0);
- DVar_Register("gc_interval", &engine->_gamestate->scriptGCInterval, DVAR_INT, 0);
- DVar_Register("simulated_key", &g_debug_simulated_key, DVAR_INT, 0);
- DVar_Register("track_mouse_clicks", &g_debug_track_mouse_clicks, DVAR_BOOL, 0);
- DVar_Register("script_abort_flag", &_engine->_gamestate->abortScriptProcessing, DVAR_INT, 0);
+ registerVar("sleeptime_factor", &g_debug_sleeptime_factor, DVAR_INT, 0);
+ registerVar("gc_interval", &engine->_gamestate->scriptGCInterval, DVAR_INT, 0);
+ registerVar("simulated_key", &g_debug_simulated_key, DVAR_INT, 0);
+ registerVar("track_mouse_clicks", &g_debug_track_mouse_clicks, DVAR_BOOL, 0);
+ registerVar("script_abort_flag", &_engine->_gamestate->abortScriptProcessing, DVAR_INT, 0);
// General
DCmd_Register("help", WRAP_METHOD(Console, cmdHelp));
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 665609b..01535bf 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -58,10 +58,10 @@ ScummDebugger::ScummDebugger(ScummEngine *s)
_vm = s;
// Register variables
- DVar_Register("scumm_speed", &_vm->_fastMode, DVAR_BYTE, 0);
- DVar_Register("scumm_room", &_vm->_currentRoom, DVAR_BYTE, 0);
- DVar_Register("scumm_roomresource", &_vm->_roomResource, DVAR_INT, 0);
- DVar_Register("scumm_vars", &_vm->_scummVars, DVAR_INTARRAY, _vm->_numVariables);
+ registerVar("scumm_speed", &_vm->_fastMode, DVAR_BYTE, 0);
+ registerVar("scumm_room", &_vm->_currentRoom, DVAR_BYTE, 0);
+ registerVar("scumm_roomresource", &_vm->_roomResource, DVAR_INT, 0);
+ registerVar("scumm_vars", &_vm->_scummVars, DVAR_INTARRAY, _vm->_numVariables);
// Register commands
DCmd_Register("continue", WRAP_METHOD(ScummDebugger, Cmd_Exit));
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 498f19d..1d74db3 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -52,7 +52,7 @@ Debugger::Debugger() {
#endif
// Register variables
- DVar_Register("debug_countdown", &_frameCountdown, DVAR_INT, 0);
+ registerVar("debug_countdown", &_frameCountdown, DVAR_INT, 0);
// Register commands
//DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
@@ -406,7 +406,7 @@ char *Debugger::readlineComplete(const char *input, int state) {
#endif
// Variable registration function
-void Debugger::DVar_Register(const Common::String &varname, void *pointer, VarType type, int arraySize) {
+void Debugger::registerVar(const Common::String &varname, void *pointer, VarType type, int arraySize) {
// TODO: Filter out duplicates
// TODO: Sort this list? Then we can do binary search later on when doing lookups.
assert(pointer);
diff --git a/gui/debugger.h b/gui/debugger.h
index a2a7aa2..6ccc77b 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -107,7 +107,7 @@ protected:
*
* @todo replace this single method by type safe variants.
*/
- void DVar_Register(const Common::String &varname, void *variable, VarType type, int arraySize);
+ void registerVar(const Common::String &varname, void *variable, VarType type, int arraySize);
void DCmd_Register(const Common::String &cmdname, Debuglet *debuglet);
Commit: ae4ffe01f0e4354938714c546034cd0f9806bfc3
https://github.com/scummvm/scummvm/commit/ae4ffe01f0e4354938714c546034cd0f9806bfc3
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd.
Changed paths:
engines/agi/console.cpp
engines/agos/debugger.cpp
engines/avalanche/console.cpp
engines/cge/console.cpp
engines/cine/console.cpp
engines/cruise/debugger.cpp
engines/drascula/console.cpp
engines/fullpipe/console.cpp
engines/gob/console.cpp
engines/groovie/debug.cpp
engines/hopkins/debugger.cpp
engines/hugo/console.cpp
engines/kyra/debugger.cpp
engines/lastexpress/debug.cpp
engines/lure/debugger.cpp
engines/mads/debugger.cpp
engines/mohawk/console.cpp
engines/mortevielle/debugger.cpp
engines/neverhood/console.cpp
engines/parallaction/debug.cpp
engines/pegasus/console.cpp
engines/queen/debug.cpp
engines/saga/console.cpp
engines/sci/console.cpp
engines/scumm/debugger.cpp
engines/sky/debug.cpp
engines/sword2/console.cpp
engines/teenagent/console.cpp
engines/tinsel/debugger.cpp
engines/toltecs/console.cpp
engines/tony/debugger.cpp
engines/touche/console.cpp
engines/tsage/debugger.cpp
engines/voyeur/debugger.cpp
engines/wintermute/debugger.cpp
engines/zvision/core/console.cpp
gui/debugger.cpp
gui/debugger.h
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index dce85b9..6d7f938 100644
--- a/engines/agi/console.cpp
+++ b/engines/agi/console.cpp
@@ -32,22 +32,22 @@ namespace Agi {
Console::Console(AgiEngine *vm) : GUI::Debugger() {
_vm = vm;
- DCmd_Register("debug", WRAP_METHOD(Console, Cmd_Debug));
- DCmd_Register("cont", WRAP_METHOD(Console, Cmd_Cont));
- DCmd_Register("agiver", WRAP_METHOD(Console, Cmd_Agiver));
- DCmd_Register("flags", WRAP_METHOD(Console, Cmd_Flags));
- DCmd_Register("logic0", WRAP_METHOD(Console, Cmd_Logic0));
- DCmd_Register("objs", WRAP_METHOD(Console, Cmd_Objs));
- DCmd_Register("runopcode", WRAP_METHOD(Console, Cmd_RunOpcode));
- DCmd_Register("opcode", WRAP_METHOD(Console, Cmd_Opcode));
- DCmd_Register("step", WRAP_METHOD(Console, Cmd_Step));
- DCmd_Register("trigger", WRAP_METHOD(Console, Cmd_Trigger));
- DCmd_Register("vars", WRAP_METHOD(Console, Cmd_Vars));
- DCmd_Register("setvar", WRAP_METHOD(Console, Cmd_SetVar));
- DCmd_Register("setflag", WRAP_METHOD(Console, Cmd_SetFlag));
- DCmd_Register("setobj", WRAP_METHOD(Console, Cmd_SetObj));
- DCmd_Register("room", WRAP_METHOD(Console, Cmd_Room));
- DCmd_Register("bt", WRAP_METHOD(Console, Cmd_BT));
+ registerCmd("debug", WRAP_METHOD(Console, Cmd_Debug));
+ registerCmd("cont", WRAP_METHOD(Console, Cmd_Cont));
+ registerCmd("agiver", WRAP_METHOD(Console, Cmd_Agiver));
+ registerCmd("flags", WRAP_METHOD(Console, Cmd_Flags));
+ registerCmd("logic0", WRAP_METHOD(Console, Cmd_Logic0));
+ registerCmd("objs", WRAP_METHOD(Console, Cmd_Objs));
+ registerCmd("runopcode", WRAP_METHOD(Console, Cmd_RunOpcode));
+ registerCmd("opcode", WRAP_METHOD(Console, Cmd_Opcode));
+ registerCmd("step", WRAP_METHOD(Console, Cmd_Step));
+ registerCmd("trigger", WRAP_METHOD(Console, Cmd_Trigger));
+ registerCmd("vars", WRAP_METHOD(Console, Cmd_Vars));
+ registerCmd("setvar", WRAP_METHOD(Console, Cmd_SetVar));
+ registerCmd("setflag", WRAP_METHOD(Console, Cmd_SetFlag));
+ registerCmd("setobj", WRAP_METHOD(Console, Cmd_SetObj));
+ registerCmd("room", WRAP_METHOD(Console, Cmd_Room));
+ registerCmd("bt", WRAP_METHOD(Console, Cmd_BT));
}
bool Console::Cmd_SetVar(int argc, const char **argv) {
@@ -271,9 +271,9 @@ bool Console::Cmd_BT(int argc, const char **argv) {
MickeyConsole::MickeyConsole(MickeyEngine *mickey) : GUI::Debugger() {
_mickey = mickey;
- DCmd_Register("room", WRAP_METHOD(MickeyConsole, Cmd_Room));
- DCmd_Register("drawPic", WRAP_METHOD(MickeyConsole, Cmd_DrawPic));
- DCmd_Register("drawObj", WRAP_METHOD(MickeyConsole, Cmd_DrawObj));
+ registerCmd("room", WRAP_METHOD(MickeyConsole, Cmd_Room));
+ registerCmd("drawPic", WRAP_METHOD(MickeyConsole, Cmd_DrawPic));
+ registerCmd("drawObj", WRAP_METHOD(MickeyConsole, Cmd_DrawObj));
}
bool MickeyConsole::Cmd_Room(int argc, const char **argv) {
@@ -304,7 +304,7 @@ bool MickeyConsole::Cmd_DrawObj(int argc, const char **argv) {
WinnieConsole::WinnieConsole(WinnieEngine *winnie) : GUI::Debugger() {
_winnie = winnie;
- DCmd_Register("curRoom", WRAP_METHOD(WinnieConsole, Cmd_CurRoom));
+ registerCmd("curRoom", WRAP_METHOD(WinnieConsole, Cmd_CurRoom));
}
bool WinnieConsole::Cmd_CurRoom(int argc, const char **argv) {
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp
index 99ea8a1..536a1f8 100644
--- a/engines/agos/debugger.cpp
+++ b/engines/agos/debugger.cpp
@@ -32,18 +32,18 @@ Debugger::Debugger(AGOSEngine *vm)
: GUI::Debugger() {
_vm = vm;
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("music", WRAP_METHOD(Debugger, Cmd_PlayMusic));
- DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_PlaySound));
- DCmd_Register("voice", WRAP_METHOD(Debugger, Cmd_PlayVoice));
- DCmd_Register("bit", WRAP_METHOD(Debugger, Cmd_SetBit));
- DCmd_Register("bit2", WRAP_METHOD(Debugger, Cmd_SetBit2));
- DCmd_Register("bit3", WRAP_METHOD(Debugger, Cmd_SetBit3));
- DCmd_Register("var", WRAP_METHOD(Debugger, Cmd_SetVar));
- DCmd_Register("obj", WRAP_METHOD(Debugger, Cmd_SetObjectFlag));
- DCmd_Register("sub", WRAP_METHOD(Debugger, Cmd_StartSubroutine));
- DCmd_Register("dumpimage", WRAP_METHOD(Debugger, Cmd_dumpImage));
- DCmd_Register("dumpscript", WRAP_METHOD(Debugger, Cmd_dumpScript));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("music", WRAP_METHOD(Debugger, Cmd_PlayMusic));
+ registerCmd("sound", WRAP_METHOD(Debugger, Cmd_PlaySound));
+ registerCmd("voice", WRAP_METHOD(Debugger, Cmd_PlayVoice));
+ registerCmd("bit", WRAP_METHOD(Debugger, Cmd_SetBit));
+ registerCmd("bit2", WRAP_METHOD(Debugger, Cmd_SetBit2));
+ registerCmd("bit3", WRAP_METHOD(Debugger, Cmd_SetBit3));
+ registerCmd("var", WRAP_METHOD(Debugger, Cmd_SetVar));
+ registerCmd("obj", WRAP_METHOD(Debugger, Cmd_SetObjectFlag));
+ registerCmd("sub", WRAP_METHOD(Debugger, Cmd_StartSubroutine));
+ registerCmd("dumpimage", WRAP_METHOD(Debugger, Cmd_dumpImage));
+ registerCmd("dumpscript", WRAP_METHOD(Debugger, Cmd_dumpScript));
}
diff --git a/engines/avalanche/console.cpp b/engines/avalanche/console.cpp
index 639ad63..d4923af 100644
--- a/engines/avalanche/console.cpp
+++ b/engines/avalanche/console.cpp
@@ -31,7 +31,7 @@
namespace Avalanche {
AvalancheConsole::AvalancheConsole(AvalancheEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("magic_lines", WRAP_METHOD(AvalancheConsole, Cmd_MagicLines));
+ registerCmd("magic_lines", WRAP_METHOD(AvalancheConsole, Cmd_MagicLines));
}
AvalancheConsole::~AvalancheConsole() {
diff --git a/engines/cge/console.cpp b/engines/cge/console.cpp
index 3d281df..e926e89 100644
--- a/engines/cge/console.cpp
+++ b/engines/cge/console.cpp
@@ -26,7 +26,7 @@
namespace CGE {
CGEConsole::CGEConsole(CGEEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("Boundaries", WRAP_METHOD(CGEConsole, Cmd_boundaries));
+ registerCmd("Boundaries", WRAP_METHOD(CGEConsole, Cmd_boundaries));
}
CGEConsole::~CGEConsole() {
diff --git a/engines/cine/console.cpp b/engines/cine/console.cpp
index 8219769..4646bdf 100644
--- a/engines/cine/console.cpp
+++ b/engines/cine/console.cpp
@@ -29,7 +29,7 @@ bool labyrinthCheat;
CineConsole::CineConsole(CineEngine *vm) : GUI::Debugger(), _vm(vm) {
assert(_vm);
- DCmd_Register("labyrinthCheat", WRAP_METHOD(CineConsole, Cmd_LabyrinthCheat));
+ registerCmd("labyrinthCheat", WRAP_METHOD(CineConsole, Cmd_LabyrinthCheat));
labyrinthCheat = false;
}
diff --git a/engines/cruise/debugger.cpp b/engines/cruise/debugger.cpp
index 0bda44d..0627432 100644
--- a/engines/cruise/debugger.cpp
+++ b/engines/cruise/debugger.cpp
@@ -29,9 +29,9 @@
namespace Cruise {
Debugger::Debugger(): GUI::Debugger() {
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("hotspots", WRAP_METHOD(Debugger, cmd_hotspots));
- DCmd_Register("items", WRAP_METHOD(Debugger, cmd_items));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("hotspots", WRAP_METHOD(Debugger, cmd_hotspots));
+ registerCmd("items", WRAP_METHOD(Debugger, cmd_items));
}
/**
diff --git a/engines/drascula/console.cpp b/engines/drascula/console.cpp
index 4c14fb7..b545c09 100644
--- a/engines/drascula/console.cpp
+++ b/engines/drascula/console.cpp
@@ -27,7 +27,7 @@
namespace Drascula {
Console::Console(DrasculaEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("room", WRAP_METHOD(Console, Cmd_Room));
+ registerCmd("room", WRAP_METHOD(Console, Cmd_Room));
}
Console::~Console() {
diff --git a/engines/fullpipe/console.cpp b/engines/fullpipe/console.cpp
index 3ff84da..dd3d1bf 100644
--- a/engines/fullpipe/console.cpp
+++ b/engines/fullpipe/console.cpp
@@ -28,7 +28,7 @@
namespace Fullpipe {
Console::Console(FullpipeEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("scene", WRAP_METHOD(Console, Cmd_Scene));
+ registerCmd("scene", WRAP_METHOD(Console, Cmd_Scene));
}
bool Console::Cmd_Scene(int argc, const char **argv) {
diff --git a/engines/gob/console.cpp b/engines/gob/console.cpp
index 303c59c..2252606 100644
--- a/engines/gob/console.cpp
+++ b/engines/gob/console.cpp
@@ -29,14 +29,14 @@
namespace Gob {
GobConsole::GobConsole(GobEngine *vm) : GUI::Debugger(), _vm(vm), _cheater(0) {
- DCmd_Register("varSize", WRAP_METHOD(GobConsole, cmd_varSize));
- DCmd_Register("dumpVars", WRAP_METHOD(GobConsole, cmd_dumpVars));
- DCmd_Register("var8", WRAP_METHOD(GobConsole, cmd_var8));
- DCmd_Register("var16", WRAP_METHOD(GobConsole, cmd_var16));
- DCmd_Register("var32", WRAP_METHOD(GobConsole, cmd_var32));
- DCmd_Register("varString", WRAP_METHOD(GobConsole, cmd_varString));
- DCmd_Register("cheat", WRAP_METHOD(GobConsole, cmd_cheat));
- DCmd_Register("listArchives", WRAP_METHOD(GobConsole, cmd_listArchives));
+ registerCmd("varSize", WRAP_METHOD(GobConsole, cmd_varSize));
+ registerCmd("dumpVars", WRAP_METHOD(GobConsole, cmd_dumpVars));
+ registerCmd("var8", WRAP_METHOD(GobConsole, cmd_var8));
+ registerCmd("var16", WRAP_METHOD(GobConsole, cmd_var16));
+ registerCmd("var32", WRAP_METHOD(GobConsole, cmd_var32));
+ registerCmd("varString", WRAP_METHOD(GobConsole, cmd_varString));
+ registerCmd("cheat", WRAP_METHOD(GobConsole, cmd_cheat));
+ registerCmd("listArchives", WRAP_METHOD(GobConsole, cmd_listArchives));
}
GobConsole::~GobConsole() {
diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp
index 85b9b87..16db204 100644
--- a/engines/groovie/debug.cpp
+++ b/engines/groovie/debug.cpp
@@ -36,16 +36,16 @@ Debugger::Debugger(GroovieEngine *vm) :
_vm(vm), _script(_vm->_script) {
// Register the debugger comands
- DCmd_Register("step", WRAP_METHOD(Debugger, cmd_step));
- DCmd_Register("go", WRAP_METHOD(Debugger, cmd_go));
- DCmd_Register("pc", WRAP_METHOD(Debugger, cmd_pc));
- DCmd_Register("fg", WRAP_METHOD(Debugger, cmd_fg));
- DCmd_Register("bg", WRAP_METHOD(Debugger, cmd_bg));
- DCmd_Register("mem", WRAP_METHOD(Debugger, cmd_mem));
- DCmd_Register("load", WRAP_METHOD(Debugger, cmd_loadgame));
- DCmd_Register("save", WRAP_METHOD(Debugger, cmd_savegame));
- DCmd_Register("playref", WRAP_METHOD(Debugger, cmd_playref));
- DCmd_Register("dumppal", WRAP_METHOD(Debugger, cmd_dumppal));
+ registerCmd("step", WRAP_METHOD(Debugger, cmd_step));
+ registerCmd("go", WRAP_METHOD(Debugger, cmd_go));
+ registerCmd("pc", WRAP_METHOD(Debugger, cmd_pc));
+ registerCmd("fg", WRAP_METHOD(Debugger, cmd_fg));
+ registerCmd("bg", WRAP_METHOD(Debugger, cmd_bg));
+ registerCmd("mem", WRAP_METHOD(Debugger, cmd_mem));
+ registerCmd("load", WRAP_METHOD(Debugger, cmd_loadgame));
+ registerCmd("save", WRAP_METHOD(Debugger, cmd_savegame));
+ registerCmd("playref", WRAP_METHOD(Debugger, cmd_playref));
+ registerCmd("dumppal", WRAP_METHOD(Debugger, cmd_dumppal));
}
Debugger::~Debugger() {
diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp
index e5c1984..323afef 100644
--- a/engines/hopkins/debugger.cpp
+++ b/engines/hopkins/debugger.cpp
@@ -30,12 +30,12 @@ namespace Hopkins {
Debugger::Debugger(HopkinsEngine *vm) : GUI::Debugger() {
_vm = vm;
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("rects", WRAP_METHOD(Debugger, cmd_DirtyRects));
- DCmd_Register("teleport", WRAP_METHOD(Debugger, cmd_Teleport));
- DCmd_Register("show_room", WRAP_METHOD(Debugger, cmd_ShowCurrentRoom));
- DCmd_Register("zones", WRAP_METHOD(Debugger, cmd_Zones));
- DCmd_Register("lines", WRAP_METHOD(Debugger, cmd_Lines));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("rects", WRAP_METHOD(Debugger, cmd_DirtyRects));
+ registerCmd("teleport", WRAP_METHOD(Debugger, cmd_Teleport));
+ registerCmd("show_room", WRAP_METHOD(Debugger, cmd_ShowCurrentRoom));
+ registerCmd("zones", WRAP_METHOD(Debugger, cmd_Zones));
+ registerCmd("lines", WRAP_METHOD(Debugger, cmd_Lines));
}
// Turns dirty rects on or off
diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 529fa4f..d02c426 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -30,12 +30,12 @@
namespace Hugo {
HugoConsole::HugoConsole(HugoEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
- DCmd_Register("listobjects", WRAP_METHOD(HugoConsole, Cmd_listObjects));
- DCmd_Register("getobject", WRAP_METHOD(HugoConsole, Cmd_getObject));
- DCmd_Register("getallobjects", WRAP_METHOD(HugoConsole, Cmd_getAllObjects));
- DCmd_Register("gotoscreen", WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
- DCmd_Register("Boundaries", WRAP_METHOD(HugoConsole, Cmd_boundaries));
+ registerCmd("listscreens", WRAP_METHOD(HugoConsole, Cmd_listScreens));
+ registerCmd("listobjects", WRAP_METHOD(HugoConsole, Cmd_listObjects));
+ registerCmd("getobject", WRAP_METHOD(HugoConsole, Cmd_getObject));
+ registerCmd("getallobjects", WRAP_METHOD(HugoConsole, Cmd_getAllObjects));
+ registerCmd("gotoscreen", WRAP_METHOD(HugoConsole, Cmd_gotoScreen));
+ registerCmd("Boundaries", WRAP_METHOD(HugoConsole, Cmd_boundaries));
}
HugoConsole::~HugoConsole() {
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 598eb1c..f14c42b 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -40,16 +40,16 @@ Debugger::Debugger(KyraEngine_v1 *vm)
}
void Debugger::initialize() {
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("screen_debug_mode", WRAP_METHOD(Debugger, cmd_setScreenDebug));
- DCmd_Register("load_palette", WRAP_METHOD(Debugger, cmd_loadPalette));
- DCmd_Register("facings", WRAP_METHOD(Debugger, cmd_showFacings));
- DCmd_Register("gamespeed", WRAP_METHOD(Debugger, cmd_gameSpeed));
- DCmd_Register("flags", WRAP_METHOD(Debugger, cmd_listFlags));
- DCmd_Register("toggleflag", WRAP_METHOD(Debugger, cmd_toggleFlag));
- DCmd_Register("queryflag", WRAP_METHOD(Debugger, cmd_queryFlag));
- DCmd_Register("timers", WRAP_METHOD(Debugger, cmd_listTimers));
- DCmd_Register("settimercountdown", WRAP_METHOD(Debugger, cmd_setTimerCountdown));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("screen_debug_mode", WRAP_METHOD(Debugger, cmd_setScreenDebug));
+ registerCmd("load_palette", WRAP_METHOD(Debugger, cmd_loadPalette));
+ registerCmd("facings", WRAP_METHOD(Debugger, cmd_showFacings));
+ registerCmd("gamespeed", WRAP_METHOD(Debugger, cmd_gameSpeed));
+ registerCmd("flags", WRAP_METHOD(Debugger, cmd_listFlags));
+ registerCmd("toggleflag", WRAP_METHOD(Debugger, cmd_toggleFlag));
+ registerCmd("queryflag", WRAP_METHOD(Debugger, cmd_queryFlag));
+ registerCmd("timers", WRAP_METHOD(Debugger, cmd_listTimers));
+ registerCmd("settimercountdown", WRAP_METHOD(Debugger, cmd_setTimerCountdown));
}
bool Debugger::cmd_setScreenDebug(int argc, const char **argv) {
@@ -204,10 +204,10 @@ Debugger_LoK::Debugger_LoK(KyraEngine_LoK *vm)
}
void Debugger_LoK::initialize() {
- DCmd_Register("enter", WRAP_METHOD(Debugger_LoK, cmd_enterRoom));
- DCmd_Register("scenes", WRAP_METHOD(Debugger_LoK, cmd_listScenes));
- DCmd_Register("give", WRAP_METHOD(Debugger_LoK, cmd_giveItem));
- DCmd_Register("birthstones", WRAP_METHOD(Debugger_LoK, cmd_listBirthstones));
+ registerCmd("enter", WRAP_METHOD(Debugger_LoK, cmd_enterRoom));
+ registerCmd("scenes", WRAP_METHOD(Debugger_LoK, cmd_listScenes));
+ registerCmd("give", WRAP_METHOD(Debugger_LoK, cmd_giveItem));
+ registerCmd("birthstones", WRAP_METHOD(Debugger_LoK, cmd_listBirthstones));
Debugger::initialize();
}
@@ -293,12 +293,12 @@ Debugger_v2::Debugger_v2(KyraEngine_v2 *vm) : Debugger(vm), _vm(vm) {
}
void Debugger_v2::initialize() {
- DCmd_Register("character_info", WRAP_METHOD(Debugger_v2, cmd_characterInfo));
- DCmd_Register("enter", WRAP_METHOD(Debugger_v2, cmd_enterScene));
- DCmd_Register("scenes", WRAP_METHOD(Debugger_v2, cmd_listScenes));
- DCmd_Register("scene_info", WRAP_METHOD(Debugger_v2, cmd_sceneInfo));
- DCmd_Register("scene_to_facing", WRAP_METHOD(Debugger_v2, cmd_sceneToFacing));
- DCmd_Register("give", WRAP_METHOD(Debugger_v2, cmd_giveItem));
+ registerCmd("character_info", WRAP_METHOD(Debugger_v2, cmd_characterInfo));
+ registerCmd("enter", WRAP_METHOD(Debugger_v2, cmd_enterScene));
+ registerCmd("scenes", WRAP_METHOD(Debugger_v2, cmd_listScenes));
+ registerCmd("scene_info", WRAP_METHOD(Debugger_v2, cmd_sceneInfo));
+ registerCmd("scene_to_facing", WRAP_METHOD(Debugger_v2, cmd_sceneToFacing));
+ registerCmd("give", WRAP_METHOD(Debugger_v2, cmd_giveItem));
Debugger::initialize();
}
@@ -449,7 +449,7 @@ Debugger_HoF::Debugger_HoF(KyraEngine_HoF *vm) : Debugger_v2(vm), _vm(vm) {
}
void Debugger_HoF::initialize() {
- DCmd_Register("pass_codes", WRAP_METHOD(Debugger_HoF, cmd_passcodes));
+ registerCmd("pass_codes", WRAP_METHOD(Debugger_HoF, cmd_passcodes));
Debugger_v2::initialize();
}
@@ -482,16 +482,16 @@ Debugger_EoB::Debugger_EoB(EoBCoreEngine *vm) : Debugger(vm), _vm(vm) {
}
void Debugger_EoB::initialize() {
- DCmd_Register("import_savefile", WRAP_METHOD(Debugger_EoB, cmd_importSaveFile));
- DCmd_Register("save_original", WRAP_METHOD(Debugger_EoB, cmd_saveOriginal));
- DCmd_Register("list_monsters", WRAP_METHOD(Debugger_EoB, cmd_listMonsters));
- DCmd_Register("show_position", WRAP_METHOD(Debugger_EoB, cmd_showPosition));
- DCmd_Register("set_position", WRAP_METHOD(Debugger_EoB, cmd_setPosition));
- DCmd_Register("open_door", WRAP_METHOD(Debugger_EoB, cmd_openDoor));
- DCmd_Register("close_door", WRAP_METHOD(Debugger_EoB, cmd_closeDoor));
- DCmd_Register("list_flags", WRAP_METHOD(Debugger_EoB, cmd_listFlags));
- DCmd_Register("set_flag", WRAP_METHOD(Debugger_EoB, cmd_setFlag));
- DCmd_Register("clear_flag", WRAP_METHOD(Debugger_EoB, cmd_clearFlag));
+ registerCmd("import_savefile", WRAP_METHOD(Debugger_EoB, cmd_importSaveFile));
+ registerCmd("save_original", WRAP_METHOD(Debugger_EoB, cmd_saveOriginal));
+ registerCmd("list_monsters", WRAP_METHOD(Debugger_EoB, cmd_listMonsters));
+ registerCmd("show_position", WRAP_METHOD(Debugger_EoB, cmd_showPosition));
+ registerCmd("set_position", WRAP_METHOD(Debugger_EoB, cmd_setPosition));
+ registerCmd("open_door", WRAP_METHOD(Debugger_EoB, cmd_openDoor));
+ registerCmd("close_door", WRAP_METHOD(Debugger_EoB, cmd_closeDoor));
+ registerCmd("list_flags", WRAP_METHOD(Debugger_EoB, cmd_listFlags));
+ registerCmd("set_flag", WRAP_METHOD(Debugger_EoB, cmd_setFlag));
+ registerCmd("clear_flag", WRAP_METHOD(Debugger_EoB, cmd_clearFlag));
}
bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index e13a2f6..2fb2cd8 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -60,33 +60,33 @@ Debugger::Debugger(LastExpressEngine *engine) : _engine(engine), _command(NULL),
// Register the debugger commands
// General
- DCmd_Register("help", WRAP_METHOD(Debugger, cmdHelp));
+ registerCmd("help", WRAP_METHOD(Debugger, cmdHelp));
// Data
- DCmd_Register("ls", WRAP_METHOD(Debugger, cmdListFiles));
- DCmd_Register("dump", WRAP_METHOD(Debugger, cmdDumpFiles));
+ registerCmd("ls", WRAP_METHOD(Debugger, cmdListFiles));
+ registerCmd("dump", WRAP_METHOD(Debugger, cmdDumpFiles));
- DCmd_Register("showframe", WRAP_METHOD(Debugger, cmdShowFrame));
- DCmd_Register("showbg", WRAP_METHOD(Debugger, cmdShowBg));
- DCmd_Register("playseq", WRAP_METHOD(Debugger, cmdPlaySeq));
- DCmd_Register("playsnd", WRAP_METHOD(Debugger, cmdPlaySnd));
- DCmd_Register("playsbe", WRAP_METHOD(Debugger, cmdPlaySbe));
- DCmd_Register("playnis", WRAP_METHOD(Debugger, cmdPlayNis));
+ registerCmd("showframe", WRAP_METHOD(Debugger, cmdShowFrame));
+ registerCmd("showbg", WRAP_METHOD(Debugger, cmdShowBg));
+ registerCmd("playseq", WRAP_METHOD(Debugger, cmdPlaySeq));
+ registerCmd("playsnd", WRAP_METHOD(Debugger, cmdPlaySnd));
+ registerCmd("playsbe", WRAP_METHOD(Debugger, cmdPlaySbe));
+ registerCmd("playnis", WRAP_METHOD(Debugger, cmdPlayNis));
// Scene & interaction
- DCmd_Register("loadscene", WRAP_METHOD(Debugger, cmdLoadScene));
- DCmd_Register("fight", WRAP_METHOD(Debugger, cmdFight));
- DCmd_Register("beetle", WRAP_METHOD(Debugger, cmdBeetle));
+ registerCmd("loadscene", WRAP_METHOD(Debugger, cmdLoadScene));
+ registerCmd("fight", WRAP_METHOD(Debugger, cmdFight));
+ registerCmd("beetle", WRAP_METHOD(Debugger, cmdBeetle));
// Game
- DCmd_Register("delta", WRAP_METHOD(Debugger, cmdTimeDelta));
- DCmd_Register("time", WRAP_METHOD(Debugger, cmdTime));
- DCmd_Register("show", WRAP_METHOD(Debugger, cmdShow));
- DCmd_Register("entity", WRAP_METHOD(Debugger, cmdEntity));
+ registerCmd("delta", WRAP_METHOD(Debugger, cmdTimeDelta));
+ registerCmd("time", WRAP_METHOD(Debugger, cmdTime));
+ registerCmd("show", WRAP_METHOD(Debugger, cmdShow));
+ registerCmd("entity", WRAP_METHOD(Debugger, cmdEntity));
// Misc
- DCmd_Register("chapter", WRAP_METHOD(Debugger, cmdSwitchChapter));
- DCmd_Register("clear", WRAP_METHOD(Debugger, cmdClear));
+ registerCmd("chapter", WRAP_METHOD(Debugger, cmdSwitchChapter));
+ registerCmd("clear", WRAP_METHOD(Debugger, cmdClear));
resetCommand();
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index d2b0cd4..7ab3212 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -35,20 +35,20 @@
namespace Lure {
Debugger::Debugger(): GUI::Debugger() {
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("enter", WRAP_METHOD(Debugger, cmd_enterRoom));
- DCmd_Register("rooms", WRAP_METHOD(Debugger, cmd_listRooms));
- DCmd_Register("fields", WRAP_METHOD(Debugger, cmd_listFields));
- DCmd_Register("setfield", WRAP_METHOD(Debugger, cmd_setField));
- DCmd_Register("queryfield", WRAP_METHOD(Debugger, cmd_queryField));
- DCmd_Register("give", WRAP_METHOD(Debugger, cmd_giveItem));
- DCmd_Register("hotspots", WRAP_METHOD(Debugger, cmd_hotspots));
- DCmd_Register("hotspot", WRAP_METHOD(Debugger, cmd_hotspot));
- DCmd_Register("room", WRAP_METHOD(Debugger, cmd_room));
- DCmd_Register("showanim", WRAP_METHOD(Debugger, cmd_showAnim));
- DCmd_Register("strings", WRAP_METHOD(Debugger, cmd_saveStrings));
- DCmd_Register("debug", WRAP_METHOD(Debugger, cmd_debug));
- DCmd_Register("script", WRAP_METHOD(Debugger, cmd_script));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("enter", WRAP_METHOD(Debugger, cmd_enterRoom));
+ registerCmd("rooms", WRAP_METHOD(Debugger, cmd_listRooms));
+ registerCmd("fields", WRAP_METHOD(Debugger, cmd_listFields));
+ registerCmd("setfield", WRAP_METHOD(Debugger, cmd_setField));
+ registerCmd("queryfield", WRAP_METHOD(Debugger, cmd_queryField));
+ registerCmd("give", WRAP_METHOD(Debugger, cmd_giveItem));
+ registerCmd("hotspots", WRAP_METHOD(Debugger, cmd_hotspots));
+ registerCmd("hotspot", WRAP_METHOD(Debugger, cmd_hotspot));
+ registerCmd("room", WRAP_METHOD(Debugger, cmd_room));
+ registerCmd("showanim", WRAP_METHOD(Debugger, cmd_showAnim));
+ registerCmd("strings", WRAP_METHOD(Debugger, cmd_saveStrings));
+ registerCmd("debug", WRAP_METHOD(Debugger, cmd_debug));
+ registerCmd("script", WRAP_METHOD(Debugger, cmd_script));
}
static int strToInt(const char *s) {
diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index 798cd00..e82b39f 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -29,22 +29,22 @@ namespace MADS {
Debugger::Debugger(MADSEngine *vm) : GUI::Debugger(), _vm(vm) {
_showMousePos = false;
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
- DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_LoadScene));
- DCmd_Register("show_hotspots", WRAP_METHOD(Debugger, Cmd_ShowHotSpots));
- DCmd_Register("list_hotspots", WRAP_METHOD(Debugger, Cmd_ListHotSpots));
- DCmd_Register("play_sound", WRAP_METHOD(Debugger, Cmd_PlaySound));
- DCmd_Register("play_audio", WRAP_METHOD(Debugger, Cmd_PlayAudio));
- DCmd_Register("show_codes", WRAP_METHOD(Debugger, Cmd_ShowCodes));
- DCmd_Register("dump_file", WRAP_METHOD(Debugger, Cmd_DumpFile));
- DCmd_Register("show_quote", WRAP_METHOD(Debugger, Cmd_ShowQuote));
- DCmd_Register("show_vocab", WRAP_METHOD(Debugger, Cmd_ShowVocab));
- DCmd_Register("dump_vocab", WRAP_METHOD(Debugger, Cmd_DumpVocab));
- DCmd_Register("show_message", WRAP_METHOD(Debugger, Cmd_ShowMessage));
- DCmd_Register("show_item", WRAP_METHOD(Debugger, Cmd_ShowItem));
- DCmd_Register("dump_items", WRAP_METHOD(Debugger, Cmd_DumpItems));
- DCmd_Register("item", WRAP_METHOD(Debugger, Cmd_Item));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
+ registerCmd("scene", WRAP_METHOD(Debugger, Cmd_LoadScene));
+ registerCmd("show_hotspots", WRAP_METHOD(Debugger, Cmd_ShowHotSpots));
+ registerCmd("list_hotspots", WRAP_METHOD(Debugger, Cmd_ListHotSpots));
+ registerCmd("play_sound", WRAP_METHOD(Debugger, Cmd_PlaySound));
+ registerCmd("play_audio", WRAP_METHOD(Debugger, Cmd_PlayAudio));
+ registerCmd("show_codes", WRAP_METHOD(Debugger, Cmd_ShowCodes));
+ registerCmd("dump_file", WRAP_METHOD(Debugger, Cmd_DumpFile));
+ registerCmd("show_quote", WRAP_METHOD(Debugger, Cmd_ShowQuote));
+ registerCmd("show_vocab", WRAP_METHOD(Debugger, Cmd_ShowVocab));
+ registerCmd("dump_vocab", WRAP_METHOD(Debugger, Cmd_DumpVocab));
+ registerCmd("show_message", WRAP_METHOD(Debugger, Cmd_ShowMessage));
+ registerCmd("show_item", WRAP_METHOD(Debugger, Cmd_ShowItem));
+ registerCmd("dump_items", WRAP_METHOD(Debugger, Cmd_DumpItems));
+ registerCmd("item", WRAP_METHOD(Debugger, Cmd_Item));
}
static int strToInt(const char *s) {
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index ec0b5a0..d49f3e8 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -49,20 +49,20 @@ namespace Mohawk {
#ifdef ENABLE_MYST
MystConsole::MystConsole(MohawkEngine_Myst *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("changeCard", WRAP_METHOD(MystConsole, Cmd_ChangeCard));
- DCmd_Register("curCard", WRAP_METHOD(MystConsole, Cmd_CurCard));
- DCmd_Register("var", WRAP_METHOD(MystConsole, Cmd_Var));
- DCmd_Register("curStack", WRAP_METHOD(MystConsole, Cmd_CurStack));
- DCmd_Register("changeStack", WRAP_METHOD(MystConsole, Cmd_ChangeStack));
- DCmd_Register("drawImage", WRAP_METHOD(MystConsole, Cmd_DrawImage));
- DCmd_Register("drawRect", WRAP_METHOD(MystConsole, Cmd_DrawRect));
- DCmd_Register("setResourceEnable", WRAP_METHOD(MystConsole, Cmd_SetResourceEnable));
- DCmd_Register("playSound", WRAP_METHOD(MystConsole, Cmd_PlaySound));
- DCmd_Register("stopSound", WRAP_METHOD(MystConsole, Cmd_StopSound));
- DCmd_Register("playMovie", WRAP_METHOD(MystConsole, Cmd_PlayMovie));
- DCmd_Register("disableInitOpcodes", WRAP_METHOD(MystConsole, Cmd_DisableInitOpcodes));
- DCmd_Register("cache", WRAP_METHOD(MystConsole, Cmd_Cache));
- DCmd_Register("resources", WRAP_METHOD(MystConsole, Cmd_Resources));
+ registerCmd("changeCard", WRAP_METHOD(MystConsole, Cmd_ChangeCard));
+ registerCmd("curCard", WRAP_METHOD(MystConsole, Cmd_CurCard));
+ registerCmd("var", WRAP_METHOD(MystConsole, Cmd_Var));
+ registerCmd("curStack", WRAP_METHOD(MystConsole, Cmd_CurStack));
+ registerCmd("changeStack", WRAP_METHOD(MystConsole, Cmd_ChangeStack));
+ registerCmd("drawImage", WRAP_METHOD(MystConsole, Cmd_DrawImage));
+ registerCmd("drawRect", WRAP_METHOD(MystConsole, Cmd_DrawRect));
+ registerCmd("setResourceEnable", WRAP_METHOD(MystConsole, Cmd_SetResourceEnable));
+ registerCmd("playSound", WRAP_METHOD(MystConsole, Cmd_PlaySound));
+ registerCmd("stopSound", WRAP_METHOD(MystConsole, Cmd_StopSound));
+ registerCmd("playMovie", WRAP_METHOD(MystConsole, Cmd_PlayMovie));
+ registerCmd("disableInitOpcodes", WRAP_METHOD(MystConsole, Cmd_DisableInitOpcodes));
+ registerCmd("cache", WRAP_METHOD(MystConsole, Cmd_Cache));
+ registerCmd("resources", WRAP_METHOD(MystConsole, Cmd_Resources));
}
MystConsole::~MystConsole() {
@@ -323,21 +323,21 @@ bool MystConsole::Cmd_Resources(int argc, const char **argv) {
#ifdef ENABLE_RIVEN
RivenConsole::RivenConsole(MohawkEngine_Riven *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("changeCard", WRAP_METHOD(RivenConsole, Cmd_ChangeCard));
- DCmd_Register("curCard", WRAP_METHOD(RivenConsole, Cmd_CurCard));
- DCmd_Register("var", WRAP_METHOD(RivenConsole, Cmd_Var));
- DCmd_Register("playSound", WRAP_METHOD(RivenConsole, Cmd_PlaySound));
- DCmd_Register("playSLST", WRAP_METHOD(RivenConsole, Cmd_PlaySLST));
- DCmd_Register("stopSound", WRAP_METHOD(RivenConsole, Cmd_StopSound));
- DCmd_Register("curStack", WRAP_METHOD(RivenConsole, Cmd_CurStack));
- DCmd_Register("changeStack", WRAP_METHOD(RivenConsole, Cmd_ChangeStack));
- DCmd_Register("hotspots", WRAP_METHOD(RivenConsole, Cmd_Hotspots));
- DCmd_Register("zipMode", WRAP_METHOD(RivenConsole, Cmd_ZipMode));
- DCmd_Register("dumpScript", WRAP_METHOD(RivenConsole, Cmd_DumpScript));
- DCmd_Register("listZipCards", WRAP_METHOD(RivenConsole, Cmd_ListZipCards));
- DCmd_Register("getRMAP", WRAP_METHOD(RivenConsole, Cmd_GetRMAP));
- DCmd_Register("combos", WRAP_METHOD(RivenConsole, Cmd_Combos));
- DCmd_Register("sliderState", WRAP_METHOD(RivenConsole, Cmd_SliderState));
+ registerCmd("changeCard", WRAP_METHOD(RivenConsole, Cmd_ChangeCard));
+ registerCmd("curCard", WRAP_METHOD(RivenConsole, Cmd_CurCard));
+ registerCmd("var", WRAP_METHOD(RivenConsole, Cmd_Var));
+ registerCmd("playSound", WRAP_METHOD(RivenConsole, Cmd_PlaySound));
+ registerCmd("playSLST", WRAP_METHOD(RivenConsole, Cmd_PlaySLST));
+ registerCmd("stopSound", WRAP_METHOD(RivenConsole, Cmd_StopSound));
+ registerCmd("curStack", WRAP_METHOD(RivenConsole, Cmd_CurStack));
+ registerCmd("changeStack", WRAP_METHOD(RivenConsole, Cmd_ChangeStack));
+ registerCmd("hotspots", WRAP_METHOD(RivenConsole, Cmd_Hotspots));
+ registerCmd("zipMode", WRAP_METHOD(RivenConsole, Cmd_ZipMode));
+ registerCmd("dumpScript", WRAP_METHOD(RivenConsole, Cmd_DumpScript));
+ registerCmd("listZipCards", WRAP_METHOD(RivenConsole, Cmd_ListZipCards));
+ registerCmd("getRMAP", WRAP_METHOD(RivenConsole, Cmd_GetRMAP));
+ registerCmd("combos", WRAP_METHOD(RivenConsole, Cmd_Combos));
+ registerCmd("sliderState", WRAP_METHOD(RivenConsole, Cmd_SliderState));
}
RivenConsole::~RivenConsole() {
@@ -661,10 +661,10 @@ bool RivenConsole::Cmd_SliderState(int argc, const char **argv) {
#endif // ENABLE_RIVEN
LivingBooksConsole::LivingBooksConsole(MohawkEngine_LivingBooks *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("playSound", WRAP_METHOD(LivingBooksConsole, Cmd_PlaySound));
- DCmd_Register("stopSound", WRAP_METHOD(LivingBooksConsole, Cmd_StopSound));
- DCmd_Register("drawImage", WRAP_METHOD(LivingBooksConsole, Cmd_DrawImage));
- DCmd_Register("changePage", WRAP_METHOD(LivingBooksConsole, Cmd_ChangePage));
+ registerCmd("playSound", WRAP_METHOD(LivingBooksConsole, Cmd_PlaySound));
+ registerCmd("stopSound", WRAP_METHOD(LivingBooksConsole, Cmd_StopSound));
+ registerCmd("drawImage", WRAP_METHOD(LivingBooksConsole, Cmd_DrawImage));
+ registerCmd("changePage", WRAP_METHOD(LivingBooksConsole, Cmd_ChangePage));
}
LivingBooksConsole::~LivingBooksConsole() {
@@ -725,14 +725,14 @@ bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) {
#ifdef ENABLE_CSTIME
CSTimeConsole::CSTimeConsole(MohawkEngine_CSTime *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("playSound", WRAP_METHOD(CSTimeConsole, Cmd_PlaySound));
- DCmd_Register("stopSound", WRAP_METHOD(CSTimeConsole, Cmd_StopSound));
- DCmd_Register("drawImage", WRAP_METHOD(CSTimeConsole, Cmd_DrawImage));
- DCmd_Register("drawSubimage", WRAP_METHOD(CSTimeConsole, Cmd_DrawSubimage));
- DCmd_Register("changeCase", WRAP_METHOD(CSTimeConsole, Cmd_ChangeCase));
- DCmd_Register("changeScene", WRAP_METHOD(CSTimeConsole, Cmd_ChangeScene));
- DCmd_Register("caseVariable", WRAP_METHOD(CSTimeConsole, Cmd_CaseVariable));
- DCmd_Register("invItem", WRAP_METHOD(CSTimeConsole, Cmd_InvItem));
+ registerCmd("playSound", WRAP_METHOD(CSTimeConsole, Cmd_PlaySound));
+ registerCmd("stopSound", WRAP_METHOD(CSTimeConsole, Cmd_StopSound));
+ registerCmd("drawImage", WRAP_METHOD(CSTimeConsole, Cmd_DrawImage));
+ registerCmd("drawSubimage", WRAP_METHOD(CSTimeConsole, Cmd_DrawSubimage));
+ registerCmd("changeCase", WRAP_METHOD(CSTimeConsole, Cmd_ChangeCase));
+ registerCmd("changeScene", WRAP_METHOD(CSTimeConsole, Cmd_ChangeScene));
+ registerCmd("caseVariable", WRAP_METHOD(CSTimeConsole, Cmd_CaseVariable));
+ registerCmd("invItem", WRAP_METHOD(CSTimeConsole, Cmd_InvItem));
}
CSTimeConsole::~CSTimeConsole() {
diff --git a/engines/mortevielle/debugger.cpp b/engines/mortevielle/debugger.cpp
index c8f7591..8418ae0 100644
--- a/engines/mortevielle/debugger.cpp
+++ b/engines/mortevielle/debugger.cpp
@@ -27,9 +27,9 @@ namespace Mortevielle {
Debugger::Debugger(MortevielleEngine *vm) : GUI::Debugger() {
_vm = vm;
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("show_questions", WRAP_METHOD(Debugger, Cmd_showAllQuestions));
- DCmd_Register("reset_parano", WRAP_METHOD(Debugger, Cmd_resetParano));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("show_questions", WRAP_METHOD(Debugger, Cmd_showAllQuestions));
+ registerCmd("reset_parano", WRAP_METHOD(Debugger, Cmd_resetParano));
}
bool Debugger::Cmd_showAllQuestions(int argc, const char **argv) {
diff --git a/engines/neverhood/console.cpp b/engines/neverhood/console.cpp
index b35c29b..91ab3e7 100644
--- a/engines/neverhood/console.cpp
+++ b/engines/neverhood/console.cpp
@@ -34,13 +34,13 @@
namespace Neverhood {
Console::Console(NeverhoodEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("cheat", WRAP_METHOD(Console, Cmd_Cheat));
- DCmd_Register("checkresource", WRAP_METHOD(Console, Cmd_CheckResource));
- DCmd_Register("dumpresource", WRAP_METHOD(Console, Cmd_DumpResource));
- DCmd_Register("dumpvars", WRAP_METHOD(Console, Cmd_Dumpvars));
- DCmd_Register("playsound", WRAP_METHOD(Console, Cmd_PlaySound));
- DCmd_Register("scene", WRAP_METHOD(Console, Cmd_Scene));
- DCmd_Register("surfaces", WRAP_METHOD(Console, Cmd_Surfaces));
+ registerCmd("cheat", WRAP_METHOD(Console, Cmd_Cheat));
+ registerCmd("checkresource", WRAP_METHOD(Console, Cmd_CheckResource));
+ registerCmd("dumpresource", WRAP_METHOD(Console, Cmd_DumpResource));
+ registerCmd("dumpvars", WRAP_METHOD(Console, Cmd_Dumpvars));
+ registerCmd("playsound", WRAP_METHOD(Console, Cmd_PlaySound));
+ registerCmd("scene", WRAP_METHOD(Console, Cmd_Scene));
+ registerCmd("surfaces", WRAP_METHOD(Console, Cmd_Surfaces));
}
Console::~Console() {
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp
index c5e6941..e4239eb 100644
--- a/engines/parallaction/debug.cpp
+++ b/engines/parallaction/debug.cpp
@@ -33,18 +33,18 @@ Debugger::Debugger(Parallaction *vm)
: GUI::Debugger() {
_vm = vm;
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("location", WRAP_METHOD(Debugger, Cmd_Location));
- DCmd_Register("give", WRAP_METHOD(Debugger, Cmd_Give));
- DCmd_Register("zones", WRAP_METHOD(Debugger, Cmd_Zones));
- DCmd_Register("animations", WRAP_METHOD(Debugger, Cmd_Animations));
- DCmd_Register("globalflags",WRAP_METHOD(Debugger, Cmd_GlobalFlags));
- DCmd_Register("toggleglobalflag",WRAP_METHOD(Debugger, Cmd_ToggleGlobalFlag));
- DCmd_Register("localflags", WRAP_METHOD(Debugger, Cmd_LocalFlags));
- DCmd_Register("locations", WRAP_METHOD(Debugger, Cmd_Locations));
- DCmd_Register("gfxobjects", WRAP_METHOD(Debugger, Cmd_GfxObjects));
- DCmd_Register("programs", WRAP_METHOD(Debugger, Cmd_Programs));
- DCmd_Register("showmouse", WRAP_METHOD(Debugger, Cmd_ShowMouse));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("location", WRAP_METHOD(Debugger, Cmd_Location));
+ registerCmd("give", WRAP_METHOD(Debugger, Cmd_Give));
+ registerCmd("zones", WRAP_METHOD(Debugger, Cmd_Zones));
+ registerCmd("animations", WRAP_METHOD(Debugger, Cmd_Animations));
+ registerCmd("globalflags",WRAP_METHOD(Debugger, Cmd_GlobalFlags));
+ registerCmd("toggleglobalflag",WRAP_METHOD(Debugger, Cmd_ToggleGlobalFlag));
+ registerCmd("localflags", WRAP_METHOD(Debugger, Cmd_LocalFlags));
+ registerCmd("locations", WRAP_METHOD(Debugger, Cmd_Locations));
+ registerCmd("gfxobjects", WRAP_METHOD(Debugger, Cmd_GfxObjects));
+ registerCmd("programs", WRAP_METHOD(Debugger, Cmd_Programs));
+ registerCmd("showmouse", WRAP_METHOD(Debugger, Cmd_ShowMouse));
}
diff --git a/engines/pegasus/console.cpp b/engines/pegasus/console.cpp
index 8a465c5..e5a0cfe 100644
--- a/engines/pegasus/console.cpp
+++ b/engines/pegasus/console.cpp
@@ -28,11 +28,11 @@
namespace Pegasus {
PegasusConsole::PegasusConsole(PegasusEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("die", WRAP_METHOD(PegasusConsole, Cmd_Die));
+ registerCmd("die", WRAP_METHOD(PegasusConsole, Cmd_Die));
// These functions are non-demo specific
if (!_vm->isDemo())
- DCmd_Register("jump", WRAP_METHOD(PegasusConsole, Cmd_Jump));
+ registerCmd("jump", WRAP_METHOD(PegasusConsole, Cmd_Jump));
}
PegasusConsole::~PegasusConsole() {
diff --git a/engines/queen/debug.cpp b/engines/queen/debug.cpp
index 2063858..125ddf3 100644
--- a/engines/queen/debug.cpp
+++ b/engines/queen/debug.cpp
@@ -36,15 +36,15 @@ namespace Queen {
Debugger::Debugger(QueenEngine *vm)
: _vm(vm), _flags(0) {
- DCmd_Register("areas", WRAP_METHOD(Debugger, Cmd_Areas));
- DCmd_Register("asm", WRAP_METHOD(Debugger, Cmd_Asm));
- DCmd_Register("bob", WRAP_METHOD(Debugger, Cmd_Bob));
- DCmd_Register("bobs", WRAP_METHOD(Debugger, Cmd_PrintBobs));
- DCmd_Register("gs", WRAP_METHOD(Debugger, Cmd_GameState));
- DCmd_Register("info", WRAP_METHOD(Debugger, Cmd_Info));
- DCmd_Register("items", WRAP_METHOD(Debugger, Cmd_Items));
- DCmd_Register("room", WRAP_METHOD(Debugger, Cmd_Room));
- DCmd_Register("song", WRAP_METHOD(Debugger, Cmd_Song));
+ registerCmd("areas", WRAP_METHOD(Debugger, Cmd_Areas));
+ registerCmd("asm", WRAP_METHOD(Debugger, Cmd_Asm));
+ registerCmd("bob", WRAP_METHOD(Debugger, Cmd_Bob));
+ registerCmd("bobs", WRAP_METHOD(Debugger, Cmd_PrintBobs));
+ registerCmd("gs", WRAP_METHOD(Debugger, Cmd_GameState));
+ registerCmd("info", WRAP_METHOD(Debugger, Cmd_Info));
+ registerCmd("items", WRAP_METHOD(Debugger, Cmd_Items));
+ registerCmd("room", WRAP_METHOD(Debugger, Cmd_Room));
+ registerCmd("song", WRAP_METHOD(Debugger, Cmd_Song));
}
Debugger::~Debugger() {} // we need this here for __SYMBIAN32__
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp
index 48aa9f9..042635e 100644
--- a/engines/saga/console.cpp
+++ b/engines/saga/console.cpp
@@ -35,15 +35,15 @@ namespace Saga {
Console::Console(SagaEngine *vm) : GUI::Debugger() {
_vm = vm;
- DCmd_Register("continue", WRAP_METHOD(Console, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Console, Cmd_Exit));
// Actor commands
- DCmd_Register("actor_walk_to", WRAP_METHOD(Console, cmdActorWalkTo));
+ registerCmd("actor_walk_to", WRAP_METHOD(Console, cmdActorWalkTo));
// Animation commands
- DCmd_Register("anim_info", WRAP_METHOD(Console, cmdAnimInfo));
- DCmd_Register("cutaway_info", WRAP_METHOD(Console, cmdCutawayInfo));
- DCmd_Register("play_cutaway", WRAP_METHOD(Console, cmdPlayCutaway));
+ registerCmd("anim_info", WRAP_METHOD(Console, cmdAnimInfo));
+ registerCmd("cutaway_info", WRAP_METHOD(Console, cmdCutawayInfo));
+ registerCmd("play_cutaway", WRAP_METHOD(Console, cmdPlayCutaway));
// Game stuff
@@ -60,28 +60,28 @@ Console::Console(SagaEngine *vm) : GUI::Debugger() {
#endif
// Scene commands
- DCmd_Register("current_scene", WRAP_METHOD(Console, cmdCurrentScene));
- DCmd_Register("current_chapter", WRAP_METHOD(Console, cmdCurrentChapter));
- DCmd_Register("scene_change", WRAP_METHOD(Console, cmdSceneChange));
- DCmd_Register("chapter_change", WRAP_METHOD(Console, cmdChapterChange));
+ registerCmd("current_scene", WRAP_METHOD(Console, cmdCurrentScene));
+ registerCmd("current_chapter", WRAP_METHOD(Console, cmdCurrentChapter));
+ registerCmd("scene_change", WRAP_METHOD(Console, cmdSceneChange));
+ registerCmd("chapter_change", WRAP_METHOD(Console, cmdChapterChange));
- DCmd_Register("action_map_info", WRAP_METHOD(Console, cmdActionMapInfo));
- DCmd_Register("object_map_info", WRAP_METHOD(Console, cmdObjectMapInfo));
+ registerCmd("action_map_info", WRAP_METHOD(Console, cmdActionMapInfo));
+ registerCmd("object_map_info", WRAP_METHOD(Console, cmdObjectMapInfo));
// Script commands
- DCmd_Register("wake_up_threads", WRAP_METHOD(Console, cmdWakeUpThreads));
+ registerCmd("wake_up_threads", WRAP_METHOD(Console, cmdWakeUpThreads));
// Panel commands
- DCmd_Register("current_panel_mode", WRAP_METHOD(Console, cmdCurrentPanelMode));
- DCmd_Register("set_panel_mode", WRAP_METHOD(Console, cmdSetPanelMode));
+ registerCmd("current_panel_mode", WRAP_METHOD(Console, cmdCurrentPanelMode));
+ registerCmd("set_panel_mode", WRAP_METHOD(Console, cmdSetPanelMode));
// Font commands
- DCmd_Register("set_font_mapping", WRAP_METHOD(Console, cmdSetFontMapping));
+ registerCmd("set_font_mapping", WRAP_METHOD(Console, cmdSetFontMapping));
// Global flags commands
- DCmd_Register("global_flags_info", WRAP_METHOD(Console, cmdGlobalFlagsInfo));
- DCmd_Register("set_global_flag", WRAP_METHOD(Console, cmdSetGlobalFlag));
- DCmd_Register("clear_global_flag", WRAP_METHOD(Console, cmdClearGlobalFlag));
+ registerCmd("global_flags_info", WRAP_METHOD(Console, cmdGlobalFlagsInfo));
+ registerCmd("set_global_flag", WRAP_METHOD(Console, cmdSetGlobalFlag));
+ registerCmd("clear_global_flag", WRAP_METHOD(Console, cmdClearGlobalFlag));
}
Console::~Console() {
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index b02429c..1a2ee21 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -86,141 +86,141 @@ Console::Console(SciEngine *engine) : GUI::Debugger(),
registerVar("script_abort_flag", &_engine->_gamestate->abortScriptProcessing, DVAR_INT, 0);
// General
- DCmd_Register("help", WRAP_METHOD(Console, cmdHelp));
+ registerCmd("help", WRAP_METHOD(Console, cmdHelp));
// Kernel
-// DCmd_Register("classes", WRAP_METHOD(Console, cmdClasses)); // TODO
- DCmd_Register("opcodes", WRAP_METHOD(Console, cmdOpcodes));
- DCmd_Register("selector", WRAP_METHOD(Console, cmdSelector));
- DCmd_Register("selectors", WRAP_METHOD(Console, cmdSelectors));
- DCmd_Register("functions", WRAP_METHOD(Console, cmdKernelFunctions));
- DCmd_Register("class_table", WRAP_METHOD(Console, cmdClassTable));
+// registerCmd("classes", WRAP_METHOD(Console, cmdClasses)); // TODO
+ registerCmd("opcodes", WRAP_METHOD(Console, cmdOpcodes));
+ registerCmd("selector", WRAP_METHOD(Console, cmdSelector));
+ registerCmd("selectors", WRAP_METHOD(Console, cmdSelectors));
+ registerCmd("functions", WRAP_METHOD(Console, cmdKernelFunctions));
+ registerCmd("class_table", WRAP_METHOD(Console, cmdClassTable));
// Parser
- DCmd_Register("suffixes", WRAP_METHOD(Console, cmdSuffixes));
- DCmd_Register("parse_grammar", WRAP_METHOD(Console, cmdParseGrammar));
- DCmd_Register("parser_nodes", WRAP_METHOD(Console, cmdParserNodes));
- DCmd_Register("parser_words", WRAP_METHOD(Console, cmdParserWords));
- DCmd_Register("sentence_fragments", WRAP_METHOD(Console, cmdSentenceFragments));
- DCmd_Register("parse", WRAP_METHOD(Console, cmdParse));
- DCmd_Register("set_parse_nodes", WRAP_METHOD(Console, cmdSetParseNodes));
- DCmd_Register("said", WRAP_METHOD(Console, cmdSaid));
+ registerCmd("suffixes", WRAP_METHOD(Console, cmdSuffixes));
+ registerCmd("parse_grammar", WRAP_METHOD(Console, cmdParseGrammar));
+ registerCmd("parser_nodes", WRAP_METHOD(Console, cmdParserNodes));
+ registerCmd("parser_words", WRAP_METHOD(Console, cmdParserWords));
+ registerCmd("sentence_fragments", WRAP_METHOD(Console, cmdSentenceFragments));
+ registerCmd("parse", WRAP_METHOD(Console, cmdParse));
+ registerCmd("set_parse_nodes", WRAP_METHOD(Console, cmdSetParseNodes));
+ registerCmd("said", WRAP_METHOD(Console, cmdSaid));
// Resources
- DCmd_Register("diskdump", WRAP_METHOD(Console, cmdDiskDump));
- DCmd_Register("hexdump", WRAP_METHOD(Console, cmdHexDump));
- DCmd_Register("resource_id", WRAP_METHOD(Console, cmdResourceId));
- DCmd_Register("resource_info", WRAP_METHOD(Console, cmdResourceInfo));
- DCmd_Register("resource_types", WRAP_METHOD(Console, cmdResourceTypes));
- DCmd_Register("list", WRAP_METHOD(Console, cmdList));
- DCmd_Register("hexgrep", WRAP_METHOD(Console, cmdHexgrep));
- DCmd_Register("verify_scripts", WRAP_METHOD(Console, cmdVerifyScripts));
+ registerCmd("diskdump", WRAP_METHOD(Console, cmdDiskDump));
+ registerCmd("hexdump", WRAP_METHOD(Console, cmdHexDump));
+ registerCmd("resource_id", WRAP_METHOD(Console, cmdResourceId));
+ registerCmd("resource_info", WRAP_METHOD(Console, cmdResourceInfo));
+ registerCmd("resource_types", WRAP_METHOD(Console, cmdResourceTypes));
+ registerCmd("list", WRAP_METHOD(Console, cmdList));
+ registerCmd("hexgrep", WRAP_METHOD(Console, cmdHexgrep));
+ registerCmd("verify_scripts", WRAP_METHOD(Console, cmdVerifyScripts));
// Game
- DCmd_Register("save_game", WRAP_METHOD(Console, cmdSaveGame));
- DCmd_Register("restore_game", WRAP_METHOD(Console, cmdRestoreGame));
- DCmd_Register("restart_game", WRAP_METHOD(Console, cmdRestartGame));
- DCmd_Register("version", WRAP_METHOD(Console, cmdGetVersion));
- DCmd_Register("room", WRAP_METHOD(Console, cmdRoomNumber));
- DCmd_Register("quit", WRAP_METHOD(Console, cmdQuit));
- DCmd_Register("list_saves", WRAP_METHOD(Console, cmdListSaves));
+ registerCmd("save_game", WRAP_METHOD(Console, cmdSaveGame));
+ registerCmd("restore_game", WRAP_METHOD(Console, cmdRestoreGame));
+ registerCmd("restart_game", WRAP_METHOD(Console, cmdRestartGame));
+ registerCmd("version", WRAP_METHOD(Console, cmdGetVersion));
+ registerCmd("room", WRAP_METHOD(Console, cmdRoomNumber));
+ registerCmd("quit", WRAP_METHOD(Console, cmdQuit));
+ registerCmd("list_saves", WRAP_METHOD(Console, cmdListSaves));
// Graphics
- DCmd_Register("show_map", WRAP_METHOD(Console, cmdShowMap));
- DCmd_Register("set_palette", WRAP_METHOD(Console, cmdSetPalette));
- DCmd_Register("draw_pic", WRAP_METHOD(Console, cmdDrawPic));
- DCmd_Register("draw_cel", WRAP_METHOD(Console, cmdDrawCel));
- DCmd_Register("undither", WRAP_METHOD(Console, cmdUndither));
- DCmd_Register("pic_visualize", WRAP_METHOD(Console, cmdPicVisualize));
- DCmd_Register("play_video", WRAP_METHOD(Console, cmdPlayVideo));
- DCmd_Register("animate_list", WRAP_METHOD(Console, cmdAnimateList));
- DCmd_Register("al", WRAP_METHOD(Console, cmdAnimateList)); // alias
- DCmd_Register("window_list", WRAP_METHOD(Console, cmdWindowList));
- DCmd_Register("wl", WRAP_METHOD(Console, cmdWindowList)); // alias
- DCmd_Register("plane_list", WRAP_METHOD(Console, cmdPlaneList));
- DCmd_Register("pl", WRAP_METHOD(Console, cmdPlaneList)); // alias
- DCmd_Register("plane_items", WRAP_METHOD(Console, cmdPlaneItemList));
- DCmd_Register("pi", WRAP_METHOD(Console, cmdPlaneItemList)); // alias
- DCmd_Register("saved_bits", WRAP_METHOD(Console, cmdSavedBits));
- DCmd_Register("show_saved_bits", WRAP_METHOD(Console, cmdShowSavedBits));
+ registerCmd("show_map", WRAP_METHOD(Console, cmdShowMap));
+ registerCmd("set_palette", WRAP_METHOD(Console, cmdSetPalette));
+ registerCmd("draw_pic", WRAP_METHOD(Console, cmdDrawPic));
+ registerCmd("draw_cel", WRAP_METHOD(Console, cmdDrawCel));
+ registerCmd("undither", WRAP_METHOD(Console, cmdUndither));
+ registerCmd("pic_visualize", WRAP_METHOD(Console, cmdPicVisualize));
+ registerCmd("play_video", WRAP_METHOD(Console, cmdPlayVideo));
+ registerCmd("animate_list", WRAP_METHOD(Console, cmdAnimateList));
+ registerCmd("al", WRAP_METHOD(Console, cmdAnimateList)); // alias
+ registerCmd("window_list", WRAP_METHOD(Console, cmdWindowList));
+ registerCmd("wl", WRAP_METHOD(Console, cmdWindowList)); // alias
+ registerCmd("plane_list", WRAP_METHOD(Console, cmdPlaneList));
+ registerCmd("pl", WRAP_METHOD(Console, cmdPlaneList)); // alias
+ registerCmd("plane_items", WRAP_METHOD(Console, cmdPlaneItemList));
+ registerCmd("pi", WRAP_METHOD(Console, cmdPlaneItemList)); // alias
+ registerCmd("saved_bits", WRAP_METHOD(Console, cmdSavedBits));
+ registerCmd("show_saved_bits", WRAP_METHOD(Console, cmdShowSavedBits));
// Segments
- DCmd_Register("segment_table", WRAP_METHOD(Console, cmdPrintSegmentTable));
- DCmd_Register("segtable", WRAP_METHOD(Console, cmdPrintSegmentTable)); // alias
- DCmd_Register("segment_info", WRAP_METHOD(Console, cmdSegmentInfo));
- DCmd_Register("seginfo", WRAP_METHOD(Console, cmdSegmentInfo)); // alias
- DCmd_Register("segment_kill", WRAP_METHOD(Console, cmdKillSegment));
- DCmd_Register("segkill", WRAP_METHOD(Console, cmdKillSegment)); // alias
+ registerCmd("segment_table", WRAP_METHOD(Console, cmdPrintSegmentTable));
+ registerCmd("segtable", WRAP_METHOD(Console, cmdPrintSegmentTable)); // alias
+ registerCmd("segment_info", WRAP_METHOD(Console, cmdSegmentInfo));
+ registerCmd("seginfo", WRAP_METHOD(Console, cmdSegmentInfo)); // alias
+ registerCmd("segment_kill", WRAP_METHOD(Console, cmdKillSegment));
+ registerCmd("segkill", WRAP_METHOD(Console, cmdKillSegment)); // alias
// Garbage collection
- DCmd_Register("gc", WRAP_METHOD(Console, cmdGCInvoke));
- DCmd_Register("gc_objects", WRAP_METHOD(Console, cmdGCObjects));
- DCmd_Register("gc_reachable", WRAP_METHOD(Console, cmdGCShowReachable));
- DCmd_Register("gc_freeable", WRAP_METHOD(Console, cmdGCShowFreeable));
- DCmd_Register("gc_normalize", WRAP_METHOD(Console, cmdGCNormalize));
+ registerCmd("gc", WRAP_METHOD(Console, cmdGCInvoke));
+ registerCmd("gc_objects", WRAP_METHOD(Console, cmdGCObjects));
+ registerCmd("gc_reachable", WRAP_METHOD(Console, cmdGCShowReachable));
+ registerCmd("gc_freeable", WRAP_METHOD(Console, cmdGCShowFreeable));
+ registerCmd("gc_normalize", WRAP_METHOD(Console, cmdGCNormalize));
// Music/SFX
- DCmd_Register("songlib", WRAP_METHOD(Console, cmdSongLib));
- DCmd_Register("songinfo", WRAP_METHOD(Console, cmdSongInfo));
- DCmd_Register("is_sample", WRAP_METHOD(Console, cmdIsSample));
- DCmd_Register("startsound", WRAP_METHOD(Console, cmdStartSound));
- DCmd_Register("togglesound", WRAP_METHOD(Console, cmdToggleSound));
- DCmd_Register("stopallsounds", WRAP_METHOD(Console, cmdStopAllSounds));
- DCmd_Register("sfx01_header", WRAP_METHOD(Console, cmdSfx01Header));
- DCmd_Register("sfx01_track", WRAP_METHOD(Console, cmdSfx01Track));
- DCmd_Register("show_instruments", WRAP_METHOD(Console, cmdShowInstruments));
- DCmd_Register("map_instrument", WRAP_METHOD(Console, cmdMapInstrument));
+ registerCmd("songlib", WRAP_METHOD(Console, cmdSongLib));
+ registerCmd("songinfo", WRAP_METHOD(Console, cmdSongInfo));
+ registerCmd("is_sample", WRAP_METHOD(Console, cmdIsSample));
+ registerCmd("startsound", WRAP_METHOD(Console, cmdStartSound));
+ registerCmd("togglesound", WRAP_METHOD(Console, cmdToggleSound));
+ registerCmd("stopallsounds", WRAP_METHOD(Console, cmdStopAllSounds));
+ registerCmd("sfx01_header", WRAP_METHOD(Console, cmdSfx01Header));
+ registerCmd("sfx01_track", WRAP_METHOD(Console, cmdSfx01Track));
+ registerCmd("show_instruments", WRAP_METHOD(Console, cmdShowInstruments));
+ registerCmd("map_instrument", WRAP_METHOD(Console, cmdMapInstrument));
// Script
- DCmd_Register("addresses", WRAP_METHOD(Console, cmdAddresses));
- DCmd_Register("registers", WRAP_METHOD(Console, cmdRegisters));
- DCmd_Register("dissect_script", WRAP_METHOD(Console, cmdDissectScript));
- DCmd_Register("backtrace", WRAP_METHOD(Console, cmdBacktrace));
- DCmd_Register("bt", WRAP_METHOD(Console, cmdBacktrace)); // alias
- DCmd_Register("trace", WRAP_METHOD(Console, cmdTrace));
- DCmd_Register("t", WRAP_METHOD(Console, cmdTrace)); // alias
- DCmd_Register("s", WRAP_METHOD(Console, cmdTrace)); // alias
- DCmd_Register("stepover", WRAP_METHOD(Console, cmdStepOver));
- DCmd_Register("p", WRAP_METHOD(Console, cmdStepOver)); // alias
- DCmd_Register("step_ret", WRAP_METHOD(Console, cmdStepRet));
- DCmd_Register("pret", WRAP_METHOD(Console, cmdStepRet)); // alias
- DCmd_Register("step_event", WRAP_METHOD(Console, cmdStepEvent));
- DCmd_Register("se", WRAP_METHOD(Console, cmdStepEvent)); // alias
- DCmd_Register("step_global", WRAP_METHOD(Console, cmdStepGlobal));
- DCmd_Register("sg", WRAP_METHOD(Console, cmdStepGlobal)); // alias
- DCmd_Register("step_callk", WRAP_METHOD(Console, cmdStepCallk));
- DCmd_Register("snk", WRAP_METHOD(Console, cmdStepCallk)); // alias
- DCmd_Register("disasm", WRAP_METHOD(Console, cmdDisassemble));
- DCmd_Register("disasm_addr", WRAP_METHOD(Console, cmdDisassembleAddress));
- DCmd_Register("find_callk", WRAP_METHOD(Console, cmdFindKernelFunctionCall));
- DCmd_Register("send", WRAP_METHOD(Console, cmdSend));
- DCmd_Register("go", WRAP_METHOD(Console, cmdGo));
- DCmd_Register("logkernel", WRAP_METHOD(Console, cmdLogKernel));
+ registerCmd("addresses", WRAP_METHOD(Console, cmdAddresses));
+ registerCmd("registers", WRAP_METHOD(Console, cmdRegisters));
+ registerCmd("dissect_script", WRAP_METHOD(Console, cmdDissectScript));
+ registerCmd("backtrace", WRAP_METHOD(Console, cmdBacktrace));
+ registerCmd("bt", WRAP_METHOD(Console, cmdBacktrace)); // alias
+ registerCmd("trace", WRAP_METHOD(Console, cmdTrace));
+ registerCmd("t", WRAP_METHOD(Console, cmdTrace)); // alias
+ registerCmd("s", WRAP_METHOD(Console, cmdTrace)); // alias
+ registerCmd("stepover", WRAP_METHOD(Console, cmdStepOver));
+ registerCmd("p", WRAP_METHOD(Console, cmdStepOver)); // alias
+ registerCmd("step_ret", WRAP_METHOD(Console, cmdStepRet));
+ registerCmd("pret", WRAP_METHOD(Console, cmdStepRet)); // alias
+ registerCmd("step_event", WRAP_METHOD(Console, cmdStepEvent));
+ registerCmd("se", WRAP_METHOD(Console, cmdStepEvent)); // alias
+ registerCmd("step_global", WRAP_METHOD(Console, cmdStepGlobal));
+ registerCmd("sg", WRAP_METHOD(Console, cmdStepGlobal)); // alias
+ registerCmd("step_callk", WRAP_METHOD(Console, cmdStepCallk));
+ registerCmd("snk", WRAP_METHOD(Console, cmdStepCallk)); // alias
+ registerCmd("disasm", WRAP_METHOD(Console, cmdDisassemble));
+ registerCmd("disasm_addr", WRAP_METHOD(Console, cmdDisassembleAddress));
+ registerCmd("find_callk", WRAP_METHOD(Console, cmdFindKernelFunctionCall));
+ registerCmd("send", WRAP_METHOD(Console, cmdSend));
+ registerCmd("go", WRAP_METHOD(Console, cmdGo));
+ registerCmd("logkernel", WRAP_METHOD(Console, cmdLogKernel));
// Breakpoints
- DCmd_Register("bp_list", WRAP_METHOD(Console, cmdBreakpointList));
- DCmd_Register("bplist", WRAP_METHOD(Console, cmdBreakpointList)); // alias
- DCmd_Register("bl", WRAP_METHOD(Console, cmdBreakpointList)); // alias
- DCmd_Register("bp_del", WRAP_METHOD(Console, cmdBreakpointDelete));
- DCmd_Register("bpdel", WRAP_METHOD(Console, cmdBreakpointDelete)); // alias
- DCmd_Register("bc", WRAP_METHOD(Console, cmdBreakpointDelete)); // alias
- DCmd_Register("bp_method", WRAP_METHOD(Console, cmdBreakpointMethod));
- DCmd_Register("bpx", WRAP_METHOD(Console, cmdBreakpointMethod)); // alias
- DCmd_Register("bp_read", WRAP_METHOD(Console, cmdBreakpointRead));
- DCmd_Register("bpr", WRAP_METHOD(Console, cmdBreakpointRead)); // alias
- DCmd_Register("bp_write", WRAP_METHOD(Console, cmdBreakpointWrite));
- DCmd_Register("bpw", WRAP_METHOD(Console, cmdBreakpointWrite)); // alias
- DCmd_Register("bp_kernel", WRAP_METHOD(Console, cmdBreakpointKernel));
- DCmd_Register("bpk", WRAP_METHOD(Console, cmdBreakpointKernel)); // alias
- DCmd_Register("bp_function", WRAP_METHOD(Console, cmdBreakpointFunction));
- DCmd_Register("bpe", WRAP_METHOD(Console, cmdBreakpointFunction)); // alias
+ registerCmd("bp_list", WRAP_METHOD(Console, cmdBreakpointList));
+ registerCmd("bplist", WRAP_METHOD(Console, cmdBreakpointList)); // alias
+ registerCmd("bl", WRAP_METHOD(Console, cmdBreakpointList)); // alias
+ registerCmd("bp_del", WRAP_METHOD(Console, cmdBreakpointDelete));
+ registerCmd("bpdel", WRAP_METHOD(Console, cmdBreakpointDelete)); // alias
+ registerCmd("bc", WRAP_METHOD(Console, cmdBreakpointDelete)); // alias
+ registerCmd("bp_method", WRAP_METHOD(Console, cmdBreakpointMethod));
+ registerCmd("bpx", WRAP_METHOD(Console, cmdBreakpointMethod)); // alias
+ registerCmd("bp_read", WRAP_METHOD(Console, cmdBreakpointRead));
+ registerCmd("bpr", WRAP_METHOD(Console, cmdBreakpointRead)); // alias
+ registerCmd("bp_write", WRAP_METHOD(Console, cmdBreakpointWrite));
+ registerCmd("bpw", WRAP_METHOD(Console, cmdBreakpointWrite)); // alias
+ registerCmd("bp_kernel", WRAP_METHOD(Console, cmdBreakpointKernel));
+ registerCmd("bpk", WRAP_METHOD(Console, cmdBreakpointKernel)); // alias
+ registerCmd("bp_function", WRAP_METHOD(Console, cmdBreakpointFunction));
+ registerCmd("bpe", WRAP_METHOD(Console, cmdBreakpointFunction)); // alias
// VM
- DCmd_Register("script_steps", WRAP_METHOD(Console, cmdScriptSteps));
- DCmd_Register("vm_varlist", WRAP_METHOD(Console, cmdVMVarlist));
- DCmd_Register("vmvarlist", WRAP_METHOD(Console, cmdVMVarlist)); // alias
- DCmd_Register("vl", WRAP_METHOD(Console, cmdVMVarlist)); // alias
- DCmd_Register("vm_vars", WRAP_METHOD(Console, cmdVMVars));
- DCmd_Register("vmvars", WRAP_METHOD(Console, cmdVMVars)); // alias
- DCmd_Register("vv", WRAP_METHOD(Console, cmdVMVars)); // alias
- DCmd_Register("stack", WRAP_METHOD(Console, cmdStack));
- DCmd_Register("value_type", WRAP_METHOD(Console, cmdValueType));
- DCmd_Register("view_listnode", WRAP_METHOD(Console, cmdViewListNode));
- DCmd_Register("view_reference", WRAP_METHOD(Console, cmdViewReference));
- DCmd_Register("vr", WRAP_METHOD(Console, cmdViewReference)); // alias
- DCmd_Register("view_object", WRAP_METHOD(Console, cmdViewObject));
- DCmd_Register("vo", WRAP_METHOD(Console, cmdViewObject)); // alias
- DCmd_Register("active_object", WRAP_METHOD(Console, cmdViewActiveObject));
- DCmd_Register("acc_object", WRAP_METHOD(Console, cmdViewAccumulatorObject));
+ registerCmd("script_steps", WRAP_METHOD(Console, cmdScriptSteps));
+ registerCmd("vm_varlist", WRAP_METHOD(Console, cmdVMVarlist));
+ registerCmd("vmvarlist", WRAP_METHOD(Console, cmdVMVarlist)); // alias
+ registerCmd("vl", WRAP_METHOD(Console, cmdVMVarlist)); // alias
+ registerCmd("vm_vars", WRAP_METHOD(Console, cmdVMVars));
+ registerCmd("vmvars", WRAP_METHOD(Console, cmdVMVars)); // alias
+ registerCmd("vv", WRAP_METHOD(Console, cmdVMVars)); // alias
+ registerCmd("stack", WRAP_METHOD(Console, cmdStack));
+ registerCmd("value_type", WRAP_METHOD(Console, cmdValueType));
+ registerCmd("view_listnode", WRAP_METHOD(Console, cmdViewListNode));
+ registerCmd("view_reference", WRAP_METHOD(Console, cmdViewReference));
+ registerCmd("vr", WRAP_METHOD(Console, cmdViewReference)); // alias
+ registerCmd("view_object", WRAP_METHOD(Console, cmdViewObject));
+ registerCmd("vo", WRAP_METHOD(Console, cmdViewObject)); // alias
+ registerCmd("active_object", WRAP_METHOD(Console, cmdViewActiveObject));
+ registerCmd("acc_object", WRAP_METHOD(Console, cmdViewAccumulatorObject));
_debugState.seeking = kDebugSeekNothing;
_debugState.seekLevel = 0;
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 01535bf..fed523f 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -64,39 +64,39 @@ ScummDebugger::ScummDebugger(ScummEngine *s)
registerVar("scumm_vars", &_vm->_scummVars, DVAR_INTARRAY, _vm->_numVariables);
// Register commands
- DCmd_Register("continue", WRAP_METHOD(ScummDebugger, Cmd_Exit));
- DCmd_Register("restart", WRAP_METHOD(ScummDebugger, Cmd_Restart));
-
- DCmd_Register("actor", WRAP_METHOD(ScummDebugger, Cmd_Actor));
- DCmd_Register("actors", WRAP_METHOD(ScummDebugger, Cmd_PrintActor));
- DCmd_Register("box", WRAP_METHOD(ScummDebugger, Cmd_PrintBox));
- DCmd_Register("matrix", WRAP_METHOD(ScummDebugger, Cmd_PrintBoxMatrix));
- DCmd_Register("camera", WRAP_METHOD(ScummDebugger, Cmd_Camera));
- DCmd_Register("room", WRAP_METHOD(ScummDebugger, Cmd_Room));
- DCmd_Register("objects", WRAP_METHOD(ScummDebugger, Cmd_PrintObjects));
- DCmd_Register("object", WRAP_METHOD(ScummDebugger, Cmd_Object));
- DCmd_Register("script", WRAP_METHOD(ScummDebugger, Cmd_Script));
- DCmd_Register("scr", WRAP_METHOD(ScummDebugger, Cmd_Script));
- DCmd_Register("scripts", WRAP_METHOD(ScummDebugger, Cmd_PrintScript));
- DCmd_Register("importres", WRAP_METHOD(ScummDebugger, Cmd_ImportRes));
+ registerCmd("continue", WRAP_METHOD(ScummDebugger, Cmd_Exit));
+ registerCmd("restart", WRAP_METHOD(ScummDebugger, Cmd_Restart));
+
+ registerCmd("actor", WRAP_METHOD(ScummDebugger, Cmd_Actor));
+ registerCmd("actors", WRAP_METHOD(ScummDebugger, Cmd_PrintActor));
+ registerCmd("box", WRAP_METHOD(ScummDebugger, Cmd_PrintBox));
+ registerCmd("matrix", WRAP_METHOD(ScummDebugger, Cmd_PrintBoxMatrix));
+ registerCmd("camera", WRAP_METHOD(ScummDebugger, Cmd_Camera));
+ registerCmd("room", WRAP_METHOD(ScummDebugger, Cmd_Room));
+ registerCmd("objects", WRAP_METHOD(ScummDebugger, Cmd_PrintObjects));
+ registerCmd("object", WRAP_METHOD(ScummDebugger, Cmd_Object));
+ registerCmd("script", WRAP_METHOD(ScummDebugger, Cmd_Script));
+ registerCmd("scr", WRAP_METHOD(ScummDebugger, Cmd_Script));
+ registerCmd("scripts", WRAP_METHOD(ScummDebugger, Cmd_PrintScript));
+ registerCmd("importres", WRAP_METHOD(ScummDebugger, Cmd_ImportRes));
if (_vm->_game.id == GID_LOOM)
- DCmd_Register("drafts", WRAP_METHOD(ScummDebugger, Cmd_PrintDraft));
+ registerCmd("drafts", WRAP_METHOD(ScummDebugger, Cmd_PrintDraft));
if (_vm->_game.id == GID_MONKEY && _vm->_game.platform == Common::kPlatformSegaCD)
- DCmd_Register("passcode", WRAP_METHOD(ScummDebugger, Cmd_Passcode));
+ registerCmd("passcode", WRAP_METHOD(ScummDebugger, Cmd_Passcode));
- DCmd_Register("loadgame", WRAP_METHOD(ScummDebugger, Cmd_LoadGame));
- DCmd_Register("savegame", WRAP_METHOD(ScummDebugger, Cmd_SaveGame));
+ registerCmd("loadgame", WRAP_METHOD(ScummDebugger, Cmd_LoadGame));
+ registerCmd("savegame", WRAP_METHOD(ScummDebugger, Cmd_SaveGame));
- DCmd_Register("debug", WRAP_METHOD(ScummDebugger, Cmd_Debug));
+ registerCmd("debug", WRAP_METHOD(ScummDebugger, Cmd_Debug));
- DCmd_Register("show", WRAP_METHOD(ScummDebugger, Cmd_Show));
- DCmd_Register("hide", WRAP_METHOD(ScummDebugger, Cmd_Hide));
+ registerCmd("show", WRAP_METHOD(ScummDebugger, Cmd_Show));
+ registerCmd("hide", WRAP_METHOD(ScummDebugger, Cmd_Hide));
- DCmd_Register("imuse", WRAP_METHOD(ScummDebugger, Cmd_IMuse));
+ registerCmd("imuse", WRAP_METHOD(ScummDebugger, Cmd_IMuse));
- DCmd_Register("resetcursors", WRAP_METHOD(ScummDebugger, Cmd_ResetCursors));
+ registerCmd("resetcursors", WRAP_METHOD(ScummDebugger, Cmd_ResetCursors));
}
ScummDebugger::~ScummDebugger() {
diff --git a/engines/sky/debug.cpp b/engines/sky/debug.cpp
index f79ce2b..d663bd2 100644
--- a/engines/sky/debug.cpp
+++ b/engines/sky/debug.cpp
@@ -1087,14 +1087,14 @@ void Debug::mcode(uint32 mcode, uint32 a, uint32 b, uint32 c) {
Debugger::Debugger(Logic *logic, Mouse *mouse, Screen *screen, SkyCompact *skyCompact)
: GUI::Debugger(), _logic(logic), _mouse(mouse), _screen(screen), _skyCompact(skyCompact), _showGrid(false) {
- DCmd_Register("info", WRAP_METHOD(Debugger, Cmd_Info));
- DCmd_Register("showgrid", WRAP_METHOD(Debugger, Cmd_ShowGrid));
- DCmd_Register("reloadgrid", WRAP_METHOD(Debugger, Cmd_ReloadGrid));
- DCmd_Register("compact", WRAP_METHOD(Debugger, Cmd_ShowCompact));
- DCmd_Register("logiccmd", WRAP_METHOD(Debugger, Cmd_LogicCommand));
- DCmd_Register("scriptvar", WRAP_METHOD(Debugger, Cmd_ScriptVar));
- DCmd_Register("section", WRAP_METHOD(Debugger, Cmd_Section));
- DCmd_Register("logiclist", WRAP_METHOD(Debugger, Cmd_LogicList));
+ registerCmd("info", WRAP_METHOD(Debugger, Cmd_Info));
+ registerCmd("showgrid", WRAP_METHOD(Debugger, Cmd_ShowGrid));
+ registerCmd("reloadgrid", WRAP_METHOD(Debugger, Cmd_ReloadGrid));
+ registerCmd("compact", WRAP_METHOD(Debugger, Cmd_ShowCompact));
+ registerCmd("logiccmd", WRAP_METHOD(Debugger, Cmd_LogicCommand));
+ registerCmd("scriptvar", WRAP_METHOD(Debugger, Cmd_ScriptVar));
+ registerCmd("section", WRAP_METHOD(Debugger, Cmd_Section));
+ registerCmd("logiclist", WRAP_METHOD(Debugger, Cmd_LogicList));
}
Debugger::~Debugger() {} // we need this here for __SYMBIAN32__
diff --git a/engines/sword2/console.cpp b/engines/sword2/console.cpp
index 7c45368..810b40c 100644
--- a/engines/sword2/console.cpp
+++ b/engines/sword2/console.cpp
@@ -82,45 +82,45 @@ Debugger::Debugger(Sword2Engine *vm)
// Register commands
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("q", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("mem", WRAP_METHOD(Debugger, Cmd_Mem));
- DCmd_Register("tony", WRAP_METHOD(Debugger, Cmd_Tony));
- DCmd_Register("res", WRAP_METHOD(Debugger, Cmd_Res));
- DCmd_Register("reslist", WRAP_METHOD(Debugger, Cmd_ResList));
- DCmd_Register("starts", WRAP_METHOD(Debugger, Cmd_Starts));
- DCmd_Register("start", WRAP_METHOD(Debugger, Cmd_Start));
- DCmd_Register("s", WRAP_METHOD(Debugger, Cmd_Start));
- DCmd_Register("info", WRAP_METHOD(Debugger, Cmd_Info));
- DCmd_Register("walkgrid", WRAP_METHOD(Debugger, Cmd_WalkGrid));
- DCmd_Register("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
- DCmd_Register("player", WRAP_METHOD(Debugger, Cmd_Player));
- DCmd_Register("reslook", WRAP_METHOD(Debugger, Cmd_ResLook));
- DCmd_Register("cur", WRAP_METHOD(Debugger, Cmd_CurrentInfo));
- DCmd_Register("runlist", WRAP_METHOD(Debugger, Cmd_RunList));
- DCmd_Register("kill", WRAP_METHOD(Debugger, Cmd_Kill));
- DCmd_Register("nuke", WRAP_METHOD(Debugger, Cmd_Nuke));
- DCmd_Register("var", WRAP_METHOD(Debugger, Cmd_Var));
- DCmd_Register("rect", WRAP_METHOD(Debugger, Cmd_Rect));
- DCmd_Register("clear", WRAP_METHOD(Debugger, Cmd_Clear));
- DCmd_Register("debugon", WRAP_METHOD(Debugger, Cmd_DebugOn));
- DCmd_Register("debugoff", WRAP_METHOD(Debugger, Cmd_DebugOff));
- DCmd_Register("saverest", WRAP_METHOD(Debugger, Cmd_SaveRest));
- DCmd_Register("timeon", WRAP_METHOD(Debugger, Cmd_TimeOn));
- DCmd_Register("timeoff", WRAP_METHOD(Debugger, Cmd_TimeOff));
- DCmd_Register("text", WRAP_METHOD(Debugger, Cmd_Text));
- DCmd_Register("showvar", WRAP_METHOD(Debugger, Cmd_ShowVar));
- DCmd_Register("hidevar", WRAP_METHOD(Debugger, Cmd_HideVar));
- DCmd_Register("version", WRAP_METHOD(Debugger, Cmd_Version));
- DCmd_Register("animtest", WRAP_METHOD(Debugger, Cmd_AnimTest));
- DCmd_Register("texttest", WRAP_METHOD(Debugger, Cmd_TextTest));
- DCmd_Register("linetest", WRAP_METHOD(Debugger, Cmd_LineTest));
- DCmd_Register("events", WRAP_METHOD(Debugger, Cmd_Events));
- DCmd_Register("sfx", WRAP_METHOD(Debugger, Cmd_Sfx));
- DCmd_Register("english", WRAP_METHOD(Debugger, Cmd_English));
- DCmd_Register("finnish", WRAP_METHOD(Debugger, Cmd_Finnish));
- DCmd_Register("polish", WRAP_METHOD(Debugger, Cmd_Polish));
- DCmd_Register("fxq", WRAP_METHOD(Debugger, Cmd_FxQueue));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("q", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("mem", WRAP_METHOD(Debugger, Cmd_Mem));
+ registerCmd("tony", WRAP_METHOD(Debugger, Cmd_Tony));
+ registerCmd("res", WRAP_METHOD(Debugger, Cmd_Res));
+ registerCmd("reslist", WRAP_METHOD(Debugger, Cmd_ResList));
+ registerCmd("starts", WRAP_METHOD(Debugger, Cmd_Starts));
+ registerCmd("start", WRAP_METHOD(Debugger, Cmd_Start));
+ registerCmd("s", WRAP_METHOD(Debugger, Cmd_Start));
+ registerCmd("info", WRAP_METHOD(Debugger, Cmd_Info));
+ registerCmd("walkgrid", WRAP_METHOD(Debugger, Cmd_WalkGrid));
+ registerCmd("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
+ registerCmd("player", WRAP_METHOD(Debugger, Cmd_Player));
+ registerCmd("reslook", WRAP_METHOD(Debugger, Cmd_ResLook));
+ registerCmd("cur", WRAP_METHOD(Debugger, Cmd_CurrentInfo));
+ registerCmd("runlist", WRAP_METHOD(Debugger, Cmd_RunList));
+ registerCmd("kill", WRAP_METHOD(Debugger, Cmd_Kill));
+ registerCmd("nuke", WRAP_METHOD(Debugger, Cmd_Nuke));
+ registerCmd("var", WRAP_METHOD(Debugger, Cmd_Var));
+ registerCmd("rect", WRAP_METHOD(Debugger, Cmd_Rect));
+ registerCmd("clear", WRAP_METHOD(Debugger, Cmd_Clear));
+ registerCmd("debugon", WRAP_METHOD(Debugger, Cmd_DebugOn));
+ registerCmd("debugoff", WRAP_METHOD(Debugger, Cmd_DebugOff));
+ registerCmd("saverest", WRAP_METHOD(Debugger, Cmd_SaveRest));
+ registerCmd("timeon", WRAP_METHOD(Debugger, Cmd_TimeOn));
+ registerCmd("timeoff", WRAP_METHOD(Debugger, Cmd_TimeOff));
+ registerCmd("text", WRAP_METHOD(Debugger, Cmd_Text));
+ registerCmd("showvar", WRAP_METHOD(Debugger, Cmd_ShowVar));
+ registerCmd("hidevar", WRAP_METHOD(Debugger, Cmd_HideVar));
+ registerCmd("version", WRAP_METHOD(Debugger, Cmd_Version));
+ registerCmd("animtest", WRAP_METHOD(Debugger, Cmd_AnimTest));
+ registerCmd("texttest", WRAP_METHOD(Debugger, Cmd_TextTest));
+ registerCmd("linetest", WRAP_METHOD(Debugger, Cmd_LineTest));
+ registerCmd("events", WRAP_METHOD(Debugger, Cmd_Events));
+ registerCmd("sfx", WRAP_METHOD(Debugger, Cmd_Sfx));
+ registerCmd("english", WRAP_METHOD(Debugger, Cmd_English));
+ registerCmd("finnish", WRAP_METHOD(Debugger, Cmd_Finnish));
+ registerCmd("polish", WRAP_METHOD(Debugger, Cmd_Polish));
+ registerCmd("fxq", WRAP_METHOD(Debugger, Cmd_FxQueue));
}
void Debugger::varGet(int var) {
diff --git a/engines/teenagent/console.cpp b/engines/teenagent/console.cpp
index 294b9f9..2304829 100644
--- a/engines/teenagent/console.cpp
+++ b/engines/teenagent/console.cpp
@@ -26,13 +26,13 @@
namespace TeenAgent {
Console::Console(TeenAgentEngine *engine) : _engine(engine) {
- DCmd_Register("enable_object", WRAP_METHOD(Console, enableObject));
- DCmd_Register("disable_object", WRAP_METHOD(Console, enableObject));
- DCmd_Register("set_ons", WRAP_METHOD(Console, setOns));
- DCmd_Register("set_music", WRAP_METHOD(Console, setMusic));
- DCmd_Register("animation", WRAP_METHOD(Console, playAnimation));
- DCmd_Register("actor_animation", WRAP_METHOD(Console, playActorAnimation));
- DCmd_Register("call", WRAP_METHOD(Console, call));
+ registerCmd("enable_object", WRAP_METHOD(Console, enableObject));
+ registerCmd("disable_object", WRAP_METHOD(Console, enableObject));
+ registerCmd("set_ons", WRAP_METHOD(Console, setOns));
+ registerCmd("set_music", WRAP_METHOD(Console, setMusic));
+ registerCmd("animation", WRAP_METHOD(Console, playAnimation));
+ registerCmd("actor_animation", WRAP_METHOD(Console, playActorAnimation));
+ registerCmd("call", WRAP_METHOD(Console, call));
}
bool Console::enableObject(int argc, const char **argv) {
diff --git a/engines/tinsel/debugger.cpp b/engines/tinsel/debugger.cpp
index ab2e0f1..1dbb19d 100644
--- a/engines/tinsel/debugger.cpp
+++ b/engines/tinsel/debugger.cpp
@@ -62,11 +62,11 @@ int strToInt(const char *s) {
//----------------- CONSOLE CLASS ---------------------
Console::Console() : GUI::Debugger() {
- DCmd_Register("item", WRAP_METHOD(Console, cmd_item));
- DCmd_Register("scene", WRAP_METHOD(Console, cmd_scene));
- DCmd_Register("music", WRAP_METHOD(Console, cmd_music));
- DCmd_Register("sound", WRAP_METHOD(Console, cmd_sound));
- DCmd_Register("string", WRAP_METHOD(Console, cmd_string));
+ registerCmd("item", WRAP_METHOD(Console, cmd_item));
+ registerCmd("scene", WRAP_METHOD(Console, cmd_scene));
+ registerCmd("music", WRAP_METHOD(Console, cmd_music));
+ registerCmd("sound", WRAP_METHOD(Console, cmd_sound));
+ registerCmd("string", WRAP_METHOD(Console, cmd_string));
}
Console::~Console() {
diff --git a/engines/toltecs/console.cpp b/engines/toltecs/console.cpp
index 5dcd923..5a0c66c 100644
--- a/engines/toltecs/console.cpp
+++ b/engines/toltecs/console.cpp
@@ -31,8 +31,8 @@
namespace Toltecs {
Console::Console(ToltecsEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("room", WRAP_METHOD(Console, Cmd_Room));
- DCmd_Register("dump", WRAP_METHOD(Console, Cmd_Dump));
+ registerCmd("room", WRAP_METHOD(Console, Cmd_Room));
+ registerCmd("dump", WRAP_METHOD(Console, Cmd_Dump));
}
Console::~Console() {
diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp
index 2a90868..0e59fb8 100644
--- a/engines/tony/debugger.cpp
+++ b/engines/tony/debugger.cpp
@@ -28,9 +28,9 @@
namespace Tony {
Debugger::Debugger() : GUI::Debugger() {
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene));
- DCmd_Register("dirty_rects", WRAP_METHOD(Debugger, Cmd_DirtyRects));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("scene", WRAP_METHOD(Debugger, Cmd_Scene));
+ registerCmd("dirty_rects", WRAP_METHOD(Debugger, Cmd_DirtyRects));
}
static int strToInt(const char *s) {
diff --git a/engines/touche/console.cpp b/engines/touche/console.cpp
index 2cd8572..472863c 100644
--- a/engines/touche/console.cpp
+++ b/engines/touche/console.cpp
@@ -26,8 +26,8 @@
namespace Touche {
ToucheConsole::ToucheConsole(ToucheEngine *vm) : GUI::Debugger(), _vm(vm) {
- DCmd_Register("startMusic", WRAP_METHOD(ToucheConsole, Cmd_StartMusic));
- DCmd_Register("stopMusic", WRAP_METHOD(ToucheConsole, Cmd_StopMusic));
+ registerCmd("startMusic", WRAP_METHOD(ToucheConsole, Cmd_StartMusic));
+ registerCmd("stopMusic", WRAP_METHOD(ToucheConsole, Cmd_StopMusic));
}
ToucheConsole::~ToucheConsole() {
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index b014e4e..b0e7411 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -30,19 +30,19 @@
namespace TsAGE {
Debugger::Debugger() : GUI::Debugger() {
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene));
- DCmd_Register("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions));
- DCmd_Register("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions));
- DCmd_Register("scene_regions", WRAP_METHOD(Debugger, Cmd_SceneRegions));
- DCmd_Register("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag));
- DCmd_Register("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag));
- DCmd_Register("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag));
- DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects));
- DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject));
- DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
- DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_Sound));
- DCmd_Register("setdebug", WRAP_METHOD(Debugger, Cmd_SetDebug));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("scene", WRAP_METHOD(Debugger, Cmd_Scene));
+ registerCmd("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions));
+ registerCmd("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions));
+ registerCmd("scene_regions", WRAP_METHOD(Debugger, Cmd_SceneRegions));
+ registerCmd("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag));
+ registerCmd("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag));
+ registerCmd("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag));
+ registerCmd("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects));
+ registerCmd("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject));
+ registerCmd("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
+ registerCmd("sound", WRAP_METHOD(Debugger, Cmd_Sound));
+ registerCmd("setdebug", WRAP_METHOD(Debugger, Cmd_SetDebug));
}
static int strToInt(const char *s) {
diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp
index 90b9255..71a0e7e 100644
--- a/engines/voyeur/debugger.cpp
+++ b/engines/voyeur/debugger.cpp
@@ -29,11 +29,11 @@ namespace Voyeur {
Debugger::Debugger(VoyeurEngine *vm) : GUI::Debugger(), _vm(vm) {
// Register methods
- DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("exit", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("time", WRAP_METHOD(Debugger, Cmd_Time));
- DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
- DCmd_Register("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
+ registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("exit", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("time", WRAP_METHOD(Debugger, Cmd_Time));
+ registerCmd("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
+ registerCmd("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
// Set fields
_isTimeActive = true;
diff --git a/engines/wintermute/debugger.cpp b/engines/wintermute/debugger.cpp
index f1f300c..a313314 100644
--- a/engines/wintermute/debugger.cpp
+++ b/engines/wintermute/debugger.cpp
@@ -29,8 +29,8 @@
namespace Wintermute {
Console::Console(WintermuteEngine *vm) : GUI::Debugger(), _engineRef(vm) {
- DCmd_Register("show_fps", WRAP_METHOD(Console, Cmd_ShowFps));
- DCmd_Register("dump_file", WRAP_METHOD(Console, Cmd_DumpFile));
+ registerCmd("show_fps", WRAP_METHOD(Console, Cmd_ShowFps));
+ registerCmd("dump_file", WRAP_METHOD(Console, Cmd_DumpFile));
}
Console::~Console(void) {
diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp
index a1037a1..e610f34 100644
--- a/engines/zvision/core/console.cpp
+++ b/engines/zvision/core/console.cpp
@@ -45,18 +45,18 @@
namespace ZVision {
Console::Console(ZVision *engine) : GUI::Debugger(), _engine(engine) {
- DCmd_Register("loadimage", WRAP_METHOD(Console, cmdLoadImage));
- DCmd_Register("loadvideo", WRAP_METHOD(Console, cmdLoadVideo));
- DCmd_Register("loadsound", WRAP_METHOD(Console, cmdLoadSound));
- DCmd_Register("raw2wav", WRAP_METHOD(Console, cmdRawToWav));
- DCmd_Register("setrenderstate", WRAP_METHOD(Console, cmdSetRenderState));
- DCmd_Register("generaterendertable", WRAP_METHOD(Console, cmdGenerateRenderTable));
- DCmd_Register("setpanoramafov", WRAP_METHOD(Console, cmdSetPanoramaFoV));
- DCmd_Register("setpanoramascale", WRAP_METHOD(Console, cmdSetPanoramaScale));
- DCmd_Register("changelocation", WRAP_METHOD(Console, cmdChangeLocation));
- DCmd_Register("dumpfile", WRAP_METHOD(Console, cmdDumpFile));
- DCmd_Register("parseallscrfiles", WRAP_METHOD(Console, cmdParseAllScrFiles));
- DCmd_Register("rendertext", WRAP_METHOD(Console, cmdRenderText));
+ registerCmd("loadimage", WRAP_METHOD(Console, cmdLoadImage));
+ registerCmd("loadvideo", WRAP_METHOD(Console, cmdLoadVideo));
+ registerCmd("loadsound", WRAP_METHOD(Console, cmdLoadSound));
+ registerCmd("raw2wav", WRAP_METHOD(Console, cmdRawToWav));
+ registerCmd("setrenderstate", WRAP_METHOD(Console, cmdSetRenderState));
+ registerCmd("generaterendertable", WRAP_METHOD(Console, cmdGenerateRenderTable));
+ registerCmd("setpanoramafov", WRAP_METHOD(Console, cmdSetPanoramaFoV));
+ registerCmd("setpanoramascale", WRAP_METHOD(Console, cmdSetPanoramaScale));
+ registerCmd("changelocation", WRAP_METHOD(Console, cmdChangeLocation));
+ registerCmd("dumpfile", WRAP_METHOD(Console, cmdDumpFile));
+ registerCmd("parseallscrfiles", WRAP_METHOD(Console, cmdParseAllScrFiles));
+ registerCmd("rendertext", WRAP_METHOD(Console, cmdRenderText));
}
bool Console::cmdLoadImage(int argc, const char **argv) {
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 1d74db3..a419ef4 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -55,17 +55,17 @@ Debugger::Debugger() {
registerVar("debug_countdown", &_frameCountdown, DVAR_INT, 0);
// Register commands
- //DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("exit", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("quit", WRAP_METHOD(Debugger, Cmd_Exit));
+ //registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("exit", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("quit", WRAP_METHOD(Debugger, Cmd_Exit));
- DCmd_Register("help", WRAP_METHOD(Debugger, Cmd_Help));
- DCmd_Register("openlog", WRAP_METHOD(Debugger, Cmd_OpenLog));
+ registerCmd("help", WRAP_METHOD(Debugger, Cmd_Help));
+ registerCmd("openlog", WRAP_METHOD(Debugger, Cmd_OpenLog));
- DCmd_Register("debuglevel", WRAP_METHOD(Debugger, Cmd_DebugLevel));
- DCmd_Register("debugflag_list", WRAP_METHOD(Debugger, Cmd_DebugFlagsList));
- DCmd_Register("debugflag_enable", WRAP_METHOD(Debugger, Cmd_DebugFlagEnable));
- DCmd_Register("debugflag_disable", WRAP_METHOD(Debugger, Cmd_DebugFlagDisable));
+ registerCmd("debuglevel", WRAP_METHOD(Debugger, Cmd_DebugLevel));
+ registerCmd("debugflag_list", WRAP_METHOD(Debugger, Cmd_DebugFlagsList));
+ registerCmd("debugflag_enable", WRAP_METHOD(Debugger, Cmd_DebugFlagEnable));
+ registerCmd("debugflag_disable", WRAP_METHOD(Debugger, Cmd_DebugFlagDisable));
}
Debugger::~Debugger() {
@@ -421,7 +421,7 @@ void Debugger::registerVar(const Common::String &varname, void *pointer, VarType
}
// Command registration function
-void Debugger::DCmd_Register(const Common::String &cmdname, Debuglet *debuglet) {
+void Debugger::registerCmd(const Common::String &cmdname, Debuglet *debuglet) {
assert(debuglet && debuglet->isValid());
_cmds[cmdname] = Common::SharedPtr<Debuglet>(debuglet);
}
diff --git a/gui/debugger.h b/gui/debugger.h
index 6ccc77b..9dbc408 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -74,7 +74,7 @@ protected:
* Convenience macro that makes it easier to register a method
* of a debugger subclass as a command.
* Usage example:
- * DCmd_Register("COMMAND", WRAP_METHOD(MyDebugger, MyCmd));
+ * registerCmd("COMMAND", WRAP_METHOD(MyDebugger, MyCmd));
* would register the method MyDebugger::MyCmd(int, const char **)
* under the command name "COMMAND".
*/
@@ -108,7 +108,7 @@ protected:
* @todo replace this single method by type safe variants.
*/
void registerVar(const Common::String &varname, void *variable, VarType type, int arraySize);
- void DCmd_Register(const Common::String &cmdname, Debuglet *debuglet);
+ void registerCmd(const Common::String &cmdname, Debuglet *debuglet);
private:
Commit: 07c9fea9cbde6ca260e5e8be99f976a51752b4d7
https://github.com/scummvm/scummvm/commit/07c9fea9cbde6ca260e5e8be99f976a51752b4d7
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
GUI: Slight naming cleanup in Debugger.
Changed paths:
gui/debugger.cpp
gui/debugger.h
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index a419ef4..86aff48 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -242,23 +242,23 @@ bool Debugger::parseCommand(const char *inputOrig) {
}
// It's not a command, so things get a little tricky for variables. Do fuzzy matching to ignore things like subscripts.
- for (uint i = 0; i < _dvars.size(); i++) {
- if (!strncmp(_dvars[i].name.c_str(), param[0], _dvars[i].name.size())) {
+ for (uint i = 0; i < _vars.size(); i++) {
+ if (!strncmp(_vars[i].name.c_str(), param[0], _vars[i].name.size())) {
if (num_params > 1) {
// Alright, we need to check the TYPE of the variable to deref and stuff... the array stuff is a bit ugly :)
- switch (_dvars[i].type) {
+ switch (_vars[i].type) {
// Integer
case DVAR_BYTE:
- *(byte *)_dvars[i].variable = atoi(param[1]);
- debugPrintf("byte%s = %d\n", param[0], *(byte *)_dvars[i].variable);
+ *(byte *)_vars[i].variable = atoi(param[1]);
+ debugPrintf("byte%s = %d\n", param[0], *(byte *)_vars[i].variable);
break;
case DVAR_INT:
- *(int32 *)_dvars[i].variable = atoi(param[1]);
- debugPrintf("(int)%s = %d\n", param[0], *(int32 *)_dvars[i].variable);
+ *(int32 *)_vars[i].variable = atoi(param[1]);
+ debugPrintf("(int)%s = %d\n", param[0], *(int32 *)_vars[i].variable);
break;
case DVAR_BOOL:
- if (Common::parseBool(param[1], *(bool *)_dvars[i].variable))
- debugPrintf("(bool)%s = %s\n", param[0], *(bool *)_dvars[i].variable ? "true" : "false");
+ if (Common::parseBool(param[1], *(bool *)_vars[i].variable))
+ debugPrintf("(bool)%s = %s\n", param[0], *(bool *)_vars[i].variable ? "true" : "false");
else
debugPrintf("Invalid value for boolean variable. Valid values are \"true\", \"false\", \"1\", \"0\", \"yes\", \"no\"\n");
break;
@@ -269,9 +269,9 @@ bool Debugger::parseCommand(const char *inputOrig) {
debugPrintf("You must access this array as %s[element]\n", param[0]);
} else {
int element = atoi(chr+1);
- int32 *var = *(int32 **)_dvars[i].variable;
- if (element >= _dvars[i].arraySize) {
- debugPrintf("%s is out of range (array is %d elements big)\n", param[0], _dvars[i].arraySize);
+ int32 *var = *(int32 **)_vars[i].variable;
+ if (element >= _vars[i].arraySize) {
+ debugPrintf("%s is out of range (array is %d elements big)\n", param[0], _vars[i].arraySize);
} else {
var[element] = atoi(param[1]);
debugPrintf("(int)%s = %d\n", param[0], var[element]);
@@ -280,21 +280,21 @@ bool Debugger::parseCommand(const char *inputOrig) {
}
break;
default:
- debugPrintf("Failed to set variable %s to %s - unknown type\n", _dvars[i].name.c_str(), param[1]);
+ debugPrintf("Failed to set variable %s to %s - unknown type\n", _vars[i].name.c_str(), param[1]);
break;
}
} else {
// And again, type-dependent prints/defrefs. The array one is still ugly.
- switch (_dvars[i].type) {
+ switch (_vars[i].type) {
// Integer
case DVAR_BYTE:
- debugPrintf("(byte)%s = %d\n", param[0], *(const byte *)_dvars[i].variable);
+ debugPrintf("(byte)%s = %d\n", param[0], *(const byte *)_vars[i].variable);
break;
case DVAR_INT:
- debugPrintf("(int)%s = %d\n", param[0], *(const int32 *)_dvars[i].variable);
+ debugPrintf("(int)%s = %d\n", param[0], *(const int32 *)_vars[i].variable);
break;
case DVAR_BOOL:
- debugPrintf("(bool)%s = %s\n", param[0], *(const bool *)_dvars[i].variable ? "true" : "false");
+ debugPrintf("(bool)%s = %s\n", param[0], *(const bool *)_vars[i].variable ? "true" : "false");
break;
// Integer array
case DVAR_INTARRAY: {
@@ -303,9 +303,9 @@ bool Debugger::parseCommand(const char *inputOrig) {
debugPrintf("You must access this array as %s[element]\n", param[0]);
} else {
int element = atoi(chr+1);
- const int32 *var = *(const int32 **)_dvars[i].variable;
- if (element >= _dvars[i].arraySize) {
- debugPrintf("%s is out of range (array is %d elements big)\n", param[0], _dvars[i].arraySize);
+ const int32 *var = *(const int32 **)_vars[i].variable;
+ if (element >= _vars[i].arraySize) {
+ debugPrintf("%s is out of range (array is %d elements big)\n", param[0], _vars[i].arraySize);
} else {
debugPrintf("(int)%s = %d\n", param[0], var[element]);
}
@@ -314,7 +314,7 @@ bool Debugger::parseCommand(const char *inputOrig) {
break;
// String
case DVAR_STRING:
- debugPrintf("(string)%s = %s\n", param[0], ((Common::String *)_dvars[i].variable)->c_str());
+ debugPrintf("(string)%s = %s\n", param[0], ((Common::String *)_vars[i].variable)->c_str());
break;
default:
debugPrintf("%s = (unknown type)\n", param[0]);
@@ -411,13 +411,13 @@ void Debugger::registerVar(const Common::String &varname, void *pointer, VarType
// TODO: Sort this list? Then we can do binary search later on when doing lookups.
assert(pointer);
- DVar tmp;
+ Var tmp;
tmp.name = varname;
tmp.type = type;
tmp.variable = pointer;
tmp.arraySize = arraySize;
- _dvars.push_back(tmp);
+ _vars.push_back(tmp);
}
// Command registration function
@@ -473,12 +473,12 @@ bool Debugger::Cmd_Help(int argc, const char **argv) {
}
debugPrintf("\n");
- if (!_dvars.empty()) {
+ if (!_vars.empty()) {
debugPrintf("\n");
debugPrintf("Variables are:\n");
width = 0;
- for (i = 0; i < _dvars.size(); i++) {
- size = _dvars[i].name.size() + 1;
+ for (i = 0; i < _vars.size(); i++) {
+ size = _vars[i].name.size() + 1;
if ((width + size) >= charsPerLine) {
debugPrintf("\n");
@@ -486,7 +486,7 @@ bool Debugger::Cmd_Help(int argc, const char **argv) {
} else
width += size;
- debugPrintf("%s ", _dvars[i].name.c_str());
+ debugPrintf("%s ", _vars[i].name.c_str());
}
debugPrintf("\n");
}
diff --git a/gui/debugger.h b/gui/debugger.h
index 9dbc408..f764623 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -89,7 +89,7 @@ protected:
DVAR_STRING
};
- struct DVar {
+ struct Var {
Common::String name;
void *variable;
VarType type;
@@ -125,7 +125,7 @@ private:
*/
uint _frameCountdown;
- Common::Array<DVar> _dvars;
+ Common::Array<Var> _vars;
typedef Common::HashMap<Common::String, Common::SharedPtr<Debuglet>, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> CommandsMap;
CommandsMap _cmds;
Commit: 30d64edac449cde1f1c387b817ec33446ddd4698
https://github.com/scummvm/scummvm/commit/30d64edac449cde1f1c387b817ec33446ddd4698
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
ALL: Make Debugger command function names conform to our guidelines.
Changed paths:
engines/agos/debugger.cpp
engines/cruise/debugger.cpp
engines/hopkins/debugger.cpp
engines/kyra/debugger.cpp
engines/lastexpress/debug.cpp
engines/lure/debugger.cpp
engines/mads/debugger.cpp
engines/mortevielle/debugger.cpp
engines/parallaction/debug.cpp
engines/saga/console.cpp
engines/sci/console.cpp
engines/scumm/debugger.cpp
engines/sword2/console.cpp
engines/tony/debugger.cpp
engines/tsage/debugger.cpp
engines/voyeur/debugger.cpp
gui/debugger.cpp
gui/debugger.h
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp
index 536a1f8..7ad742c 100644
--- a/engines/agos/debugger.cpp
+++ b/engines/agos/debugger.cpp
@@ -32,7 +32,7 @@ Debugger::Debugger(AGOSEngine *vm)
: GUI::Debugger() {
_vm = vm;
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("music", WRAP_METHOD(Debugger, Cmd_PlayMusic));
registerCmd("sound", WRAP_METHOD(Debugger, Cmd_PlaySound));
registerCmd("voice", WRAP_METHOD(Debugger, Cmd_PlayVoice));
diff --git a/engines/cruise/debugger.cpp b/engines/cruise/debugger.cpp
index 0627432..d4e706a 100644
--- a/engines/cruise/debugger.cpp
+++ b/engines/cruise/debugger.cpp
@@ -29,7 +29,7 @@
namespace Cruise {
Debugger::Debugger(): GUI::Debugger() {
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("hotspots", WRAP_METHOD(Debugger, cmd_hotspots));
registerCmd("items", WRAP_METHOD(Debugger, cmd_items));
}
diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp
index 323afef..3dcfdfe 100644
--- a/engines/hopkins/debugger.cpp
+++ b/engines/hopkins/debugger.cpp
@@ -30,7 +30,7 @@ namespace Hopkins {
Debugger::Debugger(HopkinsEngine *vm) : GUI::Debugger() {
_vm = vm;
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("rects", WRAP_METHOD(Debugger, cmd_DirtyRects));
registerCmd("teleport", WRAP_METHOD(Debugger, cmd_Teleport));
registerCmd("show_room", WRAP_METHOD(Debugger, cmd_ShowCurrentRoom));
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index f14c42b..5630eb4 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -40,7 +40,7 @@ Debugger::Debugger(KyraEngine_v1 *vm)
}
void Debugger::initialize() {
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("screen_debug_mode", WRAP_METHOD(Debugger, cmd_setScreenDebug));
registerCmd("load_palette", WRAP_METHOD(Debugger, cmd_loadPalette));
registerCmd("facings", WRAP_METHOD(Debugger, cmd_showFacings));
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 2fb2cd8..57943f9 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -146,7 +146,7 @@ void Debugger::copyCommand(int argc, const char **argv) {
}
// Exit the debugger!
- Cmd_Exit(0, 0);
+ cmdExit(0, 0);
}
void Debugger::callCommand() {
@@ -345,7 +345,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) {
_command = WRAP_METHOD(Debugger, cmdShowFrame);
copyCommand(argc, argv);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
} else {
Sequence sequence(filename);
if (sequence.load(getArchive(filename))) {
@@ -407,7 +407,7 @@ bool Debugger::cmdShowBg(int argc, const char **argv) {
_command = WRAP_METHOD(Debugger, cmdShowBg);
copyCommand(argc, argv);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
} else {
clearBg(GraphicsManager::kBackgroundC);
@@ -462,7 +462,7 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) {
_command = WRAP_METHOD(Debugger, cmdPlaySeq);
copyCommand(argc, argv);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
} else {
Sequence *sequence = new Sequence(filename);
if (sequence->load(getArchive(filename))) {
@@ -582,7 +582,7 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) {
_command = WRAP_METHOD(Debugger, cmdPlaySbe);
copyCommand(argc, argv);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
} else {
SubtitleManager subtitle(_engine->getFont());
if (subtitle.load(getArchive(filename))) {
@@ -648,7 +648,7 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) {
_command = WRAP_METHOD(Debugger, cmdPlayNis);
copyCommand(argc, argv);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
} else {
// Make sure we are not called in a loop
_numParams = 0;
@@ -706,7 +706,7 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) {
_command = WRAP_METHOD(Debugger, cmdLoadScene);
copyCommand(argc, argv);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
} else {
clearBg(GraphicsManager::kBackgroundAll);
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index 7ab3212..642376a 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -35,7 +35,7 @@
namespace Lure {
Debugger::Debugger(): GUI::Debugger() {
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("enter", WRAP_METHOD(Debugger, cmd_enterRoom));
registerCmd("rooms", WRAP_METHOD(Debugger, cmd_listRooms));
registerCmd("fields", WRAP_METHOD(Debugger, cmd_listFields));
diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index e82b39f..f301b6c 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -29,7 +29,7 @@ namespace MADS {
Debugger::Debugger(MADSEngine *vm) : GUI::Debugger(), _vm(vm) {
_showMousePos = false;
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
registerCmd("scene", WRAP_METHOD(Debugger, Cmd_LoadScene));
registerCmd("show_hotspots", WRAP_METHOD(Debugger, Cmd_ShowHotSpots));
diff --git a/engines/mortevielle/debugger.cpp b/engines/mortevielle/debugger.cpp
index 8418ae0..b2c99b8 100644
--- a/engines/mortevielle/debugger.cpp
+++ b/engines/mortevielle/debugger.cpp
@@ -27,7 +27,7 @@ namespace Mortevielle {
Debugger::Debugger(MortevielleEngine *vm) : GUI::Debugger() {
_vm = vm;
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("show_questions", WRAP_METHOD(Debugger, Cmd_showAllQuestions));
registerCmd("reset_parano", WRAP_METHOD(Debugger, Cmd_resetParano));
}
diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp
index e4239eb..a7087c6 100644
--- a/engines/parallaction/debug.cpp
+++ b/engines/parallaction/debug.cpp
@@ -33,7 +33,7 @@ Debugger::Debugger(Parallaction *vm)
: GUI::Debugger() {
_vm = vm;
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("location", WRAP_METHOD(Debugger, Cmd_Location));
registerCmd("give", WRAP_METHOD(Debugger, Cmd_Give));
registerCmd("zones", WRAP_METHOD(Debugger, Cmd_Zones));
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp
index 042635e..0b801ee 100644
--- a/engines/saga/console.cpp
+++ b/engines/saga/console.cpp
@@ -35,7 +35,7 @@ namespace Saga {
Console::Console(SagaEngine *vm) : GUI::Debugger() {
_vm = vm;
- registerCmd("continue", WRAP_METHOD(Console, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Console, cmdExit));
// Actor commands
registerCmd("actor_walk_to", WRAP_METHOD(Console, cmdActorWalkTo));
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 1a2ee21..1736ac7 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -1207,13 +1207,13 @@ bool Console::cmdRestoreGame(int argc, const char **argv) {
return true;
}
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdRestartGame(int argc, const char **argv) {
_engine->_gamestate->abortScriptProcessing = kAbortRestartGame;
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
// The scripts get IDs ranging from 100->199, because the scripts require us to assign unique ids THAT EVEN STAY BETWEEN
@@ -1606,7 +1606,7 @@ bool Console::cmdPlayVideo(int argc, const char **argv) {
filename.hasSuffix(".rbt") || filename.hasSuffix(".duk")) {
_videoFile = filename;
_videoFrameDelay = (argc == 2) ? 10 : atoi(argv[2]);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
} else {
debugPrintf("Unknown video file type\n");
return true;
@@ -2108,7 +2108,7 @@ bool Console::cmdShowMap(int argc, const char **argv) {
debugPrintf("Map %d is not available.\n", map);
return true;
}
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdSongLib(int argc, const char **argv) {
@@ -2153,7 +2153,7 @@ bool Console::cmdStartSound(int argc, const char **argv) {
}
g_sci->_soundCmd->startNewSound(number);
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdToggleSound(int argc, const char **argv) {
@@ -2786,7 +2786,7 @@ bool Console::cmdTrace(int argc, const char **argv) {
_debugState.runningStep = atoi(argv[1]) - 1;
_debugState.debugging = true;
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdStepOver(int argc, const char **argv) {
@@ -2794,14 +2794,14 @@ bool Console::cmdStepOver(int argc, const char **argv) {
_debugState.seekLevel = _engine->_gamestate->_executionStack.size();
_debugState.debugging = true;
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdStepEvent(int argc, const char **argv) {
_debugState.stopOnEvent = true;
_debugState.debugging = true;
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdStepRet(int argc, const char **argv) {
@@ -2809,7 +2809,7 @@ bool Console::cmdStepRet(int argc, const char **argv) {
_debugState.seekLevel = _engine->_gamestate->_executionStack.size() - 1;
_debugState.debugging = true;
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdStepGlobal(int argc, const char **argv) {
@@ -2823,7 +2823,7 @@ bool Console::cmdStepGlobal(int argc, const char **argv) {
_debugState.seekSpecial = atoi(argv[1]);
_debugState.debugging = true;
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdStepCallk(int argc, const char **argv) {
@@ -2856,7 +2856,7 @@ bool Console::cmdStepCallk(int argc, const char **argv) {
}
_debugState.debugging = true;
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdDisassemble(int argc, const char **argv) {
@@ -3205,7 +3205,7 @@ bool Console::cmdGo(int argc, const char **argv) {
// CHECKME: is this necessary?
_debugState.seeking = kDebugSeekNothing;
- return Cmd_Exit(argc, argv);
+ return cmdExit(argc, argv);
}
bool Console::cmdLogKernel(int argc, const char **argv) {
@@ -3619,7 +3619,7 @@ bool Console::cmdQuit(int argc, const char **argv) {
return true;
}
- return Cmd_Exit(0, 0);
+ return cmdExit(0, 0);
}
bool Console::cmdAddresses(int argc, const char **argv) {
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index fed523f..a08fa6e 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -64,7 +64,7 @@ ScummDebugger::ScummDebugger(ScummEngine *s)
registerVar("scumm_vars", &_vm->_scummVars, DVAR_INTARRAY, _vm->_numVariables);
// Register commands
- registerCmd("continue", WRAP_METHOD(ScummDebugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(ScummDebugger, cmdExit));
registerCmd("restart", WRAP_METHOD(ScummDebugger, Cmd_Restart));
registerCmd("actor", WRAP_METHOD(ScummDebugger, Cmd_Actor));
diff --git a/engines/sword2/console.cpp b/engines/sword2/console.cpp
index 810b40c..0aa78f5 100644
--- a/engines/sword2/console.cpp
+++ b/engines/sword2/console.cpp
@@ -82,8 +82,8 @@ Debugger::Debugger(Sword2Engine *vm)
// Register commands
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- registerCmd("q", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
+ registerCmd("q", WRAP_METHOD(Debugger, cmdExit));
registerCmd("mem", WRAP_METHOD(Debugger, Cmd_Mem));
registerCmd("tony", WRAP_METHOD(Debugger, Cmd_Tony));
registerCmd("res", WRAP_METHOD(Debugger, Cmd_Res));
diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp
index 0e59fb8..e192c53 100644
--- a/engines/tony/debugger.cpp
+++ b/engines/tony/debugger.cpp
@@ -28,7 +28,7 @@
namespace Tony {
Debugger::Debugger() : GUI::Debugger() {
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("scene", WRAP_METHOD(Debugger, Cmd_Scene));
registerCmd("dirty_rects", WRAP_METHOD(Debugger, Cmd_DirtyRects));
}
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index b0e7411..b647807 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -30,7 +30,7 @@
namespace TsAGE {
Debugger::Debugger() : GUI::Debugger() {
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
registerCmd("scene", WRAP_METHOD(Debugger, Cmd_Scene));
registerCmd("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions));
registerCmd("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions));
diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp
index 71a0e7e..afa2407 100644
--- a/engines/voyeur/debugger.cpp
+++ b/engines/voyeur/debugger.cpp
@@ -29,8 +29,8 @@ namespace Voyeur {
Debugger::Debugger(VoyeurEngine *vm) : GUI::Debugger(), _vm(vm) {
// Register methods
- registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- registerCmd("exit", WRAP_METHOD(Debugger, Cmd_Exit));
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
+ registerCmd("exit", WRAP_METHOD(Debugger, cmdExit));
registerCmd("time", WRAP_METHOD(Debugger, Cmd_Time));
registerCmd("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
registerCmd("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 86aff48..4d97338 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -55,17 +55,17 @@ Debugger::Debugger() {
registerVar("debug_countdown", &_frameCountdown, DVAR_INT, 0);
// Register commands
- //registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit));
- registerCmd("exit", WRAP_METHOD(Debugger, Cmd_Exit));
- registerCmd("quit", WRAP_METHOD(Debugger, Cmd_Exit));
+ //registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
+ registerCmd("exit", WRAP_METHOD(Debugger, cmdExit));
+ registerCmd("quit", WRAP_METHOD(Debugger, cmdExit));
- registerCmd("help", WRAP_METHOD(Debugger, Cmd_Help));
- registerCmd("openlog", WRAP_METHOD(Debugger, Cmd_OpenLog));
+ registerCmd("help", WRAP_METHOD(Debugger, cmdHelp));
+ registerCmd("openlog", WRAP_METHOD(Debugger, cmdOpenLog));
- registerCmd("debuglevel", WRAP_METHOD(Debugger, Cmd_DebugLevel));
- registerCmd("debugflag_list", WRAP_METHOD(Debugger, Cmd_DebugFlagsList));
- registerCmd("debugflag_enable", WRAP_METHOD(Debugger, Cmd_DebugFlagEnable));
- registerCmd("debugflag_disable", WRAP_METHOD(Debugger, Cmd_DebugFlagDisable));
+ registerCmd("debuglevel", WRAP_METHOD(Debugger, cmdDebugLevel));
+ registerCmd("debugflag_list", WRAP_METHOD(Debugger, cmdDebugFlagsList));
+ registerCmd("debugflag_enable", WRAP_METHOD(Debugger, cmdDebugFlagEnable));
+ registerCmd("debugflag_disable", WRAP_METHOD(Debugger, cmdDebugFlagDisable));
}
Debugger::~Debugger() {
@@ -428,14 +428,14 @@ void Debugger::registerCmd(const Common::String &cmdname, Debuglet *debuglet) {
// Detach ("exit") the debugger
-bool Debugger::Cmd_Exit(int argc, const char **argv) {
+bool Debugger::cmdExit(int argc, const char **argv) {
detach();
return false;
}
// Print a list of all registered commands (and variables, if any),
// nicely word-wrapped.
-bool Debugger::Cmd_Help(int argc, const char **argv) {
+bool Debugger::cmdHelp(int argc, const char **argv) {
#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
const int charsPerLine = _debuggerDialog->getCharsPerLine();
#elif defined(USE_READLINE)
@@ -494,7 +494,7 @@ bool Debugger::Cmd_Help(int argc, const char **argv) {
return true;
}
-bool Debugger::Cmd_OpenLog(int argc, const char **argv) {
+bool Debugger::cmdOpenLog(int argc, const char **argv) {
if (g_system->hasFeature(OSystem::kFeatureDisplayLogFile))
g_system->displayLogFile();
else
@@ -503,7 +503,7 @@ bool Debugger::Cmd_OpenLog(int argc, const char **argv) {
}
-bool Debugger::Cmd_DebugLevel(int argc, const char **argv) {
+bool Debugger::cmdDebugLevel(int argc, const char **argv) {
if (argc == 1) { // print level
debugPrintf("Debugging is currently %s (set at level %d)\n", (gDebugLevel >= 0) ? "enabled" : "disabled", gDebugLevel);
debugPrintf("Usage: %s <n> where n is 0 to 10 or -1 to disable debugging\n", argv[0]);
@@ -522,7 +522,7 @@ bool Debugger::Cmd_DebugLevel(int argc, const char **argv) {
return true;
}
-bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) {
+bool Debugger::cmdDebugFlagsList(int argc, const char **argv) {
const Common::DebugManager::DebugChannelList &debugLevels = DebugMan.listDebugChannels();
debugPrintf("Engine debug levels:\n");
@@ -540,7 +540,7 @@ bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) {
return true;
}
-bool Debugger::Cmd_DebugFlagEnable(int argc, const char **argv) {
+bool Debugger::cmdDebugFlagEnable(int argc, const char **argv) {
if (argc < 2) {
debugPrintf("debugflag_enable <flag>\n");
} else {
@@ -553,7 +553,7 @@ bool Debugger::Cmd_DebugFlagEnable(int argc, const char **argv) {
return true;
}
-bool Debugger::Cmd_DebugFlagDisable(int argc, const char **argv) {
+bool Debugger::cmdDebugFlagDisable(int argc, const char **argv) {
if (argc < 2) {
debugPrintf("debugflag_disable <flag>\n");
} else {
diff --git a/gui/debugger.h b/gui/debugger.h
index f764623..dc81fcb 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -168,7 +168,7 @@ protected:
virtual void postEnter();
/**
- * Subclasses should invoke the detach() method in their Cmd_FOO methods
+ * 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).
*
@@ -190,13 +190,13 @@ private:
virtual bool handleCommand(int argc, const char **argv, bool &keepRunning);
protected:
- bool Cmd_Exit(int argc, const char **argv);
- bool Cmd_Help(int argc, const char **argv);
- bool Cmd_OpenLog(int argc, const char **argv);
- bool Cmd_DebugLevel(int argc, const char **argv);
- bool Cmd_DebugFlagsList(int argc, const char **argv);
- bool Cmd_DebugFlagEnable(int argc, const char **argv);
- bool Cmd_DebugFlagDisable(int argc, const char **argv);
+ bool cmdExit(int argc, const char **argv);
+ bool cmdHelp(int argc, const char **argv);
+ bool cmdOpenLog(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);
#ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER
private:
Commit: 75a78c89fac67b9b2efffc2c47e3d8daf3eb8022
https://github.com/scummvm/scummvm/commit/75a78c89fac67b9b2efffc2c47e3d8daf3eb8022
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
GUI: Don't endorse function naming against our guidelines in docu.
Changed paths:
gui/debugger.h
diff --git a/gui/debugger.h b/gui/debugger.h
index dc81fcb..319fa68 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -74,8 +74,8 @@ protected:
* Convenience macro that makes it easier to register a method
* of a debugger subclass as a command.
* Usage example:
- * registerCmd("COMMAND", WRAP_METHOD(MyDebugger, MyCmd));
- * would register the method MyDebugger::MyCmd(int, const char **)
+ * registerCmd("COMMAND", WRAP_METHOD(MyDebugger, myCmd));
+ * would register the method MyDebugger::myCmd(int, const char **)
* under the command name "COMMAND".
*/
#define WRAP_METHOD(cls, method) \
Commit: 3dccfda1cf681d621ed65e998e364a3678a9b89f
https://github.com/scummvm/scummvm/commit/3dccfda1cf681d621ed65e998e364a3678a9b89f
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
VOYEUR: Don't overwrite "exit" command in the debugger.
It actually overwrite "exit" by cmdExit and thus effectively the same command...
Changed paths:
engines/voyeur/debugger.cpp
diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp
index afa2407..bd1da3e 100644
--- a/engines/voyeur/debugger.cpp
+++ b/engines/voyeur/debugger.cpp
@@ -30,7 +30,6 @@ namespace Voyeur {
Debugger::Debugger(VoyeurEngine *vm) : GUI::Debugger(), _vm(vm) {
// Register methods
registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
- registerCmd("exit", WRAP_METHOD(Debugger, cmdExit));
registerCmd("time", WRAP_METHOD(Debugger, Cmd_Time));
registerCmd("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
registerCmd("mouse", WRAP_METHOD(Debugger, Cmd_Mouse));
Commit: 96a901d1fb809a67a9067cd5bf7938a1148de47b
https://github.com/scummvm/scummvm/commit/96a901d1fb809a67a9067cd5bf7938a1148de47b
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
KYRA: Adpot debugger command function naming to match our guidelines.
Changed paths:
engines/kyra/debugger.cpp
engines/kyra/debugger.h
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 5630eb4..4a90722 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -41,18 +41,18 @@ Debugger::Debugger(KyraEngine_v1 *vm)
void Debugger::initialize() {
registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
- registerCmd("screen_debug_mode", WRAP_METHOD(Debugger, cmd_setScreenDebug));
- registerCmd("load_palette", WRAP_METHOD(Debugger, cmd_loadPalette));
- registerCmd("facings", WRAP_METHOD(Debugger, cmd_showFacings));
- registerCmd("gamespeed", WRAP_METHOD(Debugger, cmd_gameSpeed));
- registerCmd("flags", WRAP_METHOD(Debugger, cmd_listFlags));
- registerCmd("toggleflag", WRAP_METHOD(Debugger, cmd_toggleFlag));
- registerCmd("queryflag", WRAP_METHOD(Debugger, cmd_queryFlag));
- registerCmd("timers", WRAP_METHOD(Debugger, cmd_listTimers));
- registerCmd("settimercountdown", WRAP_METHOD(Debugger, cmd_setTimerCountdown));
-}
-
-bool Debugger::cmd_setScreenDebug(int argc, const char **argv) {
+ registerCmd("screen_debug_mode", WRAP_METHOD(Debugger, cmdSetScreenDebug));
+ registerCmd("load_palette", WRAP_METHOD(Debugger, cmdLoadPalette));
+ registerCmd("facings", WRAP_METHOD(Debugger, cmdShowFacings));
+ registerCmd("gamespeed", WRAP_METHOD(Debugger, cmdGameSpeed));
+ registerCmd("flags", WRAP_METHOD(Debugger, cmdListFlags));
+ registerCmd("toggleflag", WRAP_METHOD(Debugger, cmdToggleFlag));
+ registerCmd("queryflag", WRAP_METHOD(Debugger, cmdQueryFlag));
+ registerCmd("timers", WRAP_METHOD(Debugger, cmdListTimers));
+ registerCmd("settimercountdown", WRAP_METHOD(Debugger, cmdSetTimerCountdown));
+}
+
+bool Debugger::cmdSetScreenDebug(int argc, const char **argv) {
if (argc > 1) {
if (scumm_stricmp(argv[1], "enable") == 0)
_vm->screen()->enableScreenDebug(true);
@@ -67,7 +67,7 @@ bool Debugger::cmd_setScreenDebug(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_loadPalette(int argc, const char **argv) {
+bool Debugger::cmdLoadPalette(int argc, const char **argv) {
Palette palette(_vm->screen()->getPalette(0).getNumColors());
if (argc <= 1) {
@@ -111,7 +111,7 @@ bool Debugger::cmd_loadPalette(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_showFacings(int argc, const char **argv) {
+bool Debugger::cmdShowFacings(int argc, const char **argv) {
debugPrintf("Facing directions:\n");
debugPrintf("7 0 1\n");
debugPrintf(" \\ | / \n");
@@ -121,7 +121,7 @@ bool Debugger::cmd_showFacings(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_gameSpeed(int argc, const char **argv) {
+bool Debugger::cmdGameSpeed(int argc, const char **argv) {
if (argc == 2) {
int val = atoi(argv[1]);
@@ -138,7 +138,7 @@ bool Debugger::cmd_gameSpeed(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_listFlags(int argc, const char **argv) {
+bool Debugger::cmdListFlags(int argc, const char **argv) {
for (int i = 0, p = 0; i < (int)sizeof(_vm->_flagsTable) * 8; i++, ++p) {
debugPrintf("(%-3i): %-2i", i, _vm->queryGameFlag(i));
if (p == 5) {
@@ -150,7 +150,7 @@ bool Debugger::cmd_listFlags(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_toggleFlag(int argc, const char **argv) {
+bool Debugger::cmdToggleFlag(int argc, const char **argv) {
if (argc > 1) {
uint flag = atoi(argv[1]);
if (_vm->queryGameFlag(flag))
@@ -165,7 +165,7 @@ bool Debugger::cmd_toggleFlag(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_queryFlag(int argc, const char **argv) {
+bool Debugger::cmdQueryFlag(int argc, const char **argv) {
if (argc > 1) {
uint flag = atoi(argv[1]);
debugPrintf("Flag %i is %i\n", flag, _vm->queryGameFlag(flag));
@@ -176,7 +176,7 @@ bool Debugger::cmd_queryFlag(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_listTimers(int argc, const char **argv) {
+bool Debugger::cmdListTimers(int argc, const char **argv) {
debugPrintf("Current time: %-8u\n", g_system->getMillis());
for (int i = 0; i < _vm->timer()->count(); i++)
debugPrintf("Timer %-2i: Active: %-3s Countdown: %-6i %-8u\n", i, _vm->timer()->isEnabled(i) ? "Yes" : "No", _vm->timer()->getDelay(i), _vm->timer()->getNextRun(i));
@@ -184,7 +184,7 @@ bool Debugger::cmd_listTimers(int argc, const char **argv) {
return true;
}
-bool Debugger::cmd_setTimerCountdown(int argc, const char **argv) {
+bool Debugger::cmdSetTimerCountdown(int argc, const char **argv) {
if (argc > 2) {
uint timer = atoi(argv[1]);
uint countdown = atoi(argv[2]);
@@ -204,14 +204,14 @@ Debugger_LoK::Debugger_LoK(KyraEngine_LoK *vm)
}
void Debugger_LoK::initialize() {
- registerCmd("enter", WRAP_METHOD(Debugger_LoK, cmd_enterRoom));
- registerCmd("scenes", WRAP_METHOD(Debugger_LoK, cmd_listScenes));
- registerCmd("give", WRAP_METHOD(Debugger_LoK, cmd_giveItem));
- registerCmd("birthstones", WRAP_METHOD(Debugger_LoK, cmd_listBirthstones));
+ registerCmd("enter", WRAP_METHOD(Debugger_LoK, cmdEnterRoom));
+ registerCmd("scenes", WRAP_METHOD(Debugger_LoK, cmdListScenes));
+ registerCmd("give", WRAP_METHOD(Debugger_LoK, cmdGiveItem));
+ registerCmd("birthstones", WRAP_METHOD(Debugger_LoK, cmdListBirthstones));
Debugger::initialize();
}
-bool Debugger_LoK::cmd_enterRoom(int argc, const char **argv) {
+bool Debugger_LoK::cmdEnterRoom(int argc, const char **argv) {
uint direction = 0;
if (argc > 1) {
int room = atoi(argv[1]);
@@ -250,7 +250,7 @@ bool Debugger_LoK::cmd_enterRoom(int argc, const char **argv) {
return true;
}
-bool Debugger_LoK::cmd_listScenes(int argc, const char **argv) {
+bool Debugger_LoK::cmdListScenes(int argc, const char **argv) {
for (int i = 0; i < _vm->_roomTableSize; i++) {
debugPrintf("%-3i: %-10s", i, _vm->_roomFilenameTable[_vm->_roomTable[i].nameIndex]);
if (!(i % 8))
@@ -261,7 +261,7 @@ bool Debugger_LoK::cmd_listScenes(int argc, const char **argv) {
return true;
}
-bool Debugger_LoK::cmd_giveItem(int argc, const char **argv) {
+bool Debugger_LoK::cmdGiveItem(int argc, const char **argv) {
if (argc == 2) {
int item = atoi(argv[1]);
@@ -280,7 +280,7 @@ bool Debugger_LoK::cmd_giveItem(int argc, const char **argv) {
return true;
}
-bool Debugger_LoK::cmd_listBirthstones(int argc, const char **argv) {
+bool Debugger_LoK::cmdListBirthstones(int argc, const char **argv) {
debugPrintf("Needed birthstone gems:\n");
for (int i = 0; i < ARRAYSIZE(_vm->_birthstoneGemTable); ++i)
debugPrintf("%-3d '%s'\n", _vm->_birthstoneGemTable[i], _vm->_itemList[_vm->_birthstoneGemTable[i]]);
@@ -293,16 +293,16 @@ Debugger_v2::Debugger_v2(KyraEngine_v2 *vm) : Debugger(vm), _vm(vm) {
}
void Debugger_v2::initialize() {
- registerCmd("character_info", WRAP_METHOD(Debugger_v2, cmd_characterInfo));
- registerCmd("enter", WRAP_METHOD(Debugger_v2, cmd_enterScene));
- registerCmd("scenes", WRAP_METHOD(Debugger_v2, cmd_listScenes));
- registerCmd("scene_info", WRAP_METHOD(Debugger_v2, cmd_sceneInfo));
- registerCmd("scene_to_facing", WRAP_METHOD(Debugger_v2, cmd_sceneToFacing));
- registerCmd("give", WRAP_METHOD(Debugger_v2, cmd_giveItem));
+ registerCmd("character_info", WRAP_METHOD(Debugger_v2, cmdCharacterInfo));
+ registerCmd("enter", WRAP_METHOD(Debugger_v2, cmdEnterScene));
+ registerCmd("scenes", WRAP_METHOD(Debugger_v2, cmdListScenes));
+ registerCmd("scene_info", WRAP_METHOD(Debugger_v2, cmdSceneInfo));
+ registerCmd("scene_to_facing", WRAP_METHOD(Debugger_v2, cmdSceneToFacing));
+ registerCmd("give", WRAP_METHOD(Debugger_v2, cmdGiveItem));
Debugger::initialize();
}
-bool Debugger_v2::cmd_enterScene(int argc, const char **argv) {
+bool Debugger_v2::cmdEnterScene(int argc, const char **argv) {
uint direction = 0;
if (argc > 1) {
int scene = atoi(argv[1]);
@@ -341,7 +341,7 @@ bool Debugger_v2::cmd_enterScene(int argc, const char **argv) {
return true;
}
-bool Debugger_v2::cmd_listScenes(int argc, const char **argv) {
+bool Debugger_v2::cmdListScenes(int argc, const char **argv) {
int shown = 1;
for (int i = 0; i < _vm->_sceneListSize; ++i) {
if (_vm->_sceneList[i].filename1[0]) {
@@ -356,7 +356,7 @@ bool Debugger_v2::cmd_listScenes(int argc, const char **argv) {
return true;
}
-bool Debugger_v2::cmd_sceneInfo(int argc, const char **argv) {
+bool Debugger_v2::cmdSceneInfo(int argc, const char **argv) {
debugPrintf("Current scene: %d '%s'\n", _vm->_currentScene, _vm->_sceneList[_vm->_currentScene].filename1);
debugPrintf("\n");
debugPrintf("Exit information:\n");
@@ -379,7 +379,7 @@ bool Debugger_v2::cmd_sceneInfo(int argc, const char **argv) {
return true;
}
-bool Debugger_v2::cmd_characterInfo(int argc, const char **argv) {
+bool Debugger_v2::cmdCharacterInfo(int argc, const char **argv) {
debugPrintf("Main character is in scene: %d '%s'\n", _vm->_mainCharacter.sceneId, _vm->_sceneList[_vm->_mainCharacter.sceneId].filename1);
debugPrintf("Position: %dx%d\n", _vm->_mainCharacter.x1, _vm->_mainCharacter.y1);
debugPrintf("Facing: %d\n", _vm->_mainCharacter.facing);
@@ -392,7 +392,7 @@ bool Debugger_v2::cmd_characterInfo(int argc, const char **argv) {
return true;
}
-bool Debugger_v2::cmd_sceneToFacing(int argc, const char **argv) {
+bool Debugger_v2::cmdSceneToFacing(int argc, const char **argv) {
if (argc == 2) {
int facing = atoi(argv[1]);
int16 exit = -1;
@@ -426,7 +426,7 @@ bool Debugger_v2::cmd_sceneToFacing(int argc, const char **argv) {
return true;
}
-bool Debugger_v2::cmd_giveItem(int argc, const char **argv) {
+bool Debugger_v2::cmdGiveItem(int argc, const char **argv) {
if (argc == 2) {
int item = atoi(argv[1]);
@@ -449,11 +449,11 @@ Debugger_HoF::Debugger_HoF(KyraEngine_HoF *vm) : Debugger_v2(vm), _vm(vm) {
}
void Debugger_HoF::initialize() {
- registerCmd("pass_codes", WRAP_METHOD(Debugger_HoF, cmd_passcodes));
+ registerCmd("pass_codes", WRAP_METHOD(Debugger_HoF, cmdPasscodes));
Debugger_v2::initialize();
}
-bool Debugger_HoF::cmd_passcodes(int argc, const char **argv) {
+bool Debugger_HoF::cmdPasscodes(int argc, const char **argv) {
if (argc == 2) {
int val = atoi(argv[1]);
@@ -482,19 +482,19 @@ Debugger_EoB::Debugger_EoB(EoBCoreEngine *vm) : Debugger(vm), _vm(vm) {
}
void Debugger_EoB::initialize() {
- registerCmd("import_savefile", WRAP_METHOD(Debugger_EoB, cmd_importSaveFile));
- registerCmd("save_original", WRAP_METHOD(Debugger_EoB, cmd_saveOriginal));
- registerCmd("list_monsters", WRAP_METHOD(Debugger_EoB, cmd_listMonsters));
- registerCmd("show_position", WRAP_METHOD(Debugger_EoB, cmd_showPosition));
- registerCmd("set_position", WRAP_METHOD(Debugger_EoB, cmd_setPosition));
- registerCmd("open_door", WRAP_METHOD(Debugger_EoB, cmd_openDoor));
- registerCmd("close_door", WRAP_METHOD(Debugger_EoB, cmd_closeDoor));
- registerCmd("list_flags", WRAP_METHOD(Debugger_EoB, cmd_listFlags));
- registerCmd("set_flag", WRAP_METHOD(Debugger_EoB, cmd_setFlag));
- registerCmd("clear_flag", WRAP_METHOD(Debugger_EoB, cmd_clearFlag));
-}
-
-bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
+ registerCmd("import_savefile", WRAP_METHOD(Debugger_EoB, cmdImportSaveFile));
+ registerCmd("save_original", WRAP_METHOD(Debugger_EoB, cmdSaveOriginal));
+ registerCmd("list_monsters", WRAP_METHOD(Debugger_EoB, cmdListMonsters));
+ registerCmd("show_position", WRAP_METHOD(Debugger_EoB, cmdShowPosition));
+ registerCmd("set_position", WRAP_METHOD(Debugger_EoB, cmdSetPosition));
+ registerCmd("open_door", WRAP_METHOD(Debugger_EoB, cmdOpenDoor));
+ registerCmd("close_door", WRAP_METHOD(Debugger_EoB, cmdCloseDoor));
+ registerCmd("list_flags", WRAP_METHOD(Debugger_EoB, cmdListFlags));
+ registerCmd("set_flag", WRAP_METHOD(Debugger_EoB, cmdSetFlag));
+ registerCmd("clear_flag", WRAP_METHOD(Debugger_EoB, cmdClearFlag));
+}
+
+bool Debugger_EoB::cmdImportSaveFile(int argc, const char **argv) {
if (!_vm->_allowImport) {
debugPrintf("This command only works from the main menu.\n");
return true;
@@ -516,7 +516,7 @@ bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
return true;
}
-bool Debugger_EoB::cmd_saveOriginal(int argc, const char **argv) {
+bool Debugger_EoB::cmdSaveOriginal(int argc, const char **argv) {
if (!_vm->_runFlag) {
debugPrintf("This command doesn't work during intro or outro sequences,\nfrom the main menu or from the character generation.\n");
return true;
@@ -566,7 +566,7 @@ bool Debugger_EoB::cmd_saveOriginal(int argc, const char **argv) {
return true;
}
-bool Debugger_EoB::cmd_listMonsters(int, const char **) {
+bool Debugger_EoB::cmdListMonsters(int, const char **) {
debugPrintf("\nCurrent level: %d\n----------------------\n\n", _vm->_currentLevel);
debugPrintf("Id Type Unit Block Position Direction Sub Level Mode Dst.block HP Flags\n--------------------------------------------------------------------------------------------------------------\n");
@@ -580,12 +580,12 @@ bool Debugger_EoB::cmd_listMonsters(int, const char **) {
return true;
}
-bool Debugger_EoB::cmd_showPosition(int, const char **) {
+bool Debugger_EoB::cmdShowPosition(int, const char **) {
debugPrintf("\nCurrent level: %d\nCurrent Sub Level: %d\nCurrent block: %d (0x%.04x)\nNext block: %d (0x%.04x)\nCurrent direction: %d\n\n", _vm->_currentLevel, _vm->_currentSub, _vm->_currentBlock, _vm->_currentBlock, _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->_currentDirection);
return true;
}
-bool Debugger_EoB::cmd_setPosition(int argc, const char **argv) {
+bool Debugger_EoB::cmdSetPosition(int argc, const char **argv) {
if (argc == 4) {
_vm->_currentBlock = atoi(argv[3]);
int sub = atoi(argv[2]);
@@ -622,7 +622,7 @@ bool Debugger_EoB::cmd_setPosition(int argc, const char **argv) {
return true;
}
-bool Debugger_EoB::cmd_openDoor(int, const char **) {
+bool Debugger_EoB::cmdOpenDoor(int, const char **) {
debugPrintf("Warning: Using this command may cause glitches.\n");
uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
@@ -637,7 +637,7 @@ bool Debugger_EoB::cmd_openDoor(int, const char **) {
return true;
}
-bool Debugger_EoB::cmd_closeDoor(int, const char **) {
+bool Debugger_EoB::cmdCloseDoor(int, const char **) {
debugPrintf("Warning: Using this command may cause glitches.\n");
uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
@@ -651,7 +651,7 @@ bool Debugger_EoB::cmd_closeDoor(int, const char **) {
return true;
}
-bool Debugger_EoB::cmd_listFlags(int, const char **) {
+bool Debugger_EoB::cmdListFlags(int, const char **) {
debugPrintf("Flag Status\n----------------------\n\n");
for (int i = 0; i < 32; i++) {
uint32 flag = 1 << i;
@@ -661,7 +661,7 @@ bool Debugger_EoB::cmd_listFlags(int, const char **) {
return true;
}
-bool Debugger_EoB::cmd_setFlag(int argc, const char **argv) {
+bool Debugger_EoB::cmdSetFlag(int argc, const char **argv) {
if (argc != 2) {
debugPrintf("Syntax: set_flag <flag>\n\n");
return true;
@@ -678,7 +678,7 @@ bool Debugger_EoB::cmd_setFlag(int argc, const char **argv) {
return true;
}
-bool Debugger_EoB::cmd_clearFlag(int argc, const char **argv) {
+bool Debugger_EoB::cmdClearFlag(int argc, const char **argv) {
if (argc != 2) {
debugPrintf("Syntax: clear_flag <flag>\n\n");
return true;
diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h
index aaf7c51..15cee2d 100644
--- a/engines/kyra/debugger.h
+++ b/engines/kyra/debugger.h
@@ -42,15 +42,15 @@ public:
protected:
KyraEngine_v1 *_vm;
- bool cmd_setScreenDebug(int argc, const char **argv);
- bool cmd_loadPalette(int argc, const char **argv);
- bool cmd_showFacings(int argc, const char **argv);
- bool cmd_gameSpeed(int argc, const char **argv);
- bool cmd_listFlags(int argc, const char **argv);
- bool cmd_toggleFlag(int argc, const char **argv);
- bool cmd_queryFlag(int argc, const char **argv);
- bool cmd_listTimers(int argc, const char **argv);
- bool cmd_setTimerCountdown(int argc, const char **argv);
+ bool cmdSetScreenDebug(int argc, const char **argv);
+ bool cmdLoadPalette(int argc, const char **argv);
+ bool cmdShowFacings(int argc, const char **argv);
+ bool cmdGameSpeed(int argc, const char **argv);
+ bool cmdListFlags(int argc, const char **argv);
+ bool cmdToggleFlag(int argc, const char **argv);
+ bool cmdQueryFlag(int argc, const char **argv);
+ bool cmdListTimers(int argc, const char **argv);
+ bool cmdSetTimerCountdown(int argc, const char **argv);
};
class Debugger_LoK : public Debugger {
@@ -62,10 +62,10 @@ public:
protected:
KyraEngine_LoK *_vm;
- bool cmd_enterRoom(int argc, const char **argv);
- bool cmd_listScenes(int argc, const char **argv);
- bool cmd_giveItem(int argc, const char **argv);
- bool cmd_listBirthstones(int argc, const char **argv);
+ bool cmdEnterRoom(int argc, const char **argv);
+ bool cmdListScenes(int argc, const char **argv);
+ bool cmdGiveItem(int argc, const char **argv);
+ bool cmdListBirthstones(int argc, const char **argv);
};
class Debugger_v2 : public Debugger {
@@ -77,12 +77,12 @@ public:
protected:
KyraEngine_v2 *_vm;
- bool cmd_enterScene(int argc, const char **argv);
- bool cmd_listScenes(int argc, const char **argv);
- bool cmd_sceneInfo(int argc, const char **argv);
- bool cmd_characterInfo(int argc, const char **argv);
- bool cmd_sceneToFacing(int argc, const char **argv);
- bool cmd_giveItem(int argc, const char **argv);
+ bool cmdEnterScene(int argc, const char **argv);
+ bool cmdListScenes(int argc, const char **argv);
+ bool cmdSceneInfo(int argc, const char **argv);
+ bool cmdCharacterInfo(int argc, const char **argv);
+ bool cmdSceneToFacing(int argc, const char **argv);
+ bool cmdGiveItem(int argc, const char **argv);
};
class Debugger_HoF : public Debugger_v2 {
@@ -93,7 +93,7 @@ public:
protected:
KyraEngine_HoF *_vm;
- bool cmd_passcodes(int argc, const char **argv);
+ bool cmdPasscodes(int argc, const char **argv);
};
#ifdef ENABLE_LOL
@@ -119,16 +119,16 @@ public:
protected:
EoBCoreEngine *_vm;
- bool cmd_importSaveFile(int argc, const char **argv);
- bool cmd_saveOriginal(int argc, const char **argv);
- bool cmd_listMonsters(int argc, const char **argv);
- bool cmd_showPosition(int argc, const char **argv);
- bool cmd_setPosition(int argc, const char **argv);
- bool cmd_openDoor(int argc, const char **argv);
- bool cmd_closeDoor(int argc, const char **argv);
- bool cmd_listFlags(int argc, const char **argv);
- bool cmd_setFlag(int argc, const char **argv);
- bool cmd_clearFlag(int argc, const char **argv);
+ bool cmdImportSaveFile(int argc, const char **argv);
+ bool cmdSaveOriginal(int argc, const char **argv);
+ bool cmdListMonsters(int argc, const char **argv);
+ bool cmdShowPosition(int argc, const char **argv);
+ bool cmdSetPosition(int argc, const char **argv);
+ bool cmdOpenDoor(int argc, const char **argv);
+ bool cmdCloseDoor(int argc, const char **argv);
+ bool cmdListFlags(int argc, const char **argv);
+ bool cmdSetFlag(int argc, const char **argv);
+ bool cmdClearFlag(int argc, const char **argv);
};
#endif // ENABLE_EOB
Commit: 8b7672b64cc179660a4e1706db114b3b6b7073f7
https://github.com/scummvm/scummvm/commit/8b7672b64cc179660a4e1706db114b3b6b7073f7
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
ALL: Introduce typesafe Debugger::registerVar functions.
This also adds a FIXME to SCI which registered an enum type as int...
Changed paths:
engines/sci/console.cpp
engines/scumm/debugger.cpp
gui/debugger.h
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 1736ac7..1c4228e 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -79,11 +79,14 @@ Console::Console(SciEngine *engine) : GUI::Debugger(),
assert(_engine->_gamestate);
// Variables
- registerVar("sleeptime_factor", &g_debug_sleeptime_factor, DVAR_INT, 0);
- registerVar("gc_interval", &engine->_gamestate->scriptGCInterval, DVAR_INT, 0);
- registerVar("simulated_key", &g_debug_simulated_key, DVAR_INT, 0);
- registerVar("track_mouse_clicks", &g_debug_track_mouse_clicks, DVAR_BOOL, 0);
- registerVar("script_abort_flag", &_engine->_gamestate->abortScriptProcessing, DVAR_INT, 0);
+ registerVar("sleeptime_factor", &g_debug_sleeptime_factor);
+ registerVar("gc_interval", &engine->_gamestate->scriptGCInterval);
+ registerVar("simulated_key", &g_debug_simulated_key);
+ registerVar("track_mouse_clicks", &g_debug_track_mouse_clicks);
+ // FIXME: This actually passes an enum type instead of an integer but no
+ // precaution is taken to assure that all assigned values are in the range
+ // of the enum type. We should handle this more carefully...
+ registerVar("script_abort_flag", (int *)&_engine->_gamestate->abortScriptProcessing);
// General
registerCmd("help", WRAP_METHOD(Console, cmdHelp));
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index a08fa6e..2b718b2 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -58,10 +58,10 @@ ScummDebugger::ScummDebugger(ScummEngine *s)
_vm = s;
// Register variables
- registerVar("scumm_speed", &_vm->_fastMode, DVAR_BYTE, 0);
- registerVar("scumm_room", &_vm->_currentRoom, DVAR_BYTE, 0);
- registerVar("scumm_roomresource", &_vm->_roomResource, DVAR_INT, 0);
- registerVar("scumm_vars", &_vm->_scummVars, DVAR_INTARRAY, _vm->_numVariables);
+ registerVar("scumm_speed", &_vm->_fastMode);
+ registerVar("scumm_room", &_vm->_currentRoom);
+ registerVar("scumm_roomresource", &_vm->_roomResource);
+ registerVar("scumm_vars", &_vm->_scummVars, _vm->_numVariables);
// Register commands
registerCmd("continue", WRAP_METHOD(ScummDebugger, cmdExit));
diff --git a/gui/debugger.h b/gui/debugger.h
index 319fa68..8c7481b 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -96,7 +96,7 @@ protected:
int arraySize;
};
-
+private:
/**
* Register a variable with the debugger. This allows the user to read and modify
* this variable.
@@ -104,10 +104,30 @@ protected:
* @param variable pointer to the actual storage of the variable
* @param type the type of the variable (byte, int, bool, ...)
* @paral arraySize for type DVAR_INTARRAY this specifies the size of the array
- *
- * @todo replace this single method by type safe variants.
*/
void registerVar(const Common::String &varname, void *variable, VarType type, int arraySize);
+
+protected:
+ void registerVar(const Common::String &varname, byte *variable) {
+ registerVar(varname, variable, DVAR_BYTE, 0);
+ }
+
+ void registerVar(const Common::String &varname, int *variable) {
+ registerVar(varname, variable, DVAR_INT, 0);
+ }
+
+ void registerVar(const Common::String &varname, bool *variable) {
+ registerVar(varname, variable, DVAR_BOOL, 0);
+ }
+
+ void registerVar(const Common::String &varname, int32 **variable, int arraySize) {
+ registerVar(varname, variable, DVAR_INTARRAY, arraySize);
+ }
+
+ void registerVar(const Common::String &varname, Common::String *variable) {
+ registerVar(varname, variable, DVAR_STRING, 0);
+ }
+
void registerCmd(const Common::String &cmdname, Debuglet *debuglet);
Commit: 63ccd85baae74a59f9cc720bef5ca58224ab8dd5
https://github.com/scummvm/scummvm/commit/63ccd85baae74a59f9cc720bef5ca58224ab8dd5
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-27T02:04:08+02:00
Commit Message:
GRAPHICS: colour -> color in VectorRendererSpec code.
Changed paths:
graphics/VectorRendererSpec.cpp
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index a3ec66a..a9594f7 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -701,7 +701,7 @@ darkenFill(PixelType *ptr, PixelType *end) {
PixelType addA = (PixelType)(3 << (_format.aShift + 6 - _format.aLoss));
while (ptr != end) {
- // Darken the colour, and increase the alpha
+ // Darken the color, and increase the alpha
// (0% -> 75%, 100% -> 100%)
*ptr = (PixelType)(((*ptr & ~mask) >> 2) + addA);
++ptr;
More information about the Scummvm-git-logs
mailing list