aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2005-09-05 14:44:43 +0000
committerEugene Sandulenko2005-09-05 14:44:43 +0000
commit4589b5d3bbe23b3b2778d7e85d161ce2b83b04f5 (patch)
treee5edcaa5b24091ef2587f02793d6a0e7ed923721 /scumm
parentb8f4f4d4f2b24b0776d37a3ceb322aaec5d8e5ff (diff)
downloadscummvm-rg350-4589b5d3bbe23b3b2778d7e85d161ce2b83b04f5.tar.gz
scummvm-rg350-4589b5d3bbe23b3b2778d7e85d161ce2b83b04f5.tar.bz2
scummvm-rg350-4589b5d3bbe23b3b2778d7e85d161ce2b83b04f5.zip
Partially fixed utter mess with C64 opcodes.
svn-id: r18777
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script_c64.cpp38
2 files changed, 22 insertions, 17 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index c2e2e99add..a846637d6c 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -441,6 +441,7 @@ protected:
void o_setState08();
void o_unfreezeScript();
void o_decrement();
+ void o_badOpcode();
};
class ScummEngine_v6 : public ScummEngine {
diff --git a/scumm/script_c64.cpp b/scumm/script_c64.cpp
index 29e2be64cc..e6e7952455 100644
--- a/scumm/script_c64.cpp
+++ b/scumm/script_c64.cpp
@@ -54,7 +54,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_loadSound),
OPCODE(o5_walkActorToActor),
OPCODE(o_putActorAtObject),
- OPCODE(o2_ifNotState08),
+ OPCODE(o2_clearState02),
/* 10 */
OPCODE(o5_breakHere),
OPCODE(o_animateActor),
@@ -74,7 +74,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o5_startSound),
OPCODE(o2_ifClassOfIs),
OPCODE(o2_walkActorTo),
- OPCODE(o2_ifState02),
+ OPCODE(o2_ifState04),
/* 20 */
OPCODE(o5_stopMusic),
OPCODE(o2_putActor),
@@ -94,7 +94,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o2_assignVarByte),
OPCODE(o5_putActorInRoom),
OPCODE(o2_delay),
- OPCODE(o2_ifNotState04),
+ OPCODE(o2_ifState08),
/* 30 */
OPCODE(o_loadActor),
OPCODE(o2_getBitVar),
@@ -104,7 +104,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_getDist),
OPCODE(o2_findObject),
OPCODE(o_walkActorToObject),
- OPCODE(o2_setState01),
+ OPCODE(o2_clearState04),
/* 38 */
OPCODE(o_isLessEqual),
OPCODE(o2_doSentence),
@@ -134,7 +134,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_loadScript),
OPCODE(o_unknown4D),
OPCODE(o_putActorAtObject),
- OPCODE(o2_ifState08),
+ OPCODE(o2_clearState02),
/* 50 */
OPCODE(o2_pickupObject),
OPCODE(o_animateActor),
@@ -154,17 +154,17 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o5_startSound),
OPCODE(o2_ifClassOfIs),
OPCODE(o2_walkActorTo),
- OPCODE(o2_ifNotState02),
+ OPCODE(o2_ifState04),
/* 60 */
OPCODE(o_cursorCommand),
OPCODE(o2_putActor),
OPCODE(o_stopScript),
- OPCODE(o5_getActorFacing),
+ OPCODE(o_stopScript),
/* 64 */
OPCODE(o2_loadRoomWithEgo),
OPCODE(o2_drawObject),
OPCODE(o5_getClosestObjActor),
- OPCODE(o2_clearState04),
+ OPCODE(o5_getActorFacing),
/* 68 */
OPCODE(o5_isScriptRunning),
OPCODE(o2_setOwnerOf),
@@ -184,7 +184,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_getDist),
OPCODE(o5_printEgo),
OPCODE(o_walkActorToObject),
- OPCODE(o2_clearState01),
+ OPCODE(o2_clearState04),
/* 78 */
OPCODE(o_isGreater),
OPCODE(o2_doSentence),
@@ -194,7 +194,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o5_isSoundRunning),
OPCODE(o2_setActorElevation),
OPCODE(o2_walkActorTo),
- OPCODE(o2_ifState01),
+ OPCODE(o2_ifNotState02),
/* 80 */
OPCODE(o5_breakHere),
OPCODE(o2_putActor),
@@ -203,7 +203,7 @@ void ScummEngine_c64::setupOpcodes() {
/* 84 */
OPCODE(o_isGreaterEqual),
OPCODE(o2_drawObject),
- OPCODE(o2_getActorElevation),
+ OPCODE(o_badOpcode),
OPCODE(o5_getActorRoom),
/* 88 */
OPCODE(o_isNotEqual),
@@ -214,7 +214,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o2_resourceRoutines),
OPCODE(o5_walkActorToActor),
OPCODE(o_putActorAtObject),
- OPCODE(o2_ifNotState08),
+ OPCODE(o2_setState02),
/* 90 */
OPCODE(o_pickupObject),
OPCODE(o_animateActor),
@@ -274,7 +274,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o5_stopSound),
OPCODE(o2_setActorElevation),
OPCODE(o2_walkActorTo),
- OPCODE(o2_ifNotState01),
+ OPCODE(o2_ifNotState02),
/* C0 */
OPCODE(o2_endCutscene),
OPCODE(o2_putActor),
@@ -294,7 +294,7 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o_loadScript),
OPCODE(o5_walkActorToActor),
OPCODE(o_putActorAtObject),
- OPCODE(o2_ifState08),
+ OPCODE(o2_setState02),
/* D0 */
OPCODE(o2_pickupObject),
OPCODE(o_animateActor),
@@ -319,12 +319,12 @@ void ScummEngine_c64::setupOpcodes() {
OPCODE(o2_cursorCommand),
OPCODE(o2_putActor),
OPCODE(o_stopScript),
- OPCODE(o5_getActorFacing),
+ OPCODE(o_stopScript),
/* E4 */
OPCODE(o2_loadRoomWithEgo),
OPCODE(o2_drawObject),
OPCODE(o5_getClosestObjActor),
- OPCODE(o2_clearState04),
+ OPCODE(o5_getActorFacing),
/* E8 */
OPCODE(o5_isScriptRunning),
OPCODE(o2_setOwnerOf),
@@ -420,7 +420,7 @@ void ScummEngine_c64::o_clearState08() {
void ScummEngine_c64::o_stopScript() {
int script;
- if (_opcode == 0x05) {
+ if (_opcode == 0x05 || _opcode == 0x63 || _opcode == 0xe3) {
script = 0;
} else {
script = getVarOrDirectByte(PARAM_1);
@@ -681,6 +681,10 @@ void ScummEngine_c64::o_walkActorToObject() {
}
}
+void ScummEngine_c64::o_badOpcode() {
+ warning("Bad opcode 0x86 encountered");
+}
+
#undef PARAM_1
#undef PARAM_2
#undef PARAM_3