Partially fixed utter mess with C64 opcodes.
svn-id: r18777
This commit is contained in:
parent
b8f4f4d4f2
commit
4589b5d3bb
2 changed files with 22 additions and 17 deletions
|
@ -441,6 +441,7 @@ protected:
|
||||||
void o_setState08();
|
void o_setState08();
|
||||||
void o_unfreezeScript();
|
void o_unfreezeScript();
|
||||||
void o_decrement();
|
void o_decrement();
|
||||||
|
void o_badOpcode();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScummEngine_v6 : public ScummEngine {
|
class ScummEngine_v6 : public ScummEngine {
|
||||||
|
|
|
@ -54,7 +54,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o_loadSound),
|
OPCODE(o_loadSound),
|
||||||
OPCODE(o5_walkActorToActor),
|
OPCODE(o5_walkActorToActor),
|
||||||
OPCODE(o_putActorAtObject),
|
OPCODE(o_putActorAtObject),
|
||||||
OPCODE(o2_ifNotState08),
|
OPCODE(o2_clearState02),
|
||||||
/* 10 */
|
/* 10 */
|
||||||
OPCODE(o5_breakHere),
|
OPCODE(o5_breakHere),
|
||||||
OPCODE(o_animateActor),
|
OPCODE(o_animateActor),
|
||||||
|
@ -74,7 +74,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o5_startSound),
|
OPCODE(o5_startSound),
|
||||||
OPCODE(o2_ifClassOfIs),
|
OPCODE(o2_ifClassOfIs),
|
||||||
OPCODE(o2_walkActorTo),
|
OPCODE(o2_walkActorTo),
|
||||||
OPCODE(o2_ifState02),
|
OPCODE(o2_ifState04),
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(o5_stopMusic),
|
OPCODE(o5_stopMusic),
|
||||||
OPCODE(o2_putActor),
|
OPCODE(o2_putActor),
|
||||||
|
@ -94,7 +94,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o2_assignVarByte),
|
OPCODE(o2_assignVarByte),
|
||||||
OPCODE(o5_putActorInRoom),
|
OPCODE(o5_putActorInRoom),
|
||||||
OPCODE(o2_delay),
|
OPCODE(o2_delay),
|
||||||
OPCODE(o2_ifNotState04),
|
OPCODE(o2_ifState08),
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(o_loadActor),
|
OPCODE(o_loadActor),
|
||||||
OPCODE(o2_getBitVar),
|
OPCODE(o2_getBitVar),
|
||||||
|
@ -104,7 +104,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o_getDist),
|
OPCODE(o_getDist),
|
||||||
OPCODE(o2_findObject),
|
OPCODE(o2_findObject),
|
||||||
OPCODE(o_walkActorToObject),
|
OPCODE(o_walkActorToObject),
|
||||||
OPCODE(o2_setState01),
|
OPCODE(o2_clearState04),
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(o_isLessEqual),
|
OPCODE(o_isLessEqual),
|
||||||
OPCODE(o2_doSentence),
|
OPCODE(o2_doSentence),
|
||||||
|
@ -134,7 +134,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o_loadScript),
|
OPCODE(o_loadScript),
|
||||||
OPCODE(o_unknown4D),
|
OPCODE(o_unknown4D),
|
||||||
OPCODE(o_putActorAtObject),
|
OPCODE(o_putActorAtObject),
|
||||||
OPCODE(o2_ifState08),
|
OPCODE(o2_clearState02),
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(o2_pickupObject),
|
OPCODE(o2_pickupObject),
|
||||||
OPCODE(o_animateActor),
|
OPCODE(o_animateActor),
|
||||||
|
@ -154,17 +154,17 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o5_startSound),
|
OPCODE(o5_startSound),
|
||||||
OPCODE(o2_ifClassOfIs),
|
OPCODE(o2_ifClassOfIs),
|
||||||
OPCODE(o2_walkActorTo),
|
OPCODE(o2_walkActorTo),
|
||||||
OPCODE(o2_ifNotState02),
|
OPCODE(o2_ifState04),
|
||||||
/* 60 */
|
/* 60 */
|
||||||
OPCODE(o_cursorCommand),
|
OPCODE(o_cursorCommand),
|
||||||
OPCODE(o2_putActor),
|
OPCODE(o2_putActor),
|
||||||
OPCODE(o_stopScript),
|
OPCODE(o_stopScript),
|
||||||
OPCODE(o5_getActorFacing),
|
OPCODE(o_stopScript),
|
||||||
/* 64 */
|
/* 64 */
|
||||||
OPCODE(o2_loadRoomWithEgo),
|
OPCODE(o2_loadRoomWithEgo),
|
||||||
OPCODE(o2_drawObject),
|
OPCODE(o2_drawObject),
|
||||||
OPCODE(o5_getClosestObjActor),
|
OPCODE(o5_getClosestObjActor),
|
||||||
OPCODE(o2_clearState04),
|
OPCODE(o5_getActorFacing),
|
||||||
/* 68 */
|
/* 68 */
|
||||||
OPCODE(o5_isScriptRunning),
|
OPCODE(o5_isScriptRunning),
|
||||||
OPCODE(o2_setOwnerOf),
|
OPCODE(o2_setOwnerOf),
|
||||||
|
@ -184,7 +184,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o_getDist),
|
OPCODE(o_getDist),
|
||||||
OPCODE(o5_printEgo),
|
OPCODE(o5_printEgo),
|
||||||
OPCODE(o_walkActorToObject),
|
OPCODE(o_walkActorToObject),
|
||||||
OPCODE(o2_clearState01),
|
OPCODE(o2_clearState04),
|
||||||
/* 78 */
|
/* 78 */
|
||||||
OPCODE(o_isGreater),
|
OPCODE(o_isGreater),
|
||||||
OPCODE(o2_doSentence),
|
OPCODE(o2_doSentence),
|
||||||
|
@ -194,7 +194,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o5_isSoundRunning),
|
OPCODE(o5_isSoundRunning),
|
||||||
OPCODE(o2_setActorElevation),
|
OPCODE(o2_setActorElevation),
|
||||||
OPCODE(o2_walkActorTo),
|
OPCODE(o2_walkActorTo),
|
||||||
OPCODE(o2_ifState01),
|
OPCODE(o2_ifNotState02),
|
||||||
/* 80 */
|
/* 80 */
|
||||||
OPCODE(o5_breakHere),
|
OPCODE(o5_breakHere),
|
||||||
OPCODE(o2_putActor),
|
OPCODE(o2_putActor),
|
||||||
|
@ -203,7 +203,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(o_isGreaterEqual),
|
OPCODE(o_isGreaterEqual),
|
||||||
OPCODE(o2_drawObject),
|
OPCODE(o2_drawObject),
|
||||||
OPCODE(o2_getActorElevation),
|
OPCODE(o_badOpcode),
|
||||||
OPCODE(o5_getActorRoom),
|
OPCODE(o5_getActorRoom),
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(o_isNotEqual),
|
OPCODE(o_isNotEqual),
|
||||||
|
@ -214,7 +214,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o2_resourceRoutines),
|
OPCODE(o2_resourceRoutines),
|
||||||
OPCODE(o5_walkActorToActor),
|
OPCODE(o5_walkActorToActor),
|
||||||
OPCODE(o_putActorAtObject),
|
OPCODE(o_putActorAtObject),
|
||||||
OPCODE(o2_ifNotState08),
|
OPCODE(o2_setState02),
|
||||||
/* 90 */
|
/* 90 */
|
||||||
OPCODE(o_pickupObject),
|
OPCODE(o_pickupObject),
|
||||||
OPCODE(o_animateActor),
|
OPCODE(o_animateActor),
|
||||||
|
@ -274,7 +274,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o5_stopSound),
|
OPCODE(o5_stopSound),
|
||||||
OPCODE(o2_setActorElevation),
|
OPCODE(o2_setActorElevation),
|
||||||
OPCODE(o2_walkActorTo),
|
OPCODE(o2_walkActorTo),
|
||||||
OPCODE(o2_ifNotState01),
|
OPCODE(o2_ifNotState02),
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(o2_endCutscene),
|
OPCODE(o2_endCutscene),
|
||||||
OPCODE(o2_putActor),
|
OPCODE(o2_putActor),
|
||||||
|
@ -294,7 +294,7 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o_loadScript),
|
OPCODE(o_loadScript),
|
||||||
OPCODE(o5_walkActorToActor),
|
OPCODE(o5_walkActorToActor),
|
||||||
OPCODE(o_putActorAtObject),
|
OPCODE(o_putActorAtObject),
|
||||||
OPCODE(o2_ifState08),
|
OPCODE(o2_setState02),
|
||||||
/* D0 */
|
/* D0 */
|
||||||
OPCODE(o2_pickupObject),
|
OPCODE(o2_pickupObject),
|
||||||
OPCODE(o_animateActor),
|
OPCODE(o_animateActor),
|
||||||
|
@ -319,12 +319,12 @@ void ScummEngine_c64::setupOpcodes() {
|
||||||
OPCODE(o2_cursorCommand),
|
OPCODE(o2_cursorCommand),
|
||||||
OPCODE(o2_putActor),
|
OPCODE(o2_putActor),
|
||||||
OPCODE(o_stopScript),
|
OPCODE(o_stopScript),
|
||||||
OPCODE(o5_getActorFacing),
|
OPCODE(o_stopScript),
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(o2_loadRoomWithEgo),
|
OPCODE(o2_loadRoomWithEgo),
|
||||||
OPCODE(o2_drawObject),
|
OPCODE(o2_drawObject),
|
||||||
OPCODE(o5_getClosestObjActor),
|
OPCODE(o5_getClosestObjActor),
|
||||||
OPCODE(o2_clearState04),
|
OPCODE(o5_getActorFacing),
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(o5_isScriptRunning),
|
OPCODE(o5_isScriptRunning),
|
||||||
OPCODE(o2_setOwnerOf),
|
OPCODE(o2_setOwnerOf),
|
||||||
|
@ -420,7 +420,7 @@ void ScummEngine_c64::o_clearState08() {
|
||||||
void ScummEngine_c64::o_stopScript() {
|
void ScummEngine_c64::o_stopScript() {
|
||||||
int script;
|
int script;
|
||||||
|
|
||||||
if (_opcode == 0x05) {
|
if (_opcode == 0x05 || _opcode == 0x63 || _opcode == 0xe3) {
|
||||||
script = 0;
|
script = 0;
|
||||||
} else {
|
} else {
|
||||||
script = getVarOrDirectByte(PARAM_1);
|
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_1
|
||||||
#undef PARAM_2
|
#undef PARAM_2
|
||||||
#undef PARAM_3
|
#undef PARAM_3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue