More CMI opcode work. The Murray scene outside the Voodoo ladys house (-d1 -b201) and the Map (-d1 -b226) now mostly work

svn-id: r6281
This commit is contained in:
James Brown 2002-12-30 17:05:38 +00:00
parent 7db414b203
commit 6038bb85be
2 changed files with 42 additions and 33 deletions

View File

@ -429,8 +429,9 @@ protected:
void o8_soundKludge(); void o8_soundKludge();
void o8_system(); void o8_system();
void o8_startVideo(); void o8_startVideo();
void o6_kernelSetFunctions(); void o8_kernelSetFunctions();
void o6_kernelGetFunctions(); void o8_kernelGetFunctions();
void o8_getDateTime();
void o8_getObjectImageX(); void o8_getObjectImageX();
void o8_getObjectImageY(); void o8_getObjectImageY();

View File

@ -270,12 +270,12 @@ void Scumm_v8::setupOpcodes()
/* B4 */ /* B4 */
OPCODE(o6_saveRestoreVerbs), OPCODE(o6_saveRestoreVerbs),
OPCODE(o6_setObjectName), OPCODE(o6_setObjectName),
OPCODE(o6_invalid), OPCODE(o8_getDateTime),
OPCODE(o6_drawBox), OPCODE(o6_drawBox),
/* B8 */ /* B8 */
OPCODE(o6_invalid), OPCODE(o6_invalid),
OPCODE(o8_startVideo), OPCODE(o8_startVideo),
OPCODE(o6_kernelSetFunctions), OPCODE(o8_kernelSetFunctions),
OPCODE(o6_invalid), OPCODE(o6_invalid),
/* BC */ /* BC */
OPCODE(o6_invalid), OPCODE(o6_invalid),
@ -313,7 +313,7 @@ void Scumm_v8::setupOpcodes()
OPCODE(o6_abs), OPCODE(o6_abs),
OPCODE(o6_invalid), OPCODE(o6_invalid),
/* D8 */ /* D8 */
OPCODE(o6_kernelGetFunctions), OPCODE(o8_kernelGetFunctions),
OPCODE(o6_isActorInBox), OPCODE(o6_isActorInBox),
OPCODE(o6_getVerbEntrypoint), OPCODE(o6_getVerbEntrypoint),
OPCODE(o6_getActorFromXY), OPCODE(o6_getActorFromXY),
@ -509,6 +509,7 @@ void Scumm_v8::decodeParseString(int m, int n)
_string[m].overhead = true; _string[m].overhead = true;
_string[m].no_talk_anim = false; _string[m].no_talk_anim = false;
break; break;
case 0xD2:
case 0xD0: // SO_PRINT_MUMBLE case 0xD0: // SO_PRINT_MUMBLE
_string[m].no_talk_anim = true; _string[m].no_talk_anim = true;
break; break;
@ -568,9 +569,9 @@ void Scumm_v8::decodeParseString(int m, int n)
return; return;
} }
break; break;
case 0xD2: // SO_PRINT_WRAP Set print wordwrap // case 0xD2: // SO_PRINT_WRAP Set print wordwrap
error("decodeParseString: SO_PRINT_MUMBLE"); // error("decodeParseString: SO_PRINT_MUMBLE");
break; // break;
default: default:
error("decodeParseString: default case %d", b); error("decodeParseString: default case %d", b);
} }
@ -959,6 +960,8 @@ void Scumm_v8::o8_roomOps()
warning("V8 Load game opcode not implemented"); warning("V8 Load game opcode not implemented");
break; break;
case 0x5F: // SO_ROOM_SATURATION Set saturation of room colors case 0x5F: // SO_ROOM_SATURATION Set saturation of room colors
warning("o8_roomOps: SO_ROOM_SATURATION(%d, %d, %d, %d, %d)", pop(), pop(), pop(), pop(), pop());
break;
default: default:
error("o8_roomOps: default case %d", subOp); error("o8_roomOps: default case %d", subOp);
} }
@ -1286,6 +1289,11 @@ void Scumm_v8::o8_system()
} }
} }
void Scumm_v8::o8_getDateTime()
{
warning("o8_getDateTime()");
}
void Scumm_v8::o8_startVideo() void Scumm_v8::o8_startVideo()
{ {
int len = resStrLen(_scriptPointer); int len = resStrLen(_scriptPointer);
@ -1299,7 +1307,7 @@ void Scumm_v8::o8_startVideo()
_scriptPointer += len + 1; _scriptPointer += len + 1;
} }
void Scumm_v8::o6_kernelSetFunctions() void Scumm_v8::o8_kernelSetFunctions()
{ {
// TODO // TODO
int args[30]; int args[30];
@ -1307,7 +1315,7 @@ void Scumm_v8::o6_kernelSetFunctions()
switch (args[0]) { switch (args[0]) {
case 11: // lockObject case 11: // lockObject
// warning("o6_kernelSetFunctions: lockObject(%d)", args[1]); // warning("o8_kernelSetFunctions: lockObject(%d)", args[1]);
lock(rtFlObject, args[1]); // FIXME - no idea if this is right? lock(rtFlObject, args[1]); // FIXME - no idea if this is right?
// getObjectIndex(args[1]); // getObjectIndex(args[1]);
// if (ObjData.field28 != 0) { // if (ObjData.field28 != 0) {
@ -1315,7 +1323,7 @@ void Scumm_v8::o6_kernelSetFunctions()
// } // }
break; break;
case 12: // unlockObject case 12: // unlockObject
warning("o6_kernelSetFunctions: unlockObject(%d)", args[1]); warning("o8_kernelSetFunctions: unlockObject(%d)", args[1]);
unlock(rtFlObject, args[1]); // FIXME - no idea if this is right? unlock(rtFlObject, args[1]); // FIXME - no idea if this is right?
// getObjectIndex(args[1]); // getObjectIndex(args[1]);
// if (ObjData.field28 != 0) { // if (ObjData.field28 != 0) {
@ -1323,61 +1331,61 @@ void Scumm_v8::o6_kernelSetFunctions()
// } // }
break; break;
case 13: // remapCostume case 13: // remapCostume
derefActorSafe(args[1], "o6_kernelSetFunctions:remapCostume")->remapActorPalette(args[2], args[3], args[4], -1); derefActorSafe(args[1], "o8_kernelSetFunctions:remapCostume")->remapActorPalette(args[2], args[3], args[4], -1);
break; break;
case 14: // remapCostumeInsert case 14: // remapCostumeInsert
derefActorSafe(args[1], "o6_kernelSetFunctions:remapCostumeInsert")->remapActorPalette(args[2], args[3], args[4], args[5]); derefActorSafe(args[1], "o8_kernelSetFunctions:remapCostumeInsert")->remapActorPalette(args[2], args[3], args[4], args[5]);
break; break;
case 15: // setVideoFrameRate case 15: // setVideoFrameRate
// not used anymore (was smush frame rate) // not used anymore (was smush frame rate)
break; break;
case 20: // setBoxSlot case 20: // setBoxSlot
warning("o6_kernelSetFunctions: setBoxSlot(%d, %d)", args[1], args[2]); warning("o8_kernelSetFunctions: setBoxSlot(%d, %d)", args[1], args[2]);
// FIXME - really setBoxScale ?!? // FIXME - really setBoxScale ?!?
// setBoxScale(args[1], args[2]); // setBoxScale(args[1], args[2]);
break; break;
case 21: // setScaleSlot case 21: // setScaleSlot
warning("o6_kernelSetFunctions: setScaleSlot(%d, %d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6], args[7]); warning("o8_kernelSetFunctions: setScaleSlot(%d, %d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
break; break;
case 22: // setBannerColors case 22: // setBannerColors
// warning("o6_kernelSetFunctions: setBannerColors(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]); // warning("o8_kernelSetFunctions: setBannerColors(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]);
break; break;
case 23: // setActorChoreLimbFrame case 23: // setActorChoreLimbFrame
// warning("o6_kernelSetFunctions: setActorChoreLimbFrame(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]); // warning("o8_kernelSetFunctions: setActorChoreLimbFrame(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]);
break; break;
case 24: // clearTextQueue case 24: // clearTextQueue
warning("o6_kernelSetFunctions: clearTextQueue()"); warning("o8_kernelSetFunctions: clearTextQueue()");
break; break;
case 25: // saveGameWrite case 25: // saveGameWrite
warning("o6_kernelSetFunctions: saveGameWrite(%d, %d)", args[1], args[2]); warning("o8_kernelSetFunctions: saveGameWrite(%d, %d)", args[1], args[2]);
break; break;
case 26: // saveGameRead case 26: // saveGameRead
warning("o6_kernelSetFunctions: saveGameRead(%d, %d)", args[1], args[2]); warning("o8_kernelSetFunctions: saveGameRead(%d, %d)", args[1], args[2]);
break; break;
case 27: // saveGameReadName case 27: // saveGameReadName
warning("o6_kernelSetFunctions: saveGameReadName(%d)", args[1]); warning("o8_kernelSetFunctions: saveGameReadName(%d)", args[1]);
break; break;
case 28: // saveGameStampScreenshot case 28: // saveGameStampScreenshot
warning("o6_kernelSetFunctions: saveGameStampScreenshot(%d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6]); warning("o8_kernelSetFunctions: saveGameStampScreenshot(%d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6]);
break; break;
case 29: // setKeyScript case 29: // setKeyScript
warning("o6_kernelSetFunctions: setKeyScript(%d, %d)", args[1], args[2]); warning("o8_kernelSetFunctions: setKeyScript(%d, %d)", args[1], args[2]);
break; break;
case 30: // killAllScriptsButMe case 30: // killAllScriptsButMe
warning("o6_kernelSetFunctions: killAllScriptsButMe()"); warning("o8_kernelSetFunctions: killAllScriptsButMe()");
killAllScriptsExceptCurrent(); killAllScriptsExceptCurrent();
break; break;
case 31: // stopAllVideo case 31: // stopAllVideo
warning("o6_kernelSetFunctions: stopAllVideo()"); warning("o8_kernelSetFunctions: stopAllVideo()");
break; break;
case 32: // writeRegistryValue case 32: // writeRegistryValue
warning("o6_kernelSetFunctions: writeRegistryValue(%d, %d)", args[1], args[2]); warning("o8_kernelSetFunctions: writeRegistryValue(%d, %d)", args[1], args[2]);
break; break;
case 33: // paletteSetIntensity case 33: // paletteSetIntensity
warning("o6_kernelSetFunctions: paletteSetIntensity(%d, %d)", args[1], args[2]); warning("o8_kernelSetFunctions: paletteSetIntensity(%d, %d)", args[1], args[2]);
break; break;
case 34: // queryQuit case 34: // queryQuit
warning("o6_kernelSetFunctions: queryQuit()"); warning("o8_kernelSetFunctions: queryQuit()");
break; break;
case 108: // buildPaletteShadow case 108: // buildPaletteShadow
setupShadowPalette(args[1], args[2], args[3], args[4], args[5], args[6]); setupShadowPalette(args[1], args[2], args[3], args[4], args[5], args[6]);
@ -1393,11 +1401,11 @@ void Scumm_v8::o6_kernelSetFunctions()
break; break;
default: default:
warning("o6_kernelSetFunctions: default case %d (len = %d)", args[0], len); warning("o8_kernelSetFunctions: default case %d (len = %d)", args[0], len);
} }
} }
void Scumm_v8::o6_kernelGetFunctions() void Scumm_v8::o8_kernelGetFunctions()
{ {
// TODO // TODO
int args[30]; int args[30];
@ -1414,7 +1422,7 @@ void Scumm_v8::o6_kernelGetFunctions()
case 0xD3: // getKeyState case 0xD3: // getKeyState
case 0xD7: // getBox case 0xD7: // getBox
push(0); push(0);
warning("o6_kernelGetFunctions: default case %d (len = %d)", args[0], len); warning("o8_kernelGetFunctions: default case %d (len = %d)", args[0], len);
break; break;
case 0xD8: { // findBlastObject case 0xD8: { // findBlastObject
BlastObject *eo; BlastObject *eo;
@ -1434,7 +1442,7 @@ void Scumm_v8::o6_kernelGetFunctions()
} }
case 0xD9: // actorHit case 0xD9: // actorHit
push(0); push(0);
warning("o6_kernelGetFunctions: default case %d (len = %d)", args[0], len); warning("o8_kernelGetFunctions: default case %d (len = %d)", args[0], len);
break; break;
case 0xDA: // lipSyncWidth case 0xDA: // lipSyncWidth
case 0xDB: // lipSyncHeight case 0xDB: // lipSyncHeight
@ -1465,7 +1473,7 @@ void Scumm_v8::o6_kernelGetFunctions()
} }
break; break;
default: default:
error("o6_kernelGetFunctions: default case %d (len = %d)", args[0], len); error("o8_kernelGetFunctions: default case %d (len = %d)", args[0], len);
} }
} }