aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-12-23 18:37:56 +0000
committerMax Horn2002-12-23 18:37:56 +0000
commit6d0fd3989ce1636e960b72d104bad4c1e665478a (patch)
tree785c9aa1132751bc2ab00b2429b0f28dcc488b67
parent654ed3ff6cca3d40705110acc2f5ef1c5e4695c7 (diff)
downloadscummvm-rg350-6d0fd3989ce1636e960b72d104bad4c1e665478a.tar.gz
scummvm-rg350-6d0fd3989ce1636e960b72d104bad4c1e665478a.tar.bz2
scummvm-rg350-6d0fd3989ce1636e960b72d104bad4c1e665478a.zip
fix jumpTrue/jumpFalse opcodes; slightly better debug output
svn-id: r6075
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script.cpp6
-rw-r--r--scumm/script_v8.cpp161
3 files changed, 83 insertions, 85 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 8340c6b98d..f5b914b86e 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -408,7 +408,6 @@ protected:
/* Version 8 script opcodes */
void o8_unknown();
- void o8_invalid();
void o8_mod();
void o8_wait();
diff --git a/scumm/script.cpp b/scumm/script.cpp
index 1da366d007..a70a5b81c7 100644
--- a/scumm/script.cpp
+++ b/scumm/script.cpp
@@ -281,7 +281,11 @@ void Scumm::executeScript()
_opcode = fetchScriptByte();
_scriptPointerStart = _scriptPointer;
vm.slot[_currentScript].didexec = 1;
- debug(8, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, getOpcodeDesc(_opcode));
+ debug(0, "Script %d, offset 0x%x: [%X] %s()",
+ vm.slot[_currentScript].number,
+ _scriptPointer - _scriptOrgPointer,
+ _opcode,
+ getOpcodeDesc(_opcode));
executeOpcode(_opcode);
}
CHECK_HEAP;
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index d6ce37ea23..36b28a6cac 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -65,105 +65,105 @@ void Scumm_v8::setupOpcodes()
OPCODE(o6_band),
OPCODE(o6_bor),
OPCODE(o8_mod),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
/* 18 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 1C */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 20 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 24 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 28 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 2C */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 30 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 34 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 38 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 3C */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 40 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 44 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 48 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 4C */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 50 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 54 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 58 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 5C */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 60 */
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
- OPCODE(o8_unknown),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
+ OPCODE(o6_invalid),
/* 64 */
- OPCODE(o6_jumpFalse),
OPCODE(o6_jumpTrue),
+ OPCODE(o6_jumpFalse),
OPCODE(o6_jump),
OPCODE(o6_breakHere),
/* 68 */
@@ -525,11 +525,6 @@ void Scumm_v8::o8_unknown()
warning("Unknown opcode '%x' at %x", _opcode, _scriptPointer - _scriptOrgPointer);
}
-void Scumm_v8::o8_invalid()
-{
- error("Invalid opcode '%x' at %x", _opcode, _scriptPointer - _scriptOrgPointer);
-}
-
void Scumm_v8::o8_mod()
{
int a = pop();