aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2014-05-27 02:04:07 +0200
committerJohannes Schickel2014-05-27 02:04:07 +0200
commitdaa8d57a866e2866369e432cf1d624179edc8875 (patch)
tree0313eab9efb85357bb78310d7fcd5615dc20d432 /engines
parentd0f5184edd101e76dd9ad96a2e68c5cc69a662a7 (diff)
downloadscummvm-rg350-daa8d57a866e2866369e432cf1d624179edc8875.tar.gz
scummvm-rg350-daa8d57a866e2866369e432cf1d624179edc8875.tar.bz2
scummvm-rg350-daa8d57a866e2866369e432cf1d624179edc8875.zip
ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf.
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/console.cpp52
-rw-r--r--engines/agi/preagi_mickey.cpp4
-rw-r--r--engines/agi/preagi_winnie.cpp2
-rw-r--r--engines/agos/debugger.cpp70
-rw-r--r--engines/avalanche/console.cpp2
-rw-r--r--engines/cge/console.cpp2
-rw-r--r--engines/cruise/debugger.cpp4
-rw-r--r--engines/drascula/console.cpp2
-rw-r--r--engines/fullpipe/console.cpp4
-rw-r--r--engines/gob/cheater_geisha.cpp2
-rw-r--r--engines/gob/console.cpp32
-rw-r--r--engines/groovie/debug.cpp14
-rw-r--r--engines/hopkins/debugger.cpp10
-rw-r--r--engines/hugo/console.cpp22
-rw-r--r--engines/kyra/debugger.cpp204
-rw-r--r--engines/lastexpress/debug.cpp162
-rw-r--r--engines/lure/debugger.cpp176
-rw-r--r--engines/mads/debugger.cpp46
-rw-r--r--engines/mohawk/console.cpp156
-rw-r--r--engines/neverhood/console.cpp72
-rw-r--r--engines/neverhood/gamevars.cpp2
-rw-r--r--engines/neverhood/scene.cpp2
-rw-r--r--engines/parallaction/debug.cpp52
-rw-r--r--engines/pegasus/console.cpp12
-rw-r--r--engines/queen/debug.cpp54
-rw-r--r--engines/saga/actor_walk.cpp2
-rw-r--r--engines/saga/animation.cpp8
-rw-r--r--engines/saga/console.cpp40
-rw-r--r--engines/saga/objectmap.cpp2
-rw-r--r--engines/saga/scene.cpp2
-rw-r--r--engines/saga/sfuncs.cpp2
-rw-r--r--engines/sci/console.cpp1434
-rw-r--r--engines/sci/engine/kevent.cpp12
-rw-r--r--engines/sci/engine/scriptdebug.cpp16
-rw-r--r--engines/sci/graphics/animate.cpp2
-rw-r--r--engines/sci/graphics/frameout.cpp10
-rw-r--r--engines/sci/graphics/ports.cpp2
-rw-r--r--engines/sci/parser/grammar.cpp22
-rw-r--r--engines/sci/parser/vocabulary.cpp20
-rw-r--r--engines/sci/sound/music.cpp22
-rw-r--r--engines/scumm/debugger.cpp168
-rw-r--r--engines/sky/debug.cpp90
-rw-r--r--engines/sword2/console.cpp186
-rw-r--r--engines/sword2/resman.cpp2
-rw-r--r--engines/sword2/sound.cpp2
-rw-r--r--engines/teenagent/console.cpp32
-rw-r--r--engines/tinsel/debugger.cpp32
-rw-r--r--engines/toltecs/console.cpp10
-rw-r--r--engines/tony/debugger.cpp6
-rw-r--r--engines/touche/console.cpp2
-rw-r--r--engines/tsage/debugger.cpp362
-rw-r--r--engines/voyeur/debugger.cpp36
-rw-r--r--engines/wintermute/debugger.cpp6
-rw-r--r--engines/zvision/core/console.cpp24
54 files changed, 1857 insertions, 1857 deletions
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index 5f222adf89..dce85b931c 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 561b56d199..4ca8d00824 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 d5ae0b59a0..a91ad24fc6 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 b5233bed0c..99ea8a15b7 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 29ae5cf9c3..639ad63491 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 447875c06f..3d281df3ef 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 4ef66ee11e..0bda44d0df 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, &params);
- 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 50e96c8757..4c14fb74fb 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 cb76345d66..3ff84dae5f 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 8c4deec370..ec6fe09d59 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 b0f6006284..303c59c4da 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 8103e4f4c6..85b9b87652 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 14b1c183a8..e5c19847fb 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 56025bfbfd..529fa4f7bd 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 e4806afb70..598eb1c1b0 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 6c2d833271..e13a2f6194 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 bbaa68befa..d2b0cd473b 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 9f5735f318..798cd004b4 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 d95c91e3be..ec0b5a0ab2 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 a4d1366880..b35c29bd5c 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 72b688c194..dcbe5583de 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 58056b65a9..1a8e74da38 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 1fea73a326..c5e694168e 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 64bd0ba5f2..8a465c58a1 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 3706806ac2..20638589e1 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 a5345261c5..04741da2cd 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 9e0bcf52ad..25119c6407 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 eab615b33f..48aa9f9c4e 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 f27c888a61..ad5167209c 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 7f77cbab38..04776bd5dc 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 91e39c54b6..cb963e23ac 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 1bc0dd067c..4f7aed75ac 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], &reg, 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], &reg_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 59f741a254..cb81da2279 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 44910058ef..f0157a6569 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 73cd7240d3..7957ed6a55 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 ffed7b596e..a322eb8e61 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 bd0b5f4081..56c63a7b12 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 ee0125b7c9..05764ba0a8 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 7c560dfaef..b4a223dcff 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 933dc0635c..99a963f2f3 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 3dd7b4caf5..665609bf32 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 63da42eec2..f79ce2b53e 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 4838bd15f6..7c45368951 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 a0561641d7..44027fd281 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 aea33e99e3..1e1687b1e6 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 13d5c687ce..294b9f923b 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 45e3a05903..ab2e0f19cd 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 f84a8e3c44..5dcd9233a5 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 22c218a19c..2a9086888a 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 c4272038dc..2cd8572253 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 5a520b0e89..b014e4e947 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 234300bce5..90b9255e9f 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 51fd74e300..f1f300c18e 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 22382bc264..a1037a1e96 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;
}