diff options
author | Jussi Pitkanen | 2011-06-17 18:14:42 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2011-08-13 23:27:20 +0100 |
commit | d2f9087f20864bc2268dc7795b2e4ff023cd7758 (patch) | |
tree | 52e57485c9c70274ffc7ab90c9f9d2f41bf4b0c4 /engines/agi | |
parent | e4a1193d22142be750e20ab0a32f03f8c11cf950 (diff) | |
download | scummvm-rg350-d2f9087f20864bc2268dc7795b2e4ff023cd7758.tar.gz scummvm-rg350-d2f9087f20864bc2268dc7795b2e4ff023cd7758.tar.bz2 scummvm-rg350-d2f9087f20864bc2268dc7795b2e4ff023cd7758.zip |
AGI: Fix warning messages about undefined opcodes
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/op_cmd.cpp | 7 | ||||
-rw-r--r-- | engines/agi/op_test.cpp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index 42c3e57a34..bd189eeac5 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -41,6 +41,7 @@ namespace Agi { #define p5 (p[5]) #define p6 (p[6]) +#define code state->_curLogic->data #define ip state->_curLogic->cIP #define vt state->viewTable[p0] #define vt_v state->viewTable[state->vars[p0]] @@ -1581,7 +1582,7 @@ void cmdSetSpeed(AgiGame *state, uint8 *p) { } void cmdUnknown(AgiGame *state, uint8 *p) { - warning("Skipping unknown opcode %2X", *(p - 1)); + warning("Skipping unknown opcode %2X", *(code + ip - 1)); } /** @@ -1589,12 +1590,11 @@ void cmdUnknown(AgiGame *state, uint8 *p) { * @param n Number of the logic resource to execute */ int AgiEngine::runLogic(int n) { + AgiGame *state = &_game; uint8 op = 0; uint8 p[CMD_BSIZE] = { 0 }; - uint8 *code = NULL; int num = 0; ScriptPos sp; - AgiGame *state = &_game; debugC(2, kDebugLevelScripts, "================="); debugC(2, kDebugLevelScripts, "runLogic(%d)", n); @@ -1612,7 +1612,6 @@ int AgiEngine::runLogic(int n) { _game.lognum = n; _game._curLogic = &_game.logics[_game.lognum]; - code = _game._curLogic->data; _game._curLogic->cIP = _game._curLogic->sIP; _timerHack = 0; diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp index a99a4eafc4..f8fd7674f1 100644 --- a/engines/agi/op_test.cpp +++ b/engines/agi/op_test.cpp @@ -189,7 +189,7 @@ void condUnknown13(AgiGame *state, uint8 *p) { } void condUnknown(AgiGame *state, uint8 *p) { - warning("Skipping unknown test command %2X", *(p - 1)); + warning("Skipping unknown test command %2X", *(code + ip - 1)); state->testResult = false; } |