From 1758260c39b454c46770e2f50cf40752d49f0073 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 24 Feb 2006 23:31:31 +0000 Subject: Changed debug()s to debugC()s svn-id: r20848 --- engines/gob/cdrom.cpp | 6 +++--- engines/gob/dataio.cpp | 6 +++--- engines/gob/game.cpp | 28 ++++++++++++++-------------- engines/gob/gob.cpp | 10 ++++++++++ engines/gob/gob.h | 12 ++++++++++++ engines/gob/goblin.cpp | 2 +- engines/gob/inter.cpp | 2 -- engines/gob/inter_v1.cpp | 19 +++++++++---------- engines/gob/inter_v2.cpp | 20 +++++--------------- engines/gob/mult.cpp | 2 +- engines/gob/mult_v2.cpp | 4 ++-- engines/gob/music.cpp | 5 ++--- engines/gob/parse_v1.cpp | 8 ++++---- engines/gob/parse_v2.cpp | 8 ++++---- engines/gob/timer.cpp | 4 ++-- 15 files changed, 72 insertions(+), 64 deletions(-) diff --git a/engines/gob/cdrom.cpp b/engines/gob/cdrom.cpp index bda2081404..d5b3dde171 100644 --- a/engines/gob/cdrom.cpp +++ b/engines/gob/cdrom.cpp @@ -155,7 +155,7 @@ void CDROM::startTrack(const char *trackname) { if (!_LICbuffer) return; - debug(3, "startTrack(%s)", trackname); + debugC(1, DEBUG_MUSIC, "startTrack(%s)", trackname); matchPtr = 0; curPtr = _LICbuffer; @@ -197,7 +197,7 @@ void CDROM::play(uint32 from, uint32 to) { // HSG encodes frame information into a double word: // minute multiplied by 4500, plus second multiplied by 75, // plus frame, minus 150 - debug(3, "play(%d, %d)", from, to); + debugC(1, DEBUG_MUSIC, "play(%d, %d)", from, to); AudioCD.play(1, 0, from, to - from + 1); } @@ -218,7 +218,7 @@ void CDROM::stopPlaying(void) { } void CDROM::stop(void) { - debug(3, "stop()"); + debugC(1, DEBUG_MUSIC, "stop()"); AudioCD.stop(); } diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp index b66de4a497..c685e88bec 100644 --- a/engines/gob/dataio.cpp +++ b/engines/gob/dataio.cpp @@ -114,7 +114,7 @@ int32 DataIO::readChunk(int16 handle, char *buf, int16 size) { offset = _vm->_global->_chunkOffset[file * MAX_SLOT_COUNT + slot] + _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot]; - debug(7, "seek: %ld, %ld", _vm->_global->_chunkOffset[file * MAX_SLOT_COUNT + slot], _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot]); + debugC(7, DEBUG_FILEIO, "seek: %ld, %ld", _vm->_global->_chunkOffset[file * MAX_SLOT_COUNT + slot], _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot]); file_getHandle(_vm->_global->_dataFileHandles[file])->seek(offset, SEEK_SET); } @@ -206,7 +206,7 @@ void DataIO::openDataFile(const char *src) { _vm->_global->_numDataChunks[file] = file_getHandle(_vm->_global->_dataFileHandles[file])->readUint16LE(); - debug(7, "DataChunks: %d [for %s]", _vm->_global->_numDataChunks[file], path); + debugC(7, DEBUG_FILEIO, "DataChunks: %d [for %s]", _vm->_global->_numDataChunks[file], path); dataDesc = new ChunkDesc[_vm->_global->_numDataChunks[file]]; _vm->_global->_dataFiles[file] = dataDesc; @@ -219,7 +219,7 @@ void DataIO::openDataFile(const char *src) { } for (i = 0; i < _vm->_global->_numDataChunks[file]; i++) - debug(7, "%d: %s %d", i, dataDesc[i].chunkName, dataDesc[i].size); + debugC(7, DEBUG_FILEIO, "%d: %s %d", i, dataDesc[i].chunkName, dataDesc[i].size); for (i = 0; i < MAX_SLOT_COUNT; i++) _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + i] = -1; diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index d48405a668..7d5f68ada3 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -118,15 +118,15 @@ char *Game::loadExtData(int16 itemId, int16 *pResWidth, int16 *pResHeight) { if (pResWidth != 0) { *pResWidth = item->width & 0x7fff; *pResHeight = item->height; - debug(7, "loadExtData(%d, %d, %d)", itemId, *pResWidth, *pResHeight); + debugC(7, DEBUG_FILEIO, "loadExtData(%d, %d, %d)", itemId, *pResWidth, *pResHeight); } - debug(7, "loadExtData(%d, 0, 0)", itemId); + debugC(7, DEBUG_FILEIO, "loadExtData(%d, 0, 0)", itemId); if (item->height == 0) size += (item->width & 0x7fff) << 16; - debug(7, "size: %d off: %d", size, offset); + debugC(7, DEBUG_FILEIO, "size: %d off: %d", size, offset); if (offset >= 0) { handle = _extHandle; } else { @@ -139,7 +139,7 @@ char *Game::loadExtData(int16 itemId, int16 *pResWidth, int16 *pResHeight) { handle = commonHandle; } - debug(7, "off: %ld size: %ld", offset, tableSize); + debugC(7, DEBUG_FILEIO, "off: %ld size: %ld", offset, tableSize); _vm->_dataio->seekData(handle, offset + tableSize, SEEK_SET); // CHECKME: is the below correct? if (isPacked) @@ -184,11 +184,11 @@ void Game::addNewCollision(int16 id, int16 left, int16 top, int16 right, int16 b int16 i; Collision *ptr; - debug(5, "addNewCollision"); - debug(5, "id = %x", id); - debug(5, "left = %d, top = %d, right = %d, bottom = %d", left, top, right, bottom); - debug(5, "flags = %x, key = %x", flags, key); - debug(5, "funcEnter = %d, funcLeave = %d", funcEnter, funcLeave); + debugC(5, DEBUG_COLLISIONS, "addNewCollision"); + debugC(5, DEBUG_COLLISIONS, "id = %x", id); + debugC(5, DEBUG_COLLISIONS, "left = %d, top = %d, right = %d, bottom = %d", left, top, right, bottom); + debugC(5, DEBUG_COLLISIONS, "flags = %x, key = %x", flags, key); + debugC(5, DEBUG_COLLISIONS, "funcEnter = %d, funcLeave = %d", funcEnter, funcLeave); for (i = 0; i < 250; i++) { if (_collisionAreas[i].left != -1) @@ -223,7 +223,7 @@ void Game::pushCollisions(char all) { Collision *destPtr; int16 size; - debug(4, "pushCollisions"); + debugC(1, DEBUG_COLLISIONS, "pushCollisions"); for (size = 0, srcPtr = _collisionAreas; srcPtr->left != -1; srcPtr++) { if (all || (srcPtr->id & 0x8000)) @@ -248,7 +248,7 @@ void Game::popCollisions(void) { Collision *destPtr; Collision *srcPtr; - debug(4, "popCollision"); + debugC(1, DEBUG_COLLISIONS, "popCollision"); _collStackSize--; for (destPtr = _collisionAreas; destPtr->left != -1; destPtr++); @@ -1158,7 +1158,7 @@ void Game::collisionsBlock(void) { } cmd &= 0x7f; - debug(4, "collisionsBlock(%d)", cmd); + debugC(1, DEBUG_COLLISIONS, "collisionsBlock(%d)", cmd); switch (cmd) { case 3: @@ -1786,8 +1786,8 @@ void Game::playTot(int16 skipPlay) { _curExtFile[strlen(_curExtFile) - 4] = 0; strcat(_curExtFile, ".ext"); - debug(4, "IMA: %s", _curImaFile); - debug(4, "EXT: %s", _curExtFile); + debugC(4, DEBUG_FILEIO, "IMA: %s", _curImaFile); + debugC(4, DEBUG_FILEIO, "EXT: %s", _curExtFile); filePtr = (char *)_totFileData + 0x30; diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 22798ab8aa..93bef2b1fc 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -143,6 +143,16 @@ GobEngine::GobEngine(GameDetector *detector, OSystem * syst, uint32 features) _features = features; _copyProtection = ConfMan.getBool("copy_protection"); + + Common::addSpecialDebugLevel(DEBUG_FUNCOP, "FuncOpcodes", "Script FuncOpcodes debug level"); + Common::addSpecialDebugLevel(DEBUG_DRAWOP, "DrawOpcodes", "Script DrawOpcodes debug level"); + Common::addSpecialDebugLevel(DEBUG_GOBOP, "GoblinOpcodes", "Script GoblinOpcodes debug level"); + Common::addSpecialDebugLevel(DEBUG_MUSIC, "Music", "CD and adlib music debug level"); + Common::addSpecialDebugLevel(DEBUG_PARSER, "Music", "Parser debug level"); + Common::addSpecialDebugLevel(DEBUG_GAMEFLOW, "Gameflow", "Gameflow debug level"); + Common::addSpecialDebugLevel(DEBUG_FILEIO, "FileIO", "File Input/Output debug level"); + Common::addSpecialDebugLevel(DEBUG_GRAPHICS, "Graphics", "Graphics debug level"); + Common::addSpecialDebugLevel(DEBUG_COLLISIONS, "Collisions", "Collisions debug level"); } GobEngine::~GobEngine() { diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 074546ffcb..111e575bd9 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -67,6 +67,18 @@ enum { GF_MAC = 1 << 5 }; +enum { + DEBUG_FUNCOP = 1 << 0, + DEBUG_DRAWOP = 1 << 1, + DEBUG_GOBOP = 1 << 2, + DEBUG_MUSIC = 1 << 3, // CD and adlib music + DEBUG_PARSER = 1 << 4, + DEBUG_GAMEFLOW = 1 << 5, + DEBUG_FILEIO = 1 << 6, + DEBUG_GRAPHICS = 1 << 7, + DEBUG_COLLISIONS = 1 << 8 +}; + class GobEngine : public Engine { void errorString(const char *buf_input, char *buf_output); diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp index f434c65a70..5b0df56be3 100644 --- a/engines/gob/goblin.cpp +++ b/engines/gob/goblin.cpp @@ -647,7 +647,7 @@ void Goblin::switchGoblin(int16 index) { int16 next; int16 tmp; - debug(4, "switchGoblin"); + debugC(4, DEBUG_GAMEFLOW, "switchGoblin"); if (VAR(59) != 0) return; diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index b17067411e..606849cb58 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -154,8 +154,6 @@ void Inter::funcBlock(int16 retFlag) { _vm->_global->_inter_execPtr++; counter++; -// debug(4, "funcBlock(%d, %d)", cmd2, cmd); - if (cmd2 == 0) cmd >>= 4; diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 1022d2cf48..04eba247f2 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1544,10 +1544,9 @@ void Inter_v1::o1_initMult(void) { _vm->_anim->_areaLeft + _vm->_anim->_areaWidth - 1, _vm->_anim->_areaTop + _vm->_anim->_areaHeight - 1, 0, 0, 0); - debug(4, "o1_initMult: x = %d, y = %d, w = %d, h = %d", + debugC(4, DEBUG_GRAPHICS, "o1_initMult: x = %d, y = %d, w = %d, h = %d", _vm->_anim->_areaLeft, _vm->_anim->_areaTop, _vm->_anim->_areaWidth, _vm->_anim->_areaHeight); - debug(4, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); -// _vm->_mult->interInitMult(); + debugC(4, DEBUG_GRAPHICS, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); } void Inter_v1::o1_multFreeMult(void) { @@ -1636,7 +1635,7 @@ void Inter_v1::o1_freeFontToSprite(void) { } void Inter_v1::executeDrawOpcode(byte i) { - debug(4, "opcodeDraw %d (%s)", i, getOpcodeDrawDesc(i)); + debugC(1, DEBUG_DRAWOP, "opcodeDraw %d (%s)", i, getOpcodeDrawDesc(i)); OpcodeDrawProcV1 op = _opcodesDrawV1[i].proc; @@ -1647,7 +1646,7 @@ void Inter_v1::executeDrawOpcode(byte i) { } bool Inter_v1::executeFuncOpcode(byte i, byte j, char &cmdCount, int16 &counter, int16 &retFlag) { - debug(4, "opcodeFunc %d.%d (%s)", i, j, getOpcodeFuncDesc(i, j)); + debugC(1, DEBUG_FUNCOP, "opcodeFunc %d.%d (%s)", i, j, getOpcodeFuncDesc(i, j)); if ((i > 4) || (j > 15)) { warning("unimplemented opcodeFunc: %d.%d", i, j); @@ -1664,7 +1663,7 @@ bool Inter_v1::executeFuncOpcode(byte i, byte j, char &cmdCount, int16 &counter, } void Inter_v1::executeGoblinOpcode(int i, int16 &extraData, int32 *retVarPtr, Goblin::Gob_Object *objDesc) { - debug(4, "opcodeGoblin %d (%s)", i, getOpcodeGoblinDesc(i)); + debugC(1, DEBUG_GOBOP, "opcodeGoblin %d (%s)", i, getOpcodeGoblinDesc(i)); OpcodeGoblinProcV1 op = NULL; @@ -1708,12 +1707,12 @@ bool Inter_v1::o1_callSub(char &cmdCount, int16 &counter, int16 &retFlag) { // _vm->_global->_inter_execPtr = (char *)_vm->_game->_totFileData + READ_LE_UINT16(_vm->_global->_inter_execPtr); uint16 offset = READ_LE_UINT16(_vm->_global->_inter_execPtr); - debug(5, "tot = \"%s\", offset = %d", _vm->_game->_curTotFile, offset); + debugC(5, DEBUG_GAMEFLOW, "tot = \"%s\", offset = %d", _vm->_game->_curTotFile, offset); // Skipping the copy protection screen in Gobliiins if (!_vm->_copyProtection && (_vm->_features & GF_GOB1) && (offset == 3905) && !scumm_stricmp(_vm->_game->_curTotFile, "intro.tot")) { - debug(2, "Skipping copy protection screen"); + debugC(2, DEBUG_GAMEFLOW, "Skipping copy protection screen"); _vm->_global->_inter_execPtr += 2; return false; } @@ -1764,7 +1763,7 @@ bool Inter_v1::o1_callBool(char &cmdCount, int16 &counter, int16 &retFlag) { _vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2; - debug(5, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, DEBUG_GAMEFLOW, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); cmd = (byte)(*_vm->_global->_inter_execPtr) >> 4; _vm->_global->_inter_execPtr++; if (cmd != 12) @@ -1774,7 +1773,7 @@ bool Inter_v1::o1_callBool(char &cmdCount, int16 &counter, int16 &retFlag) { } else { _vm->_global->_inter_execPtr += READ_LE_UINT16(_vm->_global->_inter_execPtr + 2) + 2; - debug(5, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, DEBUG_GAMEFLOW, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); cmd = (byte)(*_vm->_global->_inter_execPtr) >> 4; _vm->_global->_inter_execPtr++; if (cmd != 12) diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 0fee8b4331..548e112369 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -641,7 +641,7 @@ void Inter_v2::setupOpcodes(void) { } void Inter_v2::executeDrawOpcode(byte i) { - debug(4, "opcodeDraw %d (%s)", i, getOpcodeDrawDesc(i)); + debugC(1, DEBUG_DRAWOP, "opcodeDraw %d (%s)", i, getOpcodeDrawDesc(i)); OpcodeDrawProcV2 op = _opcodesDrawV2[i].proc; @@ -652,7 +652,7 @@ void Inter_v2::executeDrawOpcode(byte i) { } bool Inter_v2::executeFuncOpcode(byte i, byte j, char &cmdCount, int16 &counter, int16 &retFlag) { - debug(4, "opcodeFunc %d.%d (%s)", i, j, getOpcodeFuncDesc(i, j)); + debugC(1, DEBUG_FUNCOP, "opcodeFunc %d.%d (%s)", i, j, getOpcodeFuncDesc(i, j)); if ((i > 4) || (j > 15)) { warning("unimplemented opcodeFunc: %d.%d", i, j); @@ -669,7 +669,7 @@ bool Inter_v2::executeFuncOpcode(byte i, byte j, char &cmdCount, int16 &counter, } void Inter_v2::executeGoblinOpcode(int i, int16 &extraData, int32 *retVarPtr, Goblin::Gob_Object *objDesc) { - debug(4, "opcodeGoblin %d (%s)", i, getOpcodeGoblinDesc(i)); + debugC(1, DEBUG_GOBOP, "opcodeGoblin %d (%s)", i, getOpcodeGoblinDesc(i)); OpcodeGoblinProcV2 op = NULL; @@ -1242,20 +1242,10 @@ void Inter_v2::o2_initMult(void) { } if (_terminate) return; - -/* _vm->_anim->_animSurf = _vm->_video->initSurfDesc(_vm->_global->_videoMode, - _vm->_anim->_areaWidth, _vm->_anim->_areaHeight, 0); - - _vm->_draw->_spritesArray[22] = _vm->_anim->_animSurf;*/ } _vm->_draw->adjustCoords(&_vm->_anim->_areaHeight, &_vm->_anim->_areaWidth, 1); -/* _vm->_video->drawSprite(_vm->_draw->_backSurface, _vm->_anim->_animSurf, - _vm->_anim->_areaLeft, _vm->_anim->_areaTop, - _vm->_anim->_areaLeft + _vm->_anim->_areaWidth - 1, - _vm->_anim->_areaTop + _vm->_anim->_areaHeight - 1, 0, 0, 0);*/ - _vm->_draw->_sourceSurface = 21; _vm->_draw->_destSurface = 22; _vm->_draw->_spriteLeft = _vm->_anim->_areaLeft; @@ -1266,9 +1256,9 @@ void Inter_v2::o2_initMult(void) { _vm->_draw->_destSpriteY = 0; _vm->_draw->spriteOperation(0); - debug(4, "o2_initMult: x = %d, y = %d, w = %d, h = %d", + debugC(4, DEBUG_GRAPHICS, "o2_initMult: x = %d, y = %d, w = %d, h = %d", _vm->_anim->_areaLeft, _vm->_anim->_areaTop, _vm->_anim->_areaWidth, _vm->_anim->_areaHeight); - debug(4, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); + debugC(4, DEBUG_GRAPHICS, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); } void Inter_v2::o2_loadCurLayer(void) { diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp index 3f6706081c..0ac2e115bc 100644 --- a/engines/gob/mult.cpp +++ b/engines/gob/mult.cpp @@ -434,7 +434,7 @@ void Mult::interLoadMult(void) { int16 i; char *lmultData; - debug(4, "interLoadMult: Loading..."); + debugC(4, DEBUG_GAMEFLOW, "interLoadMult: Loading..."); _vm->_inter->evalExpr(&objIndex); _vm->_inter->evalExpr(&val); diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 839649d1b2..635caa7528 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -66,7 +66,7 @@ void Mult_v2::loadMult(int16 resId) { hbstaticCount = (staticCount & 0x80) != 0; staticCount &= 0x7F; - debug(7, "statics: %u, anims: %u, hb: %u", staticCount, animCount, hbstaticCount); + debugC(7, DEBUG_GRAPHICS, "statics: %u, anims: %u, hb: %u", staticCount, animCount, hbstaticCount); for (i = 0; i < staticCount; i++, _dataPtr += 14) { _multData2->staticIndices[i] = _vm->_scenery->loadStatic(1); @@ -270,7 +270,7 @@ void Mult_v2::setMultData(uint16 multindex) { if (multindex > 7) error("Multindex out of range"); - debug(4, "Switching to mult %d", multindex); + debugC(4, DEBUG_GAMEFLOW, "Switching to mult %d", multindex); _multData2 = _multDatas[multindex]; } diff --git a/engines/gob/music.cpp b/engines/gob/music.cpp index 4d39cfbe73..a70a6cfe0b 100644 --- a/engines/gob/music.cpp +++ b/engines/gob/music.cpp @@ -144,7 +144,7 @@ void Music::premixerCall(int16 *buf, uint len) { } void Music::writeOPL(byte reg, byte val) { - debug(5, "writeOPL(%02X, %02X)", reg, val); + debugC(6, DEBUG_MUSIC, "writeOPL(%02X, %02X)", reg, val); OPLWriteReg(_opl, reg, val); } @@ -388,7 +388,6 @@ void Music::startPlay(void) { } void Music::playBgMusic(void) { - debug(2, "Music::playBgMusic()"); for (int i = 0; i < ARRAYSIZE(_tracks); i++) if (!scumm_stricmp(_vm->_game->_curTotFile, _tracks[i][0])) { playTrack(_tracks[i][1]); @@ -399,7 +398,7 @@ void Music::playBgMusic(void) { void Music::playTrack(const char *trackname) { if (_playing) return; - debug(2, "Music::playTrack(%s)", trackname); + debugC(1, DEBUG_MUSIC, "Music::playTrack(%s)", trackname); unloadMusic(); for (int i = 0; i < ARRAYSIZE(_tracksToFiles); i++) if (!scumm_stricmp(trackname, _tracksToFiles[i][0])) { diff --git a/engines/gob/parse_v1.cpp b/engines/gob/parse_v1.cpp index fc0dc91d5b..b827a26943 100644 --- a/engines/gob/parse_v1.cpp +++ b/engines/gob/parse_v1.cpp @@ -42,17 +42,17 @@ int16 Parse_v1::parseVarIndex() { int16 val; operation = *_vm->_global->_inter_execPtr++; - debug(5, "var parse = %d", operation); + debugC(5, DEBUG_PARSER, "var parse = %d", operation); switch (operation) { case 23: case 25: temp = _vm->_inter->load16() * 4; - debug(5, "oper = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, DEBUG_PARSER, "oper = %d", (int16)*_vm->_global->_inter_execPtr); if (operation == 25 && *_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; val = parseValExpr(12); temp += val; - debug(5, "parse subscript = %d", val); + debugC(5, DEBUG_PARSER, "parse subscript = %d", val); } return temp; @@ -298,7 +298,7 @@ int16 Parse_v1::parseValExpr(unsigned stopToken) { if (operation != 10) { if (operation != stopToken) { - debug(5, "stoptoken error: %d != %d", operation, stopToken); + debugC(5, DEBUG_PARSER, "stoptoken error: %d != %d", operation, stopToken); } flag = oldflag; return values[0]; diff --git a/engines/gob/parse_v2.cpp b/engines/gob/parse_v2.cpp index d4dfdc863f..8aae929459 100644 --- a/engines/gob/parse_v2.cpp +++ b/engines/gob/parse_v2.cpp @@ -42,7 +42,7 @@ int16 Parse_v2::parseVarIndex() { int16 val; operation = *_vm->_global->_inter_execPtr++; - debug(5, "var parse = %d", operation); + debugC(5, DEBUG_PARSER, "var parse = %d", operation); switch (operation) { case 16: case 26: @@ -81,12 +81,12 @@ int16 Parse_v2::parseVarIndex() { case 24: case 25: temp = _vm->_inter->load16() * 4; - debug(5, "oper = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, DEBUG_PARSER, "oper = %d", (int16)*_vm->_global->_inter_execPtr); if (operation == 25 && *_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; val = parseValExpr(12); temp += val; - debug(5, "parse subscript = %d", val); + debugC(5, DEBUG_PARSER, "parse subscript = %d", val); } return temp; @@ -330,7 +330,7 @@ int16 Parse_v2::parseValExpr(unsigned stopToken) { if (operation != 10) { if (operation != stopToken) { - debug(5, "stoptoken error: %d != %d", operation, stopToken); + debugC(5, DEBUG_PARSER, "stoptoken error: %d != %d", operation, stopToken); } flag = oldflag; return values[0]; diff --git a/engines/gob/timer.cpp b/engines/gob/timer.cpp index 0b3bc06588..813a66e873 100644 --- a/engines/gob/timer.cpp +++ b/engines/gob/timer.cpp @@ -28,10 +28,10 @@ namespace Gob { void GTimer::enableTimer() { - debug(4, "STUB: GTimer::enableTimer()"); + debugC(4, DEBUG_GAMEFLOW, "STUB: GTimer::enableTimer()"); } void GTimer::disableTimer() { - debug(4, "STUB: GTimer::disableTimer()"); + debugC(4, DEBUG_GAMEFLOW, "STUB: GTimer::disableTimer()"); } } -- cgit v1.2.3