From 24c9735588ac8d914b8f058cf68373b4e9a67071 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 13 Jan 2007 15:35:02 +0000 Subject: Rename special debug levels to conform our suggested naming scheme. svn-id: r25073 --- engines/gob/cdrom.cpp | 6 +++--- engines/gob/dataio.cpp | 6 +++--- engines/gob/game.cpp | 8 ++++---- engines/gob/game_v1.cpp | 20 ++++++++++---------- engines/gob/game_v2.cpp | 22 +++++++++++----------- engines/gob/gob.cpp | 30 +++++++++++++++--------------- engines/gob/gob.h | 18 +++++++++--------- engines/gob/goblin.cpp | 2 +- engines/gob/inter_v1.cpp | 22 +++++++++++----------- engines/gob/inter_v2.cpp | 12 ++++++------ engines/gob/mult_v2.cpp | 6 +++--- engines/gob/music.cpp | 4 ++-- engines/gob/parse_v1.cpp | 8 ++++---- engines/gob/parse_v2.cpp | 8 ++++---- engines/gob/timer.cpp | 4 ++-- 15 files changed, 88 insertions(+), 88 deletions(-) (limited to 'engines') diff --git a/engines/gob/cdrom.cpp b/engines/gob/cdrom.cpp index a005ebddfc..8661d3515a 100644 --- a/engines/gob/cdrom.cpp +++ b/engines/gob/cdrom.cpp @@ -158,7 +158,7 @@ void CDROM::startTrack(const char *trackname) { if (!_LICbuffer) return; - debugC(1, DEBUG_MUSIC, "startTrack(%s)", trackname); + debugC(1, kDebugMusic, "startTrack(%s)", trackname); matchPtr = 0; curPtr = _LICbuffer; @@ -200,7 +200,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 - debugC(1, DEBUG_MUSIC, "play(%d, %d)", from, to); + debugC(1, kDebugMusic, "play(%d, %d)", from, to); AudioCD.play(1, 1, from, to - from + 1); _cdPlaying = true; @@ -226,7 +226,7 @@ void CDROM::stopPlaying(void) { } void CDROM::stop(void) { - debugC(1, DEBUG_MUSIC, "stop()"); + debugC(1, kDebugMusic, "stop()"); AudioCD.stop(); _cdPlaying = false; diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp index da61f7b187..f696bf6b62 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]; - debugC(7, DEBUG_FILEIO, "seek: %d, %d", _vm->_global->_chunkOffset[file * MAX_SLOT_COUNT + slot], _vm->_global->_chunkPos[file * MAX_SLOT_COUNT + slot]); + debugC(7, kDebugFileIO, "seek: %d, %d", _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(); - debugC(7, DEBUG_FILEIO, "DataChunks: %d [for %s]", _vm->_global->_numDataChunks[file], path); + debugC(7, kDebugFileIO, "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++) - debugC(7, DEBUG_FILEIO, "%d: %s %d", i, dataDesc[i].chunkName, dataDesc[i].size); + debugC(7, kDebugFileIO, "%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 09c922f921..5424a931b4 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -184,15 +184,15 @@ char *Game::loadExtData(int16 itemId, int16 *pResWidth, int16 *pResHeight, uint3 if (pResWidth != 0) { *pResWidth = item->width & 0x7fff; *pResHeight = item->height; - debugC(7, DEBUG_FILEIO, "loadExtData(%d, %d, %d)", itemId, *pResWidth, *pResHeight); + debugC(7, kDebugFileIO, "loadExtData(%d, %d, %d)", itemId, *pResWidth, *pResHeight); } - debugC(7, DEBUG_FILEIO, "loadExtData(%d, 0, 0)", itemId); + debugC(7, kDebugFileIO, "loadExtData(%d, 0, 0)", itemId); if (item->height == 0) size += (item->width & 0x7fff) << 16; - debugC(7, DEBUG_FILEIO, "size: %d off: %d", size, offset); + debugC(7, kDebugFileIO, "size: %d off: %d", size, offset); if (offset >= 0) { handle = _extHandle; } else { @@ -205,7 +205,7 @@ char *Game::loadExtData(int16 itemId, int16 *pResWidth, int16 *pResHeight, uint3 handle = commonHandle; } - debugC(7, DEBUG_FILEIO, "off: %d size: %d", offset, tableSize); + debugC(7, kDebugFileIO, "off: %d size: %d", offset, tableSize); _vm->_dataio->seekData(handle, offset + tableSize, SEEK_SET); realSize = size; // CHECKME: is the below correct? diff --git a/engines/gob/game_v1.cpp b/engines/gob/game_v1.cpp index b539a63fd2..051baec1b7 100644 --- a/engines/gob/game_v1.cpp +++ b/engines/gob/game_v1.cpp @@ -126,8 +126,8 @@ void Game_v1::playTot(int16 skipPlay) { _curExtFile[strlen(_curExtFile) - 4] = 0; strcat(_curExtFile, ".ext"); - debugC(4, DEBUG_FILEIO, "IMA: %s", _curImaFile); - debugC(4, DEBUG_FILEIO, "EXT: %s", _curExtFile); + debugC(4, kDebugFileIO, "IMA: %s", _curImaFile); + debugC(4, kDebugFileIO, "EXT: %s", _curExtFile); filePtr = (char *)_totFileData + 0x30; @@ -265,11 +265,11 @@ int16 Game_v1::addNewCollision(int16 id, int16 left, int16 top, int16 right, int int16 i; Collision *ptr; - 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); + debugC(5, kDebugCollisions, "addNewCollision"); + debugC(5, kDebugCollisions, "id = %x", id); + debugC(5, kDebugCollisions, "left = %d, top = %d, right = %d, bottom = %d", left, top, right, bottom); + debugC(5, kDebugCollisions, "flags = %x, key = %x", flags, key); + debugC(5, kDebugCollisions, "funcEnter = %d, funcLeave = %d", funcEnter, funcLeave); for (i = 0; i < 250; i++) { if (_collisionAreas[i].left != -1) @@ -296,7 +296,7 @@ void Game_v1::pushCollisions(char all) { Collision *destPtr; int16 size; - debugC(1, DEBUG_COLLISIONS, "pushCollisions"); + debugC(1, kDebugCollisions, "pushCollisions"); for (size = 0, srcPtr = _collisionAreas; srcPtr->left != -1; srcPtr++) { if (all || (srcPtr->id & 0x8000)) @@ -321,7 +321,7 @@ void Game_v1::popCollisions(void) { Collision *destPtr; Collision *srcPtr; - debugC(1, DEBUG_COLLISIONS, "popCollision"); + debugC(1, kDebugCollisions, "popCollision"); _collStackSize--; for (destPtr = _collisionAreas; destPtr->left != -1; destPtr++); @@ -715,7 +715,7 @@ void Game_v1::collisionsBlock(void) { } cmd &= 0x7f; - debugC(1, DEBUG_COLLISIONS, "collisionsBlock(%d)", cmd); + debugC(1, kDebugCollisions, "collisionsBlock(%d)", cmd); switch (cmd) { case 3: diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index 30166269a5..13672b473e 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -133,8 +133,8 @@ void Game_v2::playTot(int16 skipPlay) { _curExtFile[strlen(_curExtFile) - 4] = 0; strcat(_curExtFile, ".ext"); - debugC(4, DEBUG_FILEIO, "IMA: %s", _curImaFile); - debugC(4, DEBUG_FILEIO, "EXT: %s", _curExtFile); + debugC(4, kDebugFileIO, "IMA: %s", _curImaFile); + debugC(4, kDebugFileIO, "EXT: %s", _curExtFile); filePtr = (char *)_totFileData + 0x30; @@ -185,7 +185,7 @@ void Game_v2::playTot(int16 skipPlay) { // in playTot and evaluated later, right before using it. In the // Gobliins 2 demo, there is a dummy tot that loads another tot, overwriting // the dummy pointer with the real one. - debugC(1, DEBUG_FILEIO, + debugC(1, kDebugFileIO, "Attempted to load invalid resource table (size = %d, totSize = %d)", resSize, totSize); delete _totResourceTable; @@ -312,11 +312,11 @@ int16 Game_v2::addNewCollision(int16 id, int16 left, int16 top, int16 right, int int16 i; Collision *ptr; - 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); + debugC(5, kDebugCollisions, "addNewCollision"); + debugC(5, kDebugCollisions, "id = %x", id); + debugC(5, kDebugCollisions, "left = %d, top = %d, right = %d, bottom = %d", left, top, right, bottom); + debugC(5, kDebugCollisions, "flags = %x, key = %x", flags, key); + debugC(5, kDebugCollisions, "funcEnter = %d, funcLeave = %d", funcEnter, funcLeave); for (i = 0; i < 150; i++) { if ((_collisionAreas[i].left != -1) && (_collisionAreas[i].id != id)) @@ -345,7 +345,7 @@ void Game_v2::pushCollisions(char all) { Collision *destPtr; int16 size; - debugC(1, DEBUG_COLLISIONS, "pushCollisions"); + debugC(1, kDebugCollisions, "pushCollisions"); for (size = 0, srcPtr = _collisionAreas; srcPtr->left != -1; srcPtr++) if (all || (((uint16) srcPtr->id) >= 20)) size++; @@ -383,7 +383,7 @@ void Game_v2::popCollisions(void) { Collision *destPtr; Collision *srcPtr; - debugC(1, DEBUG_COLLISIONS, "popCollision"); + debugC(1, kDebugCollisions, "popCollision"); _collStackSize--; @@ -818,7 +818,7 @@ void Game_v2::collisionsBlock(void) { } cmd &= 0x7f; - debugC(1, DEBUG_COLLISIONS, "collisionsBlock(%d)", cmd); + debugC(1, kDebugCollisions, "collisionsBlock(%d)", cmd); switch (cmd) { case 0: diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 5da3c1a143..dc6cd2cfef 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -192,15 +192,15 @@ GobEngine::GobEngine(OSystem * syst, uint32 features, Common::Language lang, memset(_saveIndex, 0, 600); memset(_saveIndexSizes, 0, 600); - 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, "Parser", "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"); + Common::addSpecialDebugLevel(kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level"); + Common::addSpecialDebugLevel(kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level"); + Common::addSpecialDebugLevel(kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level"); + Common::addSpecialDebugLevel(kDebugMusic, "Music", "CD and adlib music debug level"); + Common::addSpecialDebugLevel(kDebugParser, "Parser", "Parser debug level"); + Common::addSpecialDebugLevel(kDebugGameFlow, "Gameflow", "Gameflow debug level"); + Common::addSpecialDebugLevel(kDebugFileIO, "FileIO", "File Input/Output debug level"); + Common::addSpecialDebugLevel(kDebugGraphics, "Graphics", "Graphics debug level"); + Common::addSpecialDebugLevel(kDebugCollisions, "Collisions", "Collisions debug level"); } GobEngine::~GobEngine() { @@ -276,7 +276,7 @@ int32 GobEngine::getSaveSize(enum SaveFiles sFile) { delete in; break; } - debugC(1, DEBUG_FILEIO, "Requested save games size: %d", size); + debugC(1, kDebugFileIO, "Requested save games size: %d", size); return size; } #endif // GOB_ORIGSAVES @@ -286,7 +286,7 @@ int32 GobEngine::getSaveSize(enum SaveFiles sFile) { delete in; } - debugC(1, DEBUG_FILEIO, "Requested size of file \"%s\": %d", _saveFiles[(int) sFile], size); + debugC(1, kDebugFileIO, "Requested size of file \"%s\": %d", _saveFiles[(int) sFile], size); return size; } @@ -406,7 +406,7 @@ void GobEngine::saveGameData(enum SaveFiles sFile, int16 dataVar, int32 size, in if (out->ioFailed()) warning("Can't write file \"%s\"", sName); else { - debugC(1, DEBUG_FILEIO, "Saved file \"%s\" (%d, %d bytes at %d)", + debugC(1, kDebugFileIO, "Saved file \"%s\" (%d, %d bytes at %d)", sName, dataVar, size, offset); WRITE_VAR(1, 0); } @@ -440,7 +440,7 @@ bool GobEngine::saveGame(int saveSlot, int16 dataVar, int32 size, int32 offset) warning("Can't save to slot %d", saveSlot); return false; } - debugC(1, DEBUG_FILEIO, "Saved to slot %d", saveSlot); + debugC(1, kDebugFileIO, "Saved to slot %d", saveSlot); delete out; return true; } else { @@ -551,7 +551,7 @@ void GobEngine::loadGameData(enum SaveFiles sFile, int16 dataVar, int32 size, in return; } - debugC(1, DEBUG_FILEIO, "Loading file \"%s\" (%d, %d bytes at %d)", + debugC(1, kDebugFileIO, "Loading file \"%s\" (%d, %d bytes at %d)", sName, dataVar, size, offset); sSize = getSaveSize(*in); @@ -624,7 +624,7 @@ bool GobEngine::loadGame(int saveSlot, int16 dataVar, int32 size, int32 offset) in->seek(80); readDataEndian(*in, varBuf, sizeBuf, size); delete in; - debugC(1, DEBUG_FILEIO, "Loading from slot %d", saveSlot); + debugC(1, kDebugFileIO, "Loading from slot %d", saveSlot); return true; } else { warning("Invalid loading procedure"); diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 2f65eb7e19..7291853bd4 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -96,15 +96,15 @@ enum { }; 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 + kDebugFuncOp = 1 << 0, + kDebugDrawOp = 1 << 1, + kDebugGobOp = 1 << 2, + kDebugMusic = 1 << 3, // CD and adlib music + kDebugParser = 1 << 4, + kDebugGameFlow = 1 << 5, + kDebugFileIO = 1 << 6, + kDebugGraphics = 1 << 7, + kDebugCollisions = 1 << 8 }; enum SaveFiles { diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp index 24842b6541..7ed4f0b8d4 100644 --- a/engines/gob/goblin.cpp +++ b/engines/gob/goblin.cpp @@ -650,7 +650,7 @@ void Goblin::switchGoblin(int16 index) { int16 next; int16 tmp; - debugC(4, DEBUG_GAMEFLOW, "switchGoblin"); + debugC(4, kDebugGameFlow, "switchGoblin"); if (VAR(59) != 0) return; diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 7fa7ef8738..0be5e54f52 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1578,9 +1578,9 @@ void Inter_v1::o1_initMult(void) { _vm->_anim->_areaLeft + _vm->_anim->_areaWidth - 1, _vm->_anim->_areaTop + _vm->_anim->_areaHeight - 1, 0, 0, 0); - debugC(4, DEBUG_GRAPHICS, "o1_initMult: x = %d, y = %d, w = %d, h = %d", + debugC(4, kDebugGraphics, "o1_initMult: x = %d, y = %d, w = %d, h = %d", _vm->_anim->_areaLeft, _vm->_anim->_areaTop, _vm->_anim->_areaWidth, _vm->_anim->_areaHeight); - debugC(4, DEBUG_GRAPHICS, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); + debugC(4, kDebugGraphics, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); } void Inter_v1::o1_multFreeMult(void) { @@ -1687,7 +1687,7 @@ void Inter_v1::o1_freeFontToSprite(void) { } void Inter_v1::executeDrawOpcode(byte i) { - debugC(1, DEBUG_DRAWOP, "opcodeDraw %d [0x%x] (%s)", i, i, getOpcodeDrawDesc(i)); + debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%x] (%s)", i, i, getOpcodeDrawDesc(i)); OpcodeDrawProcV1 op = _opcodesDrawV1[i].proc; @@ -1698,7 +1698,7 @@ void Inter_v1::executeDrawOpcode(byte i) { } bool Inter_v1::executeFuncOpcode(byte i, byte j, char &cmdCount, int16 &counter, int16 &retFlag) { - debugC(1, DEBUG_FUNCOP, "opcodeFunc %d.%d [0x%x.0x%x] (%s)", i, j, i, j, getOpcodeFuncDesc(i, j)); + debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%x.0x%x] (%s)", i, j, i, j, getOpcodeFuncDesc(i, j)); if ((i > 4) || (j > 15)) { warning("unimplemented opcodeFunc: %d.%d", i, j); @@ -1715,7 +1715,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) { - debugC(1, DEBUG_GOBOP, "opcodeGoblin %d [0x%x] (%s)", i, i, getOpcodeGoblinDesc(i)); + debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%x] (%s)", i, i, getOpcodeGoblinDesc(i)); OpcodeGoblinProcV1 op = NULL; @@ -1759,12 +1759,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); - debugC(5, DEBUG_GAMEFLOW, "tot = \"%s\", offset = %d", _vm->_game->_curTotFile, offset); + debugC(5, kDebugGameFlow, "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, _vm->_startTot)) { - debugC(2, DEBUG_GAMEFLOW, "Skipping copy protection screen"); + debugC(2, kDebugGameFlow, "Skipping copy protection screen"); _vm->_global->_inter_execPtr += 2; return false; } @@ -1772,7 +1772,7 @@ bool Inter_v1::o1_callSub(char &cmdCount, int16 &counter, int16 &retFlag) { if (!_vm->_copyProtection && (_vm->_features & GF_GOB2) && (offset == 1746) && !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot0)) { warning("=> Skipping copy protection screen"); - debugC(2, DEBUG_GAMEFLOW, "Skipping copy protection screen"); + debugC(2, kDebugGameFlow, "Skipping copy protection screen"); _vm->_global->_inter_execPtr += 2; return false; } @@ -1824,7 +1824,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; - debugC(5, DEBUG_GAMEFLOW, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, kDebugGameFlow, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); cmd = (byte)(*_vm->_global->_inter_execPtr) >> 4; _vm->_global->_inter_execPtr++; if (cmd != 12) @@ -1834,7 +1834,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; - debugC(5, DEBUG_GAMEFLOW, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, kDebugGameFlow, "cmd = %d", (int16)*_vm->_global->_inter_execPtr); cmd = (byte)(*_vm->_global->_inter_execPtr) >> 4; _vm->_global->_inter_execPtr++; if (cmd != 12) @@ -2778,7 +2778,7 @@ void Inter_v1::loadMult(void) { int16 i; char *lmultData; - debugC(4, DEBUG_GAMEFLOW, "Inter_v1::loadMult(): Loading..."); + debugC(4, kDebugGameFlow, "Inter_v1::loadMult(): Loading..."); evalExpr(&objIndex); evalExpr(&val); diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 7fce867982..3da95c0bcd 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -647,7 +647,7 @@ void Inter_v2::setupOpcodes(void) { } void Inter_v2::executeDrawOpcode(byte i) { - debugC(1, DEBUG_DRAWOP, "opcodeDraw %d [0x%x] (%s)", i, i, getOpcodeDrawDesc(i)); + debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%x] (%s)", i, i, getOpcodeDrawDesc(i)); OpcodeDrawProcV2 op = _opcodesDrawV2[i].proc; @@ -658,7 +658,7 @@ void Inter_v2::executeDrawOpcode(byte i) { } bool Inter_v2::executeFuncOpcode(byte i, byte j, char &cmdCount, int16 &counter, int16 &retFlag) { - debugC(1, DEBUG_FUNCOP, "opcodeFunc %d.%d [0x%x.0x%x] (%s)", i, j, i, j, getOpcodeFuncDesc(i, j)); + debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%x.0x%x] (%s)", i, j, i, j, getOpcodeFuncDesc(i, j)); if ((i > 4) || (j > 15)) { warning("unimplemented opcodeFunc: %d.%d", i, j); @@ -676,7 +676,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) { - debugC(1, DEBUG_GOBOP, "opcodeGoblin %d [0x%x] (%s)", i, i, getOpcodeGoblinDesc(i)); + debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%x] (%s)", i, i, getOpcodeGoblinDesc(i)); OpcodeGoblinProcV2 op = NULL; @@ -1270,7 +1270,7 @@ void Inter_v2::loadMult(void) { Mult::Mult_Object *obj; Mult::Mult_AnimData *objAnim; - debugC(4, DEBUG_GAMEFLOW, "Inter_v2::loadMult(): Loading..."); + debugC(4, kDebugGameFlow, "Inter_v2::loadMult(): Loading..."); objIndex = _vm->_parse->parseValExpr(); val = _vm->_parse->parseValExpr(); @@ -2101,9 +2101,9 @@ void Inter_v2::o2_initMult(void) { _vm->_draw->_destSpriteY = 0; _vm->_draw->spriteOperation(0); - debugC(4, DEBUG_GRAPHICS, "o2_initMult: x = %d, y = %d, w = %d, h = %d", + debugC(4, kDebugGraphics, "o2_initMult: x = %d, y = %d, w = %d, h = %d", _vm->_anim->_areaLeft, _vm->_anim->_areaTop, _vm->_anim->_areaWidth, _vm->_anim->_areaHeight); - debugC(4, DEBUG_GRAPHICS, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); + debugC(4, kDebugGraphics, " _vm->_mult->_objCount = %d, animation data size = %d", _vm->_mult->_objCount, _vm->_global->_inter_animDataSize); } void Inter_v2::o2_getObjAnimSize(void) { diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 2aae610932..c582957e12 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -105,7 +105,7 @@ void Mult_v2::loadMult(int16 resId) { hbstaticCount = (staticCount & 0x80) != 0; staticCount &= 0x7F; - debugC(7, DEBUG_GRAPHICS, "statics: %u, anims: %u, hb: %u", staticCount, animCount, hbstaticCount); + debugC(7, kDebugGraphics, "statics: %u, anims: %u, hb: %u", staticCount, animCount, hbstaticCount); for (i = 0; i < staticCount; i++, data.seek(14, SEEK_CUR)) { _multData2->staticIndices[i] = _vm->_scenery->loadStatic(1); @@ -278,7 +278,7 @@ void Mult_v2::setMultData(uint16 multindex) { if (multindex > 7) error("Multindex out of range"); - debugC(4, DEBUG_GAMEFLOW, "Switching to mult %d", multindex); + debugC(4, kDebugGameFlow, "Switching to mult %d", multindex); _multData2 = _multDatas[multindex]; _frameStart = _multData2->frameStart; // Temporarily to sync _frameStart and _multData2->frameStart } @@ -297,7 +297,7 @@ void Mult_v2::multSub(uint16 multindex) { if (multindex > 7) error("Multindex out of range"); - debugC(4, DEBUG_GAMEFLOW, "Sub mult %d", multindex); + debugC(4, kDebugGameFlow, "Sub mult %d", multindex); _multData2 = _multDatas[multindex]; _frameStart = _multData2->frameStart; // Temporarily to sync _frameStart and _multData2->frameStart diff --git a/engines/gob/music.cpp b/engines/gob/music.cpp index 0bbe71c39c..9bf6c658a9 100644 --- a/engines/gob/music.cpp +++ b/engines/gob/music.cpp @@ -162,7 +162,7 @@ void Music::premixerCall(int16 *buf, uint len) { } void Music::writeOPL(byte reg, byte val) { - debugC(6, DEBUG_MUSIC, "writeOPL(%02X, %02X)", reg, val); + debugC(6, kDebugMusic, "writeOPL(%02X, %02X)", reg, val); OPLWriteReg(_opl, reg, val); } @@ -443,7 +443,7 @@ void Music::playBgMusic(void) { void Music::playTrack(const char *trackname) { if (_playing) return; - debugC(1, DEBUG_MUSIC, "Music::playTrack(%s)", trackname); + debugC(1, kDebugMusic, "Music::playTrack(%s)", trackname); unloadMusic(); loadMusic(_trackFiles[_vm->_util->getRandom(ARRAYSIZE(_trackFiles))]); startPlay(); diff --git a/engines/gob/parse_v1.cpp b/engines/gob/parse_v1.cpp index 8d4b192b8e..379f4601eb 100644 --- a/engines/gob/parse_v1.cpp +++ b/engines/gob/parse_v1.cpp @@ -45,17 +45,17 @@ int16 Parse_v1::parseVarIndex() { int16 val; operation = *_vm->_global->_inter_execPtr++; - debugC(5, DEBUG_PARSER, "var parse = %d", operation); + debugC(5, kDebugParser, "var parse = %d", operation); switch (operation) { case 23: case 25: temp = _vm->_inter->load16() * 4; - debugC(5, DEBUG_PARSER, "oper = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, kDebugParser, "oper = %d", (int16)*_vm->_global->_inter_execPtr); if (operation == 25 && *_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; val = parseValExpr(12); temp += val; - debugC(5, DEBUG_PARSER, "parse subscript = %d", val); + debugC(5, kDebugParser, "parse subscript = %d", val); } return temp; @@ -301,7 +301,7 @@ int16 Parse_v1::parseValExpr(unsigned stopToken) { if (operation != 10) { if (operation != stopToken) { - debugC(5, DEBUG_PARSER, "stoptoken error: %d != %d", operation, stopToken); + debugC(5, kDebugParser, "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 23cd980691..bb3b6802af 100644 --- a/engines/gob/parse_v2.cpp +++ b/engines/gob/parse_v2.cpp @@ -45,7 +45,7 @@ int16 Parse_v2::parseVarIndex() { int16 val; operation = *_vm->_global->_inter_execPtr++; - debugC(5, DEBUG_PARSER, "var parse = %d", operation); + debugC(5, kDebugParser, "var parse = %d", operation); switch (operation) { case 16: case 26: @@ -84,12 +84,12 @@ int16 Parse_v2::parseVarIndex() { case 24: case 25: temp = _vm->_inter->load16() * 4; - debugC(5, DEBUG_PARSER, "oper = %d", (int16)*_vm->_global->_inter_execPtr); + debugC(5, kDebugParser, "oper = %d", (int16)*_vm->_global->_inter_execPtr); if (operation == 25 && *_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; val = parseValExpr(12); temp += val; - debugC(5, DEBUG_PARSER, "parse subscript = %d", val); + debugC(5, kDebugParser, "parse subscript = %d", val); } return temp; @@ -339,7 +339,7 @@ int16 Parse_v2::parseValExpr(unsigned stopToken) { if (operation != 10) { if (operation != stopToken) { - debugC(5, DEBUG_PARSER, "stoptoken error: %d != %d", operation, stopToken); + debugC(5, kDebugParser, "stoptoken error: %d != %d", operation, stopToken); } flag = oldflag; return values[0]; diff --git a/engines/gob/timer.cpp b/engines/gob/timer.cpp index 813a66e873..19de498992 100644 --- a/engines/gob/timer.cpp +++ b/engines/gob/timer.cpp @@ -28,10 +28,10 @@ namespace Gob { void GTimer::enableTimer() { - debugC(4, DEBUG_GAMEFLOW, "STUB: GTimer::enableTimer()"); + debugC(4, kDebugGameFlow, "STUB: GTimer::enableTimer()"); } void GTimer::disableTimer() { - debugC(4, DEBUG_GAMEFLOW, "STUB: GTimer::disableTimer()"); + debugC(4, kDebugGameFlow, "STUB: GTimer::disableTimer()"); } } -- cgit v1.2.3