From ba275dfd58a13a86d2ba9b9583ebe6c96199d29a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 19 Jul 2005 09:10:05 +0000 Subject: Some stubs for gob2. Improved debug output. svn-id: r18556 --- gob/game.cpp | 2 + gob/inter.cpp | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- gob/parse.cpp | 6 +-- 3 files changed, 144 insertions(+), 15 deletions(-) (limited to 'gob') diff --git a/gob/game.cpp b/gob/game.cpp index 38272a9aea..b05986890a 100644 --- a/gob/game.cpp +++ b/gob/game.cpp @@ -1176,6 +1176,8 @@ void game_collisionsBlock(void) { } cmd &= 0x7f; + debug(4, "game_collisionsBlock(%d)", cmd); + switch (cmd) { case 3: case 4: diff --git a/gob/inter.cpp b/gob/inter.cpp index 28a10d1064..437bdad056 100644 --- a/gob/inter.cpp +++ b/gob/inter.cpp @@ -318,11 +318,13 @@ void inter_clearCursorAnim(void) { } void inter_drawOperations(void) { - char cmd; + byte cmd; int16 i; cmd = *inter_execPtr++; + debug(4, "inter_drawOperations(%d)", cmd); + switch (cmd) { case 0: inter_loadMult(); @@ -413,24 +415,46 @@ void inter_drawOperations(void) { break; case 32: - // Used in gob1 CD - inter_evalExpr(0); - cd_startTrack(inter_resStr); + if (_vm->_features & GF_GOB1) { + // Used in gob1 CD + inter_evalExpr(0); + cd_startTrack(inter_resStr); + } else { + } break; case 33: - // Used in gob1 CD - { - int pos = cd_getTrackPos(); - if (pos == -1) - pos = 32767; - WRITE_VAR(5, pos); + if (_vm->_features & GF_GOB1) { + // Used in gob1 CD + int pos = cd_getTrackPos(); + if (pos == -1) + pos = 32767; + WRITE_VAR(5, pos); + } else { } break; case 34: - // Used in gob1 CD - cd_stopPlaying(); + if (_vm->_features & GF_GOB1) { + // Used in gob1 CD + cd_stopPlaying(); + } else { + } + break; + + case 35: + if (_vm->_features & GF_GOB2) { + } + break; + + case 36: + if (_vm->_features & GF_GOB2) { + } + break; + + case 37: + if (_vm->_features & GF_GOB2) { + } break; case 48: @@ -449,6 +473,106 @@ void inter_drawOperations(void) { draw_fontToSprite[i].height = -1; break; + case 64: + if (_vm->_features & GF_GOB2) { + } + break; + + case 65: + if (_vm->_features & GF_GOB2) { + } + break; + + case 66: + if (_vm->_features & GF_GOB2) { + } + break; + + case 67: + if (_vm->_features & GF_GOB2) { + } + break; + + case 80: + if (_vm->_features & GF_GOB2) { + } + break; + + case 81: + if (_vm->_features & GF_GOB2) { + } + break; + + case 82: + if (_vm->_features & GF_GOB2) { + } + break; + + case 83: + if (_vm->_features & GF_GOB2) { + } + break; + + case 84: + if (_vm->_features & GF_GOB2) { + } + break; + + case 85: + if (_vm->_features & GF_GOB2) { + } + break; + + case 86: + if (_vm->_features & GF_GOB2) { + } + break; + + case 128: + if (_vm->_features & GF_GOB2) { + } + break; + + case 129: + if (_vm->_features & GF_GOB2) { + } + break; + + case 130: + if (_vm->_features & GF_GOB2) { + } + break; + + case 131: + if (_vm->_features & GF_GOB2) { + } + break; + + case 132: + if (_vm->_features & GF_GOB2) { + } + break; + + case 133: + if (_vm->_features & GF_GOB2) { + } + break; + + case 134: + if (_vm->_features & GF_GOB2) { + } + break; + + case 135: + if (_vm->_features & GF_GOB2) { + } + break; + + case 136: + if (_vm->_features & GF_GOB2) { + } + break; + default: warning("unimplemented drawOperation: %d", cmd); } @@ -1166,6 +1290,9 @@ void inter_funcBlock(int16 retFlag) { inter_execPtr++; counter++; + + debug(4, "inter_funcBlock(%d, %d)", cmd2, cmd); + switch (cmd2) { case 0: switch (cmd >> 4) { diff --git a/gob/parse.cpp b/gob/parse.cpp index a5bffe402a..72f85633b3 100644 --- a/gob/parse.cpp +++ b/gob/parse.cpp @@ -958,17 +958,17 @@ int16 parse_parseVarIndex() { int16 val; operation = *inter_execPtr++; - debug(5, "var parse = %d\n", operation); + debug(5, "var parse = %d", operation); switch (operation) { case 23: case 25: temp = inter_load16() * 4; - debug(5, "oper = %d\n", (int16)*inter_execPtr); + debug(5, "oper = %d", (int16)*inter_execPtr); if (operation == 25 && *inter_execPtr == 13) { inter_execPtr++; val = parse_parseValExpr(); temp += val; - debug(5, "parse subscript = %d\n", val); + debug(5, "parse subscript = %d", val); } return temp; -- cgit v1.2.3