SCUMM: Got rid of o6_invalid
svn-id: r39957
This commit is contained in:
parent
432e7917a5
commit
99df028d35
11 changed files with 8 additions and 663 deletions
|
@ -70,7 +70,6 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0x13, o60_closeFile);
|
OPCODE(0x13, o60_closeFile);
|
||||||
/* 14 */
|
/* 14 */
|
||||||
OPCODE(0x14, o6_loadRoomWithEgo);
|
OPCODE(0x14, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x15, o6_invalid);
|
|
||||||
OPCODE(0x16, o72_createDirectory);
|
OPCODE(0x16, o72_createDirectory);
|
||||||
OPCODE(0x17, o100_createSound);
|
OPCODE(0x17, o100_createSound);
|
||||||
/* 18 */
|
/* 18 */
|
||||||
|
@ -134,10 +133,8 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0x46, o6_neq);
|
OPCODE(0x46, o6_neq);
|
||||||
OPCODE(0x47, o100_dim2dim2Array);
|
OPCODE(0x47, o100_dim2dim2Array);
|
||||||
/* 48 */
|
/* 48 */
|
||||||
OPCODE(0x48, o6_invalid);
|
|
||||||
OPCODE(0x49, o100_redim2dimArray);
|
OPCODE(0x49, o100_redim2dimArray);
|
||||||
OPCODE(0x4a, o6_not);
|
OPCODE(0x4a, o6_not);
|
||||||
OPCODE(0x4b, o6_invalid);
|
|
||||||
/* 4C */
|
/* 4C */
|
||||||
OPCODE(0x4c, o6_beginOverride);
|
OPCODE(0x4c, o6_beginOverride);
|
||||||
OPCODE(0x4d, o6_endOverride);
|
OPCODE(0x4d, o6_endOverride);
|
||||||
|
@ -167,7 +164,6 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0x60, o6_pushWordVar);
|
OPCODE(0x60, o6_pushWordVar);
|
||||||
OPCODE(0x61, o6_putActorAtObject);
|
OPCODE(0x61, o6_putActorAtObject);
|
||||||
OPCODE(0x62, o6_putActorAtXY);
|
OPCODE(0x62, o6_putActorAtXY);
|
||||||
OPCODE(0x63, o6_invalid);
|
|
||||||
/* 64 */
|
/* 64 */
|
||||||
OPCODE(0x64, o100_redimArray);
|
OPCODE(0x64, o100_redimArray);
|
||||||
OPCODE(0x65, o72_rename);
|
OPCODE(0x65, o72_rename);
|
||||||
|
@ -180,11 +176,9 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0x6b, o72_talkActor);
|
OPCODE(0x6b, o72_talkActor);
|
||||||
/* 6C */
|
/* 6C */
|
||||||
OPCODE(0x6c, o72_talkEgo);
|
OPCODE(0x6c, o72_talkEgo);
|
||||||
OPCODE(0x6d, o6_invalid);
|
|
||||||
OPCODE(0x6e, o60_seekFilePos);
|
OPCODE(0x6e, o60_seekFilePos);
|
||||||
OPCODE(0x6f, o6_setBoxFlags);
|
OPCODE(0x6f, o6_setBoxFlags);
|
||||||
/* 70 */
|
/* 70 */
|
||||||
OPCODE(0x70, o6_invalid);
|
|
||||||
OPCODE(0x71, o6_setBoxSet);
|
OPCODE(0x71, o6_setBoxSet);
|
||||||
OPCODE(0x72, o100_setSystemMessage);
|
OPCODE(0x72, o100_setSystemMessage);
|
||||||
OPCODE(0x73, o6_shuffle);
|
OPCODE(0x73, o6_shuffle);
|
||||||
|
@ -215,7 +209,6 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0x87, o6_sub);
|
OPCODE(0x87, o6_sub);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o100_systemOps);
|
OPCODE(0x88, o100_systemOps);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o72_setTimer);
|
OPCODE(0x8a, o72_setTimer);
|
||||||
OPCODE(0x8b, o100_cursorCommand);
|
OPCODE(0x8b, o100_cursorCommand);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -250,7 +243,6 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0xa3, o90_getDistanceBetweenPoints);
|
OPCODE(0xa3, o90_getDistanceBetweenPoints);
|
||||||
/* A4 */
|
/* A4 */
|
||||||
OPCODE(0xa4, o6_ifClassOfIs);
|
OPCODE(0xa4, o6_ifClassOfIs);
|
||||||
OPCODE(0xa5, o6_invalid);
|
|
||||||
OPCODE(0xa6, o90_cond);
|
OPCODE(0xa6, o90_cond);
|
||||||
OPCODE(0xa7, o90_cos);
|
OPCODE(0xa7, o90_cos);
|
||||||
/* A8 */
|
/* A8 */
|
||||||
|
@ -275,7 +267,6 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0xb7, o100_getResourceSize);
|
OPCODE(0xb7, o100_getResourceSize);
|
||||||
/* B8 */
|
/* B8 */
|
||||||
OPCODE(0xb8, o100_getSpriteGroupInfo);
|
OPCODE(0xb8, o100_getSpriteGroupInfo);
|
||||||
OPCODE(0xb9, o6_invalid);
|
|
||||||
OPCODE(0xba, o100_getWizData);
|
OPCODE(0xba, o100_getWizData);
|
||||||
OPCODE(0xbb, o6_isActorInBox);
|
OPCODE(0xbb, o6_isActorInBox);
|
||||||
/* BC */
|
/* BC */
|
||||||
|
@ -306,7 +297,6 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
/* D0 */
|
/* D0 */
|
||||||
OPCODE(0xd0, o6_getRandomNumber);
|
OPCODE(0xd0, o6_getRandomNumber);
|
||||||
OPCODE(0xd1, o6_getRandomNumberRange);
|
OPCODE(0xd1, o6_getRandomNumberRange);
|
||||||
OPCODE(0xd2, o6_invalid);
|
|
||||||
OPCODE(0xd3, o100_readFile);
|
OPCODE(0xd3, o100_readFile);
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o72_readINI);
|
OPCODE(0xd4, o72_readINI);
|
||||||
|
@ -340,29 +330,10 @@ void ScummEngine_v100he::setupOpcodes() {
|
||||||
OPCODE(0xeb, o6_getVerbEntrypoint);
|
OPCODE(0xeb, o6_getVerbEntrypoint);
|
||||||
/* EC */
|
/* EC */
|
||||||
OPCODE(0xec, o100_getVideoData);
|
OPCODE(0xec, o100_getVideoData);
|
||||||
OPCODE(0xed, o6_invalid);
|
|
||||||
OPCODE(0xee, o6_invalid);
|
|
||||||
OPCODE(0xef, o6_invalid);
|
|
||||||
/* F0 */
|
/* F0 */
|
||||||
OPCODE(0xf0, o6_invalid);
|
|
||||||
OPCODE(0xf1, o6_invalid);
|
|
||||||
OPCODE(0xf2, o6_invalid);
|
|
||||||
OPCODE(0xf3, o6_invalid);
|
|
||||||
/* F4 */
|
/* F4 */
|
||||||
OPCODE(0xf4, o6_invalid);
|
|
||||||
OPCODE(0xf5, o6_invalid);
|
|
||||||
OPCODE(0xf6, o6_invalid);
|
|
||||||
OPCODE(0xf7, o6_invalid);
|
|
||||||
/* F8 */
|
/* F8 */
|
||||||
OPCODE(0xf8, o6_invalid);
|
|
||||||
OPCODE(0xf9, o6_invalid);
|
|
||||||
OPCODE(0xfa, o6_invalid);
|
|
||||||
OPCODE(0xfb, o6_invalid);
|
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o6_invalid);
|
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v100he::o100_actorOps() {
|
void ScummEngine_v100he::o100_actorOps() {
|
||||||
|
|
|
@ -72,13 +72,9 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
OPCODE(0x02, o6_pushByteVar);
|
OPCODE(0x02, o6_pushByteVar);
|
||||||
OPCODE(0x03, o6_pushWordVar);
|
OPCODE(0x03, o6_pushWordVar);
|
||||||
/* 04 */
|
/* 04 */
|
||||||
OPCODE(0x04, o6_invalid);
|
|
||||||
OPCODE(0x05, o6_invalid);
|
|
||||||
OPCODE(0x06, o6_byteArrayRead);
|
OPCODE(0x06, o6_byteArrayRead);
|
||||||
OPCODE(0x07, o6_wordArrayRead);
|
OPCODE(0x07, o6_wordArrayRead);
|
||||||
/* 08 */
|
/* 08 */
|
||||||
OPCODE(0x08, o6_invalid);
|
|
||||||
OPCODE(0x09, o6_invalid);
|
|
||||||
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
||||||
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
||||||
/* 0C */
|
/* 0C */
|
||||||
|
@ -100,85 +96,34 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
OPCODE(0x18, o6_land);
|
OPCODE(0x18, o6_land);
|
||||||
OPCODE(0x19, o6_lor);
|
OPCODE(0x19, o6_lor);
|
||||||
OPCODE(0x1a, o6_pop);
|
OPCODE(0x1a, o6_pop);
|
||||||
OPCODE(0x1b, o6_invalid);
|
|
||||||
/* 1C */
|
/* 1C */
|
||||||
OPCODE(0x1c, o6_invalid);
|
|
||||||
OPCODE(0x1d, o6_invalid);
|
|
||||||
OPCODE(0x1e, o6_invalid);
|
|
||||||
OPCODE(0x1f, o6_invalid);
|
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(0x20, o6_invalid);
|
|
||||||
OPCODE(0x21, o6_invalid);
|
|
||||||
OPCODE(0x22, o6_invalid);
|
|
||||||
OPCODE(0x23, o6_invalid);
|
|
||||||
/* 24 */
|
/* 24 */
|
||||||
OPCODE(0x24, o6_invalid);
|
|
||||||
OPCODE(0x25, o6_invalid);
|
|
||||||
OPCODE(0x26, o6_invalid);
|
|
||||||
OPCODE(0x27, o6_invalid);
|
|
||||||
/* 28 */
|
/* 28 */
|
||||||
OPCODE(0x28, o6_invalid);
|
|
||||||
OPCODE(0x29, o6_invalid);
|
|
||||||
OPCODE(0x2a, o6_invalid);
|
|
||||||
OPCODE(0x2b, o6_invalid);
|
|
||||||
/* 2C */
|
/* 2C */
|
||||||
OPCODE(0x2c, o6_invalid);
|
|
||||||
OPCODE(0x2d, o6_invalid);
|
|
||||||
OPCODE(0x2e, o6_invalid);
|
|
||||||
OPCODE(0x2f, o6_invalid);
|
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(0x30, o6_invalid);
|
|
||||||
OPCODE(0x31, o6_invalid);
|
|
||||||
OPCODE(0x32, o6_invalid);
|
|
||||||
OPCODE(0x33, o6_invalid);
|
|
||||||
/* 34 */
|
/* 34 */
|
||||||
OPCODE(0x34, o6_invalid);
|
|
||||||
OPCODE(0x35, o6_invalid);
|
|
||||||
OPCODE(0x36, o6_invalid);
|
|
||||||
OPCODE(0x37, o6_invalid);
|
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(0x38, o6_invalid);
|
|
||||||
OPCODE(0x39, o6_invalid);
|
|
||||||
OPCODE(0x3a, o6_invalid);
|
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_writeByteVar);
|
OPCODE(0x42, o6_writeByteVar);
|
||||||
OPCODE(0x43, o6_writeWordVar);
|
OPCODE(0x43, o6_writeWordVar);
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o6_invalid);
|
|
||||||
OPCODE(0x45, o6_invalid);
|
|
||||||
OPCODE(0x46, o6_byteArrayWrite);
|
OPCODE(0x46, o6_byteArrayWrite);
|
||||||
OPCODE(0x47, o6_wordArrayWrite);
|
OPCODE(0x47, o6_wordArrayWrite);
|
||||||
/* 48 */
|
/* 48 */
|
||||||
OPCODE(0x48, o6_invalid);
|
|
||||||
OPCODE(0x49, o6_invalid);
|
|
||||||
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
||||||
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
||||||
/* 4C */
|
/* 4C */
|
||||||
OPCODE(0x4c, o6_invalid);
|
|
||||||
OPCODE(0x4d, o6_invalid);
|
|
||||||
OPCODE(0x4e, o6_byteVarInc);
|
OPCODE(0x4e, o6_byteVarInc);
|
||||||
OPCODE(0x4f, o6_wordVarInc);
|
OPCODE(0x4f, o6_wordVarInc);
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o6_invalid);
|
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o6_byteArrayInc);
|
OPCODE(0x52, o6_byteArrayInc);
|
||||||
OPCODE(0x53, o6_wordArrayInc);
|
OPCODE(0x53, o6_wordArrayInc);
|
||||||
/* 54 */
|
/* 54 */
|
||||||
OPCODE(0x54, o6_invalid);
|
|
||||||
OPCODE(0x55, o6_invalid);
|
|
||||||
OPCODE(0x56, o6_byteVarDec);
|
OPCODE(0x56, o6_byteVarDec);
|
||||||
OPCODE(0x57, o6_wordVarDec);
|
OPCODE(0x57, o6_wordVarDec);
|
||||||
/* 58 */
|
/* 58 */
|
||||||
OPCODE(0x58, o6_invalid);
|
|
||||||
OPCODE(0x59, o6_invalid);
|
|
||||||
OPCODE(0x5a, o6_byteArrayDec);
|
OPCODE(0x5a, o6_byteArrayDec);
|
||||||
OPCODE(0x5b, o6_wordArrayDec);
|
OPCODE(0x5b, o6_wordArrayDec);
|
||||||
/* 5C */
|
/* 5C */
|
||||||
|
@ -190,9 +135,7 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
OPCODE(0x60, o6_startObject);
|
OPCODE(0x60, o6_startObject);
|
||||||
OPCODE(0x61, o6_drawObject);
|
OPCODE(0x61, o6_drawObject);
|
||||||
OPCODE(0x62, o6_drawObjectAt);
|
OPCODE(0x62, o6_drawObjectAt);
|
||||||
OPCODE(0x63, o6_invalid);
|
|
||||||
/* 64 */
|
/* 64 */
|
||||||
OPCODE(0x64, o6_invalid);
|
|
||||||
OPCODE(0x65, o6_stopObjectCode);
|
OPCODE(0x65, o6_stopObjectCode);
|
||||||
OPCODE(0x66, o6_stopObjectCode);
|
OPCODE(0x66, o6_stopObjectCode);
|
||||||
OPCODE(0x67, o6_endCutscene);
|
OPCODE(0x67, o6_endCutscene);
|
||||||
|
@ -234,11 +177,9 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(0x84, o6_pickupObject);
|
OPCODE(0x84, o6_pickupObject);
|
||||||
OPCODE(0x85, o6_loadRoomWithEgo);
|
OPCODE(0x85, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x86, o6_invalid);
|
|
||||||
OPCODE(0x87, o6_getRandomNumber);
|
OPCODE(0x87, o6_getRandomNumber);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_getRandomNumberRange);
|
OPCODE(0x88, o6_getRandomNumberRange);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o6_getActorMoving);
|
OPCODE(0x8a, o6_getActorMoving);
|
||||||
OPCODE(0x8b, o6_isScriptRunning);
|
OPCODE(0x8b, o6_isScriptRunning);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -259,7 +200,6 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
/* 98 */
|
/* 98 */
|
||||||
OPCODE(0x98, o6_isSoundRunning);
|
OPCODE(0x98, o6_isSoundRunning);
|
||||||
OPCODE(0x99, o6_setBoxFlags);
|
OPCODE(0x99, o6_setBoxFlags);
|
||||||
OPCODE(0x9a, o6_invalid);
|
|
||||||
OPCODE(0x9b, o6_resourceRoutines);
|
OPCODE(0x9b, o6_resourceRoutines);
|
||||||
/* 9C */
|
/* 9C */
|
||||||
OPCODE(0x9c, o60_roomOps);
|
OPCODE(0x9c, o60_roomOps);
|
||||||
|
@ -282,7 +222,6 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
OPCODE(0xaa, o6_getActorScaleX);
|
OPCODE(0xaa, o6_getActorScaleX);
|
||||||
OPCODE(0xab, o6_getActorAnimCounter);
|
OPCODE(0xab, o6_getActorAnimCounter);
|
||||||
/* AC */
|
/* AC */
|
||||||
OPCODE(0xac, o6_invalid);
|
|
||||||
OPCODE(0xad, o6_isAnyOf);
|
OPCODE(0xad, o6_isAnyOf);
|
||||||
OPCODE(0xae, o6_systemOps);
|
OPCODE(0xae, o6_systemOps);
|
||||||
OPCODE(0xaf, o6_isActorInBox);
|
OPCODE(0xaf, o6_isActorInBox);
|
||||||
|
@ -308,9 +247,6 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
OPCODE(0xbf, o6_startScriptQuick2);
|
OPCODE(0xbf, o6_startScriptQuick2);
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o6_dim2dimArray);
|
OPCODE(0xc0, o6_dim2dimArray);
|
||||||
OPCODE(0xc1, o6_invalid);
|
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_abs);
|
OPCODE(0xc4, o6_abs);
|
||||||
OPCODE(0xc5, o6_distObjectObject);
|
OPCODE(0xc5, o6_distObjectObject);
|
||||||
|
@ -324,13 +260,10 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
/* CC */
|
/* CC */
|
||||||
OPCODE(0xcc, o6_pickOneOfDefault);
|
OPCODE(0xcc, o6_pickOneOfDefault);
|
||||||
OPCODE(0xcd, o6_stampObject);
|
OPCODE(0xcd, o6_stampObject);
|
||||||
OPCODE(0xce, o6_invalid);
|
|
||||||
OPCODE(0xcf, o6_invalid);
|
|
||||||
/* D0 */
|
/* D0 */
|
||||||
OPCODE(0xd0, o6_getDateTime);
|
OPCODE(0xd0, o6_getDateTime);
|
||||||
OPCODE(0xd1, o6_stopTalking);
|
OPCODE(0xd1, o6_stopTalking);
|
||||||
OPCODE(0xd2, o6_getAnimateVariable);
|
OPCODE(0xd2, o6_getAnimateVariable);
|
||||||
OPCODE(0xd3, o6_invalid);
|
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_shuffle);
|
OPCODE(0xd4, o6_shuffle);
|
||||||
OPCODE(0xd5, o6_jumpToScript);
|
OPCODE(0xd5, o6_jumpToScript);
|
||||||
|
@ -353,39 +286,15 @@ void ScummEngine_v60he::setupOpcodes() {
|
||||||
OPCODE(0xe3, o6_pickVarRandom);
|
OPCODE(0xe3, o6_pickVarRandom);
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(0xe4, o6_setBoxSet);
|
OPCODE(0xe4, o6_setBoxSet);
|
||||||
OPCODE(0xe5, o6_invalid);
|
|
||||||
OPCODE(0xe6, o6_invalid);
|
|
||||||
OPCODE(0xe7, o6_invalid);
|
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(0xe8, o6_invalid);
|
|
||||||
OPCODE(0xe9, o60_seekFilePos);
|
OPCODE(0xe9, o60_seekFilePos);
|
||||||
OPCODE(0xea, o60_redimArray);
|
OPCODE(0xea, o60_redimArray);
|
||||||
OPCODE(0xeb, o60_readFilePos);
|
OPCODE(0xeb, o60_readFilePos);
|
||||||
/* EC */
|
/* EC */
|
||||||
OPCODE(0xec, o6_invalid);
|
|
||||||
OPCODE(0xed, o6_invalid);
|
|
||||||
OPCODE(0xee, o6_invalid);
|
|
||||||
OPCODE(0xef, o6_invalid);
|
|
||||||
/* F0 */
|
/* F0 */
|
||||||
OPCODE(0xf0, o6_invalid);
|
|
||||||
OPCODE(0xf1, o6_invalid);
|
|
||||||
OPCODE(0xf2, o6_invalid);
|
|
||||||
OPCODE(0xf3, o6_invalid);
|
|
||||||
/* F4 */
|
/* F4 */
|
||||||
OPCODE(0xf4, o6_invalid);
|
|
||||||
OPCODE(0xf5, o6_invalid);
|
|
||||||
OPCODE(0xf6, o6_invalid);
|
|
||||||
OPCODE(0xf7, o6_invalid);
|
|
||||||
/* F8 */
|
/* F8 */
|
||||||
OPCODE(0xf8, o6_invalid);
|
|
||||||
OPCODE(0xf9, o6_invalid);
|
|
||||||
OPCODE(0xfa, o6_invalid);
|
|
||||||
OPCODE(0xfb, o6_invalid);
|
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o6_invalid);
|
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScummEngine_v60he::convertFilePath(byte *dst) {
|
int ScummEngine_v60he::convertFilePath(byte *dst) {
|
||||||
|
|
|
@ -47,13 +47,9 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
OPCODE(0x02, o6_pushByteVar);
|
OPCODE(0x02, o6_pushByteVar);
|
||||||
OPCODE(0x03, o6_pushWordVar);
|
OPCODE(0x03, o6_pushWordVar);
|
||||||
/* 04 */
|
/* 04 */
|
||||||
OPCODE(0x04, o6_invalid);
|
|
||||||
OPCODE(0x05, o6_invalid);
|
|
||||||
OPCODE(0x06, o6_byteArrayRead);
|
OPCODE(0x06, o6_byteArrayRead);
|
||||||
OPCODE(0x07, o6_wordArrayRead);
|
OPCODE(0x07, o6_wordArrayRead);
|
||||||
/* 08 */
|
/* 08 */
|
||||||
OPCODE(0x08, o6_invalid);
|
|
||||||
OPCODE(0x09, o6_invalid);
|
|
||||||
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
||||||
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
||||||
/* 0C */
|
/* 0C */
|
||||||
|
@ -75,85 +71,34 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
OPCODE(0x18, o6_land);
|
OPCODE(0x18, o6_land);
|
||||||
OPCODE(0x19, o6_lor);
|
OPCODE(0x19, o6_lor);
|
||||||
OPCODE(0x1a, o6_pop);
|
OPCODE(0x1a, o6_pop);
|
||||||
OPCODE(0x1b, o6_invalid);
|
|
||||||
/* 1C */
|
/* 1C */
|
||||||
OPCODE(0x1c, o6_invalid);
|
|
||||||
OPCODE(0x1d, o6_invalid);
|
|
||||||
OPCODE(0x1e, o6_invalid);
|
|
||||||
OPCODE(0x1f, o6_invalid);
|
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(0x20, o6_invalid);
|
|
||||||
OPCODE(0x21, o6_invalid);
|
|
||||||
OPCODE(0x22, o6_invalid);
|
|
||||||
OPCODE(0x23, o6_invalid);
|
|
||||||
/* 24 */
|
/* 24 */
|
||||||
OPCODE(0x24, o6_invalid);
|
|
||||||
OPCODE(0x25, o6_invalid);
|
|
||||||
OPCODE(0x26, o6_invalid);
|
|
||||||
OPCODE(0x27, o6_invalid);
|
|
||||||
/* 28 */
|
/* 28 */
|
||||||
OPCODE(0x28, o6_invalid);
|
|
||||||
OPCODE(0x29, o6_invalid);
|
|
||||||
OPCODE(0x2a, o6_invalid);
|
|
||||||
OPCODE(0x2b, o6_invalid);
|
|
||||||
/* 2C */
|
/* 2C */
|
||||||
OPCODE(0x2c, o6_invalid);
|
|
||||||
OPCODE(0x2d, o6_invalid);
|
|
||||||
OPCODE(0x2e, o6_invalid);
|
|
||||||
OPCODE(0x2f, o6_invalid);
|
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(0x30, o6_invalid);
|
|
||||||
OPCODE(0x31, o6_invalid);
|
|
||||||
OPCODE(0x32, o6_invalid);
|
|
||||||
OPCODE(0x33, o6_invalid);
|
|
||||||
/* 34 */
|
/* 34 */
|
||||||
OPCODE(0x34, o6_invalid);
|
|
||||||
OPCODE(0x35, o6_invalid);
|
|
||||||
OPCODE(0x36, o6_invalid);
|
|
||||||
OPCODE(0x37, o6_invalid);
|
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(0x38, o6_invalid);
|
|
||||||
OPCODE(0x39, o6_invalid);
|
|
||||||
OPCODE(0x3a, o6_invalid);
|
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_writeByteVar);
|
OPCODE(0x42, o6_writeByteVar);
|
||||||
OPCODE(0x43, o6_writeWordVar);
|
OPCODE(0x43, o6_writeWordVar);
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o6_invalid);
|
|
||||||
OPCODE(0x45, o6_invalid);
|
|
||||||
OPCODE(0x46, o6_byteArrayWrite);
|
OPCODE(0x46, o6_byteArrayWrite);
|
||||||
OPCODE(0x47, o6_wordArrayWrite);
|
OPCODE(0x47, o6_wordArrayWrite);
|
||||||
/* 48 */
|
/* 48 */
|
||||||
OPCODE(0x48, o6_invalid);
|
|
||||||
OPCODE(0x49, o6_invalid);
|
|
||||||
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
||||||
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
||||||
/* 4C */
|
/* 4C */
|
||||||
OPCODE(0x4c, o6_invalid);
|
|
||||||
OPCODE(0x4d, o6_invalid);
|
|
||||||
OPCODE(0x4e, o6_byteVarInc);
|
OPCODE(0x4e, o6_byteVarInc);
|
||||||
OPCODE(0x4f, o6_wordVarInc);
|
OPCODE(0x4f, o6_wordVarInc);
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o6_invalid);
|
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o6_byteArrayInc);
|
OPCODE(0x52, o6_byteArrayInc);
|
||||||
OPCODE(0x53, o6_wordArrayInc);
|
OPCODE(0x53, o6_wordArrayInc);
|
||||||
/* 54 */
|
/* 54 */
|
||||||
OPCODE(0x54, o6_invalid);
|
|
||||||
OPCODE(0x55, o6_invalid);
|
|
||||||
OPCODE(0x56, o6_byteVarDec);
|
OPCODE(0x56, o6_byteVarDec);
|
||||||
OPCODE(0x57, o6_wordVarDec);
|
OPCODE(0x57, o6_wordVarDec);
|
||||||
/* 58 */
|
/* 58 */
|
||||||
OPCODE(0x58, o6_invalid);
|
|
||||||
OPCODE(0x59, o6_invalid);
|
|
||||||
OPCODE(0x5a, o6_byteArrayDec);
|
OPCODE(0x5a, o6_byteArrayDec);
|
||||||
OPCODE(0x5b, o6_wordArrayDec);
|
OPCODE(0x5b, o6_wordArrayDec);
|
||||||
/* 5C */
|
/* 5C */
|
||||||
|
@ -165,9 +110,7 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
OPCODE(0x60, o6_startObject);
|
OPCODE(0x60, o6_startObject);
|
||||||
OPCODE(0x61, o6_drawObject);
|
OPCODE(0x61, o6_drawObject);
|
||||||
OPCODE(0x62, o6_drawObjectAt);
|
OPCODE(0x62, o6_drawObjectAt);
|
||||||
OPCODE(0x63, o6_invalid);
|
|
||||||
/* 64 */
|
/* 64 */
|
||||||
OPCODE(0x64, o6_invalid);
|
|
||||||
OPCODE(0x65, o6_stopObjectCode);
|
OPCODE(0x65, o6_stopObjectCode);
|
||||||
OPCODE(0x66, o6_stopObjectCode);
|
OPCODE(0x66, o6_stopObjectCode);
|
||||||
OPCODE(0x67, o6_endCutscene);
|
OPCODE(0x67, o6_endCutscene);
|
||||||
|
@ -209,11 +152,9 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(0x84, o70_pickupObject);
|
OPCODE(0x84, o70_pickupObject);
|
||||||
OPCODE(0x85, o6_loadRoomWithEgo);
|
OPCODE(0x85, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x86, o6_invalid);
|
|
||||||
OPCODE(0x87, o6_getRandomNumber);
|
OPCODE(0x87, o6_getRandomNumber);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_getRandomNumberRange);
|
OPCODE(0x88, o6_getRandomNumberRange);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o6_getActorMoving);
|
OPCODE(0x8a, o6_getActorMoving);
|
||||||
OPCODE(0x8b, o6_isScriptRunning);
|
OPCODE(0x8b, o6_isScriptRunning);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -234,7 +175,6 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
/* 98 */
|
/* 98 */
|
||||||
OPCODE(0x98, o6_isSoundRunning);
|
OPCODE(0x98, o6_isSoundRunning);
|
||||||
OPCODE(0x99, o6_setBoxFlags);
|
OPCODE(0x99, o6_setBoxFlags);
|
||||||
OPCODE(0x9a, o6_invalid);
|
|
||||||
OPCODE(0x9b, o70_resourceRoutines);
|
OPCODE(0x9b, o70_resourceRoutines);
|
||||||
/* 9C */
|
/* 9C */
|
||||||
OPCODE(0x9c, o60_roomOps);
|
OPCODE(0x9c, o60_roomOps);
|
||||||
|
@ -257,7 +197,6 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
OPCODE(0xaa, o6_getActorScaleX);
|
OPCODE(0xaa, o6_getActorScaleX);
|
||||||
OPCODE(0xab, o6_getActorAnimCounter);
|
OPCODE(0xab, o6_getActorAnimCounter);
|
||||||
/* AC */
|
/* AC */
|
||||||
OPCODE(0xac, o6_invalid);
|
|
||||||
OPCODE(0xad, o6_isAnyOf);
|
OPCODE(0xad, o6_isAnyOf);
|
||||||
OPCODE(0xae, o70_systemOps);
|
OPCODE(0xae, o70_systemOps);
|
||||||
OPCODE(0xaf, o6_isActorInBox);
|
OPCODE(0xaf, o6_isActorInBox);
|
||||||
|
@ -283,9 +222,6 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
OPCODE(0xbf, o6_startScriptQuick2);
|
OPCODE(0xbf, o6_startScriptQuick2);
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o6_dim2dimArray);
|
OPCODE(0xc0, o6_dim2dimArray);
|
||||||
OPCODE(0xc1, o6_invalid);
|
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_abs);
|
OPCODE(0xc4, o6_abs);
|
||||||
OPCODE(0xc5, o6_distObjectObject);
|
OPCODE(0xc5, o6_distObjectObject);
|
||||||
|
@ -299,13 +235,10 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
/* CC */
|
/* CC */
|
||||||
OPCODE(0xcc, o6_pickOneOfDefault);
|
OPCODE(0xcc, o6_pickOneOfDefault);
|
||||||
OPCODE(0xcd, o6_stampObject);
|
OPCODE(0xcd, o6_stampObject);
|
||||||
OPCODE(0xce, o6_invalid);
|
|
||||||
OPCODE(0xcf, o6_invalid);
|
|
||||||
/* D0 */
|
/* D0 */
|
||||||
OPCODE(0xd0, o6_getDateTime);
|
OPCODE(0xd0, o6_getDateTime);
|
||||||
OPCODE(0xd1, o6_stopTalking);
|
OPCODE(0xd1, o6_stopTalking);
|
||||||
OPCODE(0xd2, o6_getAnimateVariable);
|
OPCODE(0xd2, o6_getAnimateVariable);
|
||||||
OPCODE(0xd3, o6_invalid);
|
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_shuffle);
|
OPCODE(0xd4, o6_shuffle);
|
||||||
OPCODE(0xd5, o6_jumpToScript);
|
OPCODE(0xd5, o6_jumpToScript);
|
||||||
|
@ -328,39 +261,21 @@ void ScummEngine_v70he::setupOpcodes() {
|
||||||
OPCODE(0xe3, o6_pickVarRandom);
|
OPCODE(0xe3, o6_pickVarRandom);
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(0xe4, o6_setBoxSet);
|
OPCODE(0xe4, o6_setBoxSet);
|
||||||
OPCODE(0xe5, o6_invalid);
|
|
||||||
OPCODE(0xe6, o6_invalid);
|
|
||||||
OPCODE(0xe7, o6_invalid);
|
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(0xe8, o6_invalid);
|
|
||||||
OPCODE(0xe9, o60_seekFilePos);
|
OPCODE(0xe9, o60_seekFilePos);
|
||||||
OPCODE(0xea, o60_redimArray);
|
OPCODE(0xea, o60_redimArray);
|
||||||
OPCODE(0xeb, o60_readFilePos);
|
OPCODE(0xeb, o60_readFilePos);
|
||||||
/* EC */
|
/* EC */
|
||||||
OPCODE(0xec, o6_invalid);
|
|
||||||
OPCODE(0xed, o6_invalid);
|
|
||||||
OPCODE(0xee, o70_getStringLen);
|
OPCODE(0xee, o70_getStringLen);
|
||||||
OPCODE(0xef, o6_invalid);
|
|
||||||
/* F0 */
|
/* F0 */
|
||||||
OPCODE(0xf0, o6_invalid);
|
|
||||||
OPCODE(0xf1, o6_invalid);
|
|
||||||
OPCODE(0xf2, o70_isResourceLoaded);
|
OPCODE(0xf2, o70_isResourceLoaded);
|
||||||
OPCODE(0xf3, o70_readINI);
|
OPCODE(0xf3, o70_readINI);
|
||||||
/* F4 */
|
/* F4 */
|
||||||
OPCODE(0xf4, o70_writeINI);
|
OPCODE(0xf4, o70_writeINI);
|
||||||
OPCODE(0xf5, o6_invalid);
|
|
||||||
OPCODE(0xf6, o6_invalid);
|
|
||||||
OPCODE(0xf7, o6_invalid);
|
|
||||||
/* F8 */
|
/* F8 */
|
||||||
OPCODE(0xf8, o6_invalid);
|
|
||||||
OPCODE(0xf9, o70_createDirectory);
|
OPCODE(0xf9, o70_createDirectory);
|
||||||
OPCODE(0xfa, o70_setSystemMessage);
|
OPCODE(0xfa, o70_setSystemMessage);
|
||||||
OPCODE(0xfb, o6_invalid);
|
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o6_invalid);
|
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v70he::o70_startSound() {
|
void ScummEngine_v70he::o70_startSound() {
|
||||||
|
|
|
@ -39,13 +39,9 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
OPCODE(0x02, o6_pushByteVar);
|
OPCODE(0x02, o6_pushByteVar);
|
||||||
OPCODE(0x03, o6_pushWordVar);
|
OPCODE(0x03, o6_pushWordVar);
|
||||||
/* 04 */
|
/* 04 */
|
||||||
OPCODE(0x04, o6_invalid);
|
|
||||||
OPCODE(0x05, o6_invalid);
|
|
||||||
OPCODE(0x06, o6_byteArrayRead);
|
OPCODE(0x06, o6_byteArrayRead);
|
||||||
OPCODE(0x07, o6_wordArrayRead);
|
OPCODE(0x07, o6_wordArrayRead);
|
||||||
/* 08 */
|
/* 08 */
|
||||||
OPCODE(0x08, o6_invalid);
|
|
||||||
OPCODE(0x09, o6_invalid);
|
|
||||||
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
||||||
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
||||||
/* 0C */
|
/* 0C */
|
||||||
|
@ -67,85 +63,34 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
OPCODE(0x18, o6_land);
|
OPCODE(0x18, o6_land);
|
||||||
OPCODE(0x19, o6_lor);
|
OPCODE(0x19, o6_lor);
|
||||||
OPCODE(0x1a, o6_pop);
|
OPCODE(0x1a, o6_pop);
|
||||||
OPCODE(0x1b, o6_invalid);
|
|
||||||
/* 1C */
|
/* 1C */
|
||||||
OPCODE(0x1c, o6_invalid);
|
|
||||||
OPCODE(0x1d, o6_invalid);
|
|
||||||
OPCODE(0x1e, o6_invalid);
|
|
||||||
OPCODE(0x1f, o6_invalid);
|
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(0x20, o6_invalid);
|
|
||||||
OPCODE(0x21, o6_invalid);
|
|
||||||
OPCODE(0x22, o6_invalid);
|
|
||||||
OPCODE(0x23, o6_invalid);
|
|
||||||
/* 24 */
|
/* 24 */
|
||||||
OPCODE(0x24, o6_invalid);
|
|
||||||
OPCODE(0x25, o6_invalid);
|
|
||||||
OPCODE(0x26, o6_invalid);
|
|
||||||
OPCODE(0x27, o6_invalid);
|
|
||||||
/* 28 */
|
/* 28 */
|
||||||
OPCODE(0x28, o6_invalid);
|
|
||||||
OPCODE(0x29, o6_invalid);
|
|
||||||
OPCODE(0x2a, o6_invalid);
|
|
||||||
OPCODE(0x2b, o6_invalid);
|
|
||||||
/* 2C */
|
/* 2C */
|
||||||
OPCODE(0x2c, o6_invalid);
|
|
||||||
OPCODE(0x2d, o6_invalid);
|
|
||||||
OPCODE(0x2e, o6_invalid);
|
|
||||||
OPCODE(0x2f, o6_invalid);
|
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(0x30, o6_invalid);
|
|
||||||
OPCODE(0x31, o6_invalid);
|
|
||||||
OPCODE(0x32, o6_invalid);
|
|
||||||
OPCODE(0x33, o6_invalid);
|
|
||||||
/* 34 */
|
/* 34 */
|
||||||
OPCODE(0x34, o6_invalid);
|
|
||||||
OPCODE(0x35, o6_invalid);
|
|
||||||
OPCODE(0x36, o6_invalid);
|
|
||||||
OPCODE(0x37, o6_invalid);
|
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(0x38, o6_invalid);
|
|
||||||
OPCODE(0x39, o6_invalid);
|
|
||||||
OPCODE(0x3a, o6_invalid);
|
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_writeByteVar);
|
OPCODE(0x42, o6_writeByteVar);
|
||||||
OPCODE(0x43, o6_writeWordVar);
|
OPCODE(0x43, o6_writeWordVar);
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o6_invalid);
|
|
||||||
OPCODE(0x45, o6_invalid);
|
|
||||||
OPCODE(0x46, o6_byteArrayWrite);
|
OPCODE(0x46, o6_byteArrayWrite);
|
||||||
OPCODE(0x47, o6_wordArrayWrite);
|
OPCODE(0x47, o6_wordArrayWrite);
|
||||||
/* 48 */
|
/* 48 */
|
||||||
OPCODE(0x48, o6_invalid);
|
|
||||||
OPCODE(0x49, o6_invalid);
|
|
||||||
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
||||||
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
||||||
/* 4C */
|
/* 4C */
|
||||||
OPCODE(0x4c, o6_invalid);
|
|
||||||
OPCODE(0x4d, o6_invalid);
|
|
||||||
OPCODE(0x4e, o6_byteVarInc);
|
OPCODE(0x4e, o6_byteVarInc);
|
||||||
OPCODE(0x4f, o6_wordVarInc);
|
OPCODE(0x4f, o6_wordVarInc);
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o6_invalid);
|
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o6_byteArrayInc);
|
OPCODE(0x52, o6_byteArrayInc);
|
||||||
OPCODE(0x53, o6_wordArrayInc);
|
OPCODE(0x53, o6_wordArrayInc);
|
||||||
/* 54 */
|
/* 54 */
|
||||||
OPCODE(0x54, o6_invalid);
|
|
||||||
OPCODE(0x55, o6_invalid);
|
|
||||||
OPCODE(0x56, o6_byteVarDec);
|
OPCODE(0x56, o6_byteVarDec);
|
||||||
OPCODE(0x57, o6_wordVarDec);
|
OPCODE(0x57, o6_wordVarDec);
|
||||||
/* 58 */
|
/* 58 */
|
||||||
OPCODE(0x58, o6_invalid);
|
|
||||||
OPCODE(0x59, o6_invalid);
|
|
||||||
OPCODE(0x5a, o6_byteArrayDec);
|
OPCODE(0x5a, o6_byteArrayDec);
|
||||||
OPCODE(0x5b, o6_wordArrayDec);
|
OPCODE(0x5b, o6_wordArrayDec);
|
||||||
/* 5C */
|
/* 5C */
|
||||||
|
@ -157,9 +102,7 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
OPCODE(0x60, o6_startObject);
|
OPCODE(0x60, o6_startObject);
|
||||||
OPCODE(0x61, o6_drawObject);
|
OPCODE(0x61, o6_drawObject);
|
||||||
OPCODE(0x62, o6_drawObjectAt);
|
OPCODE(0x62, o6_drawObjectAt);
|
||||||
OPCODE(0x63, o6_invalid);
|
|
||||||
/* 64 */
|
/* 64 */
|
||||||
OPCODE(0x64, o6_invalid);
|
|
||||||
OPCODE(0x65, o6_stopObjectCode);
|
OPCODE(0x65, o6_stopObjectCode);
|
||||||
OPCODE(0x66, o6_stopObjectCode);
|
OPCODE(0x66, o6_stopObjectCode);
|
||||||
OPCODE(0x67, o6_endCutscene);
|
OPCODE(0x67, o6_endCutscene);
|
||||||
|
@ -201,11 +144,9 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(0x84, o70_pickupObject);
|
OPCODE(0x84, o70_pickupObject);
|
||||||
OPCODE(0x85, o6_loadRoomWithEgo);
|
OPCODE(0x85, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x86, o6_invalid);
|
|
||||||
OPCODE(0x87, o6_getRandomNumber);
|
OPCODE(0x87, o6_getRandomNumber);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_getRandomNumberRange);
|
OPCODE(0x88, o6_getRandomNumberRange);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o6_getActorMoving);
|
OPCODE(0x8a, o6_getActorMoving);
|
||||||
OPCODE(0x8b, o6_isScriptRunning);
|
OPCODE(0x8b, o6_isScriptRunning);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -226,7 +167,6 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
/* 98 */
|
/* 98 */
|
||||||
OPCODE(0x98, o6_isSoundRunning);
|
OPCODE(0x98, o6_isSoundRunning);
|
||||||
OPCODE(0x99, o6_setBoxFlags);
|
OPCODE(0x99, o6_setBoxFlags);
|
||||||
OPCODE(0x9a, o6_invalid);
|
|
||||||
OPCODE(0x9b, o70_resourceRoutines);
|
OPCODE(0x9b, o70_resourceRoutines);
|
||||||
/* 9C */
|
/* 9C */
|
||||||
OPCODE(0x9c, o60_roomOps);
|
OPCODE(0x9c, o60_roomOps);
|
||||||
|
@ -249,7 +189,6 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
OPCODE(0xaa, o6_getActorScaleX);
|
OPCODE(0xaa, o6_getActorScaleX);
|
||||||
OPCODE(0xab, o6_getActorAnimCounter);
|
OPCODE(0xab, o6_getActorAnimCounter);
|
||||||
/* AC */
|
/* AC */
|
||||||
OPCODE(0xac, o6_invalid);
|
|
||||||
OPCODE(0xad, o6_isAnyOf);
|
OPCODE(0xad, o6_isAnyOf);
|
||||||
OPCODE(0xae, o70_systemOps);
|
OPCODE(0xae, o70_systemOps);
|
||||||
OPCODE(0xaf, o6_isActorInBox);
|
OPCODE(0xaf, o6_isActorInBox);
|
||||||
|
@ -275,9 +214,6 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
OPCODE(0xbf, o6_startScriptQuick2);
|
OPCODE(0xbf, o6_startScriptQuick2);
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o6_dim2dimArray);
|
OPCODE(0xc0, o6_dim2dimArray);
|
||||||
OPCODE(0xc1, o6_invalid);
|
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_abs);
|
OPCODE(0xc4, o6_abs);
|
||||||
OPCODE(0xc5, o6_distObjectObject);
|
OPCODE(0xc5, o6_distObjectObject);
|
||||||
|
@ -291,13 +227,10 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
/* CC */
|
/* CC */
|
||||||
OPCODE(0xcc, o6_pickOneOfDefault);
|
OPCODE(0xcc, o6_pickOneOfDefault);
|
||||||
OPCODE(0xcd, o6_stampObject);
|
OPCODE(0xcd, o6_stampObject);
|
||||||
OPCODE(0xce, o6_invalid);
|
|
||||||
OPCODE(0xcf, o6_invalid);
|
|
||||||
/* D0 */
|
/* D0 */
|
||||||
OPCODE(0xd0, o6_getDateTime);
|
OPCODE(0xd0, o6_getDateTime);
|
||||||
OPCODE(0xd1, o6_stopTalking);
|
OPCODE(0xd1, o6_stopTalking);
|
||||||
OPCODE(0xd2, o6_getAnimateVariable);
|
OPCODE(0xd2, o6_getAnimateVariable);
|
||||||
OPCODE(0xd3, o6_invalid);
|
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_shuffle);
|
OPCODE(0xd4, o6_shuffle);
|
||||||
OPCODE(0xd5, o6_jumpToScript);
|
OPCODE(0xd5, o6_jumpToScript);
|
||||||
|
@ -320,11 +253,7 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
OPCODE(0xe3, o6_pickVarRandom);
|
OPCODE(0xe3, o6_pickVarRandom);
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(0xe4, o6_setBoxSet);
|
OPCODE(0xe4, o6_setBoxSet);
|
||||||
OPCODE(0xe5, o6_invalid);
|
|
||||||
OPCODE(0xe6, o6_invalid);
|
|
||||||
OPCODE(0xe7, o6_invalid);
|
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(0xe8, o6_invalid);
|
|
||||||
OPCODE(0xe9, o60_seekFilePos);
|
OPCODE(0xe9, o60_seekFilePos);
|
||||||
OPCODE(0xea, o60_redimArray);
|
OPCODE(0xea, o60_redimArray);
|
||||||
OPCODE(0xeb, o60_readFilePos);
|
OPCODE(0xeb, o60_readFilePos);
|
||||||
|
@ -344,15 +273,11 @@ void ScummEngine_v71he::setupOpcodes() {
|
||||||
OPCODE(0xf6, o71_getCharIndexInString);
|
OPCODE(0xf6, o71_getCharIndexInString);
|
||||||
OPCODE(0xf7, o71_findBox);
|
OPCODE(0xf7, o71_findBox);
|
||||||
/* F8 */
|
/* F8 */
|
||||||
OPCODE(0xf8, o6_invalid);
|
|
||||||
OPCODE(0xf9, o70_createDirectory);
|
OPCODE(0xf9, o70_createDirectory);
|
||||||
OPCODE(0xfa, o70_setSystemMessage);
|
OPCODE(0xfa, o70_setSystemMessage);
|
||||||
OPCODE(0xfb, o71_polygonOps);
|
OPCODE(0xfb, o71_polygonOps);
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o71_polygonHit);
|
OPCODE(0xfc, o71_polygonHit);
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
byte *ScummEngine_v71he::heFindResourceData(uint32 tag, byte *ptr) {
|
byte *ScummEngine_v71he::heFindResourceData(uint32 tag, byte *ptr) {
|
||||||
|
|
|
@ -52,13 +52,8 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
OPCODE(0x03, o6_pushWordVar);
|
OPCODE(0x03, o6_pushWordVar);
|
||||||
/* 04 */
|
/* 04 */
|
||||||
OPCODE(0x04, o72_getScriptString);
|
OPCODE(0x04, o72_getScriptString);
|
||||||
OPCODE(0x05, o6_invalid);
|
|
||||||
OPCODE(0x06, o6_invalid);
|
|
||||||
OPCODE(0x07, o6_wordArrayRead);
|
OPCODE(0x07, o6_wordArrayRead);
|
||||||
/* 08 */
|
/* 08 */
|
||||||
OPCODE(0x08, o6_invalid);
|
|
||||||
OPCODE(0x09, o6_invalid);
|
|
||||||
OPCODE(0x0a, o6_invalid);
|
|
||||||
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
||||||
/* 0C */
|
/* 0C */
|
||||||
OPCODE(0x0c, o6_dup);
|
OPCODE(0x0c, o6_dup);
|
||||||
|
@ -81,73 +76,24 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
OPCODE(0x1a, o6_pop);
|
OPCODE(0x1a, o6_pop);
|
||||||
OPCODE(0x1b, o72_isAnyOf);
|
OPCODE(0x1b, o72_isAnyOf);
|
||||||
/* 1C */
|
/* 1C */
|
||||||
OPCODE(0x1c, o6_invalid);
|
|
||||||
OPCODE(0x1d, o6_invalid);
|
|
||||||
OPCODE(0x1e, o6_invalid);
|
|
||||||
OPCODE(0x1f, o6_invalid);
|
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(0x20, o6_invalid);
|
|
||||||
OPCODE(0x21, o6_invalid);
|
|
||||||
OPCODE(0x22, o6_invalid);
|
|
||||||
OPCODE(0x23, o6_invalid);
|
|
||||||
/* 24 */
|
/* 24 */
|
||||||
OPCODE(0x24, o6_invalid);
|
|
||||||
OPCODE(0x25, o6_invalid);
|
|
||||||
OPCODE(0x26, o6_invalid);
|
|
||||||
OPCODE(0x27, o6_invalid);
|
|
||||||
/* 28 */
|
/* 28 */
|
||||||
OPCODE(0x28, o6_invalid);
|
|
||||||
OPCODE(0x29, o6_invalid);
|
|
||||||
OPCODE(0x2a, o6_invalid);
|
|
||||||
OPCODE(0x2b, o6_invalid);
|
|
||||||
/* 2C */
|
/* 2C */
|
||||||
OPCODE(0x2c, o6_invalid);
|
|
||||||
OPCODE(0x2d, o6_invalid);
|
|
||||||
OPCODE(0x2e, o6_invalid);
|
|
||||||
OPCODE(0x2f, o6_invalid);
|
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(0x30, o6_invalid);
|
|
||||||
OPCODE(0x31, o6_invalid);
|
|
||||||
OPCODE(0x32, o6_invalid);
|
|
||||||
OPCODE(0x33, o6_invalid);
|
|
||||||
/* 34 */
|
/* 34 */
|
||||||
OPCODE(0x34, o6_invalid);
|
|
||||||
OPCODE(0x35, o6_invalid);
|
|
||||||
OPCODE(0x36, o6_invalid);
|
|
||||||
OPCODE(0x37, o6_invalid);
|
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(0x38, o6_invalid);
|
|
||||||
OPCODE(0x39, o6_invalid);
|
|
||||||
OPCODE(0x3a, o6_invalid);
|
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_invalid);
|
|
||||||
OPCODE(0x43, o6_writeWordVar);
|
OPCODE(0x43, o6_writeWordVar);
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o6_invalid);
|
|
||||||
OPCODE(0x45, o6_invalid);
|
|
||||||
OPCODE(0x46, o6_invalid);
|
|
||||||
OPCODE(0x47, o6_wordArrayWrite);
|
OPCODE(0x47, o6_wordArrayWrite);
|
||||||
/* 48 */
|
/* 48 */
|
||||||
OPCODE(0x48, o6_invalid);
|
|
||||||
OPCODE(0x49, o6_invalid);
|
|
||||||
OPCODE(0x4a, o6_invalid);
|
|
||||||
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
||||||
/* 4C */
|
/* 4C */
|
||||||
OPCODE(0x4c, o6_invalid);
|
|
||||||
OPCODE(0x4d, o6_invalid);
|
|
||||||
OPCODE(0x4e, o6_invalid);
|
|
||||||
OPCODE(0x4f, o6_wordVarInc);
|
OPCODE(0x4f, o6_wordVarInc);
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o72_resetCutscene);
|
OPCODE(0x50, o72_resetCutscene);
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o72_findObjectWithClassOf);
|
OPCODE(0x52, o72_findObjectWithClassOf);
|
||||||
OPCODE(0x53, o6_wordArrayInc);
|
OPCODE(0x53, o6_wordArrayInc);
|
||||||
/* 54 */
|
/* 54 */
|
||||||
|
@ -213,11 +159,9 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(0x84, o70_pickupObject);
|
OPCODE(0x84, o70_pickupObject);
|
||||||
OPCODE(0x85, o6_loadRoomWithEgo);
|
OPCODE(0x85, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x86, o6_invalid);
|
|
||||||
OPCODE(0x87, o6_getRandomNumber);
|
OPCODE(0x87, o6_getRandomNumber);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_getRandomNumberRange);
|
OPCODE(0x88, o6_getRandomNumberRange);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o6_getActorMoving);
|
OPCODE(0x8a, o6_getActorMoving);
|
||||||
OPCODE(0x8b, o6_isScriptRunning);
|
OPCODE(0x8b, o6_isScriptRunning);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -234,11 +178,9 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
OPCODE(0x94, o6_getVerbFromXY);
|
OPCODE(0x94, o6_getVerbFromXY);
|
||||||
OPCODE(0x95, o6_beginOverride);
|
OPCODE(0x95, o6_beginOverride);
|
||||||
OPCODE(0x96, o6_endOverride);
|
OPCODE(0x96, o6_endOverride);
|
||||||
OPCODE(0x97, o6_invalid);
|
|
||||||
/* 98 */
|
/* 98 */
|
||||||
OPCODE(0x98, o6_isSoundRunning);
|
OPCODE(0x98, o6_isSoundRunning);
|
||||||
OPCODE(0x99, o6_setBoxFlags);
|
OPCODE(0x99, o6_setBoxFlags);
|
||||||
OPCODE(0x9a, o6_invalid);
|
|
||||||
OPCODE(0x9b, o70_resourceRoutines);
|
OPCODE(0x9b, o70_resourceRoutines);
|
||||||
/* 9C */
|
/* 9C */
|
||||||
OPCODE(0x9c, o72_roomOps);
|
OPCODE(0x9c, o72_roomOps);
|
||||||
|
@ -261,7 +203,6 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
OPCODE(0xaa, o6_getActorScaleX);
|
OPCODE(0xaa, o6_getActorScaleX);
|
||||||
OPCODE(0xab, o6_getActorAnimCounter);
|
OPCODE(0xab, o6_getActorAnimCounter);
|
||||||
/* AC */
|
/* AC */
|
||||||
OPCODE(0xac, o6_invalid);
|
|
||||||
OPCODE(0xad, o6_isAnyOf);
|
OPCODE(0xad, o6_isAnyOf);
|
||||||
OPCODE(0xae, o72_systemOps);
|
OPCODE(0xae, o72_systemOps);
|
||||||
OPCODE(0xaf, o6_isActorInBox);
|
OPCODE(0xaf, o6_isActorInBox);
|
||||||
|
@ -288,8 +229,6 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o72_dim2dimArray);
|
OPCODE(0xc0, o72_dim2dimArray);
|
||||||
OPCODE(0xc1, o72_traceStatus);
|
OPCODE(0xc1, o72_traceStatus);
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_abs);
|
OPCODE(0xc4, o6_abs);
|
||||||
OPCODE(0xc5, o6_distObjectObject);
|
OPCODE(0xc5, o6_distObjectObject);
|
||||||
|
@ -309,7 +248,6 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
OPCODE(0xd0, o6_getDateTime);
|
OPCODE(0xd0, o6_getDateTime);
|
||||||
OPCODE(0xd1, o6_stopTalking);
|
OPCODE(0xd1, o6_stopTalking);
|
||||||
OPCODE(0xd2, o6_getAnimateVariable);
|
OPCODE(0xd2, o6_getAnimateVariable);
|
||||||
OPCODE(0xd3, o6_invalid);
|
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_shuffle);
|
OPCODE(0xd4, o6_shuffle);
|
||||||
OPCODE(0xd5, o72_jumpToScript);
|
OPCODE(0xd5, o72_jumpToScript);
|
||||||
|
@ -332,11 +270,7 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
OPCODE(0xe3, o72_pickVarRandom);
|
OPCODE(0xe3, o72_pickVarRandom);
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(0xe4, o6_setBoxSet);
|
OPCODE(0xe4, o6_setBoxSet);
|
||||||
OPCODE(0xe5, o6_invalid);
|
|
||||||
OPCODE(0xe6, o6_invalid);
|
|
||||||
OPCODE(0xe7, o6_invalid);
|
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(0xe8, o6_invalid);
|
|
||||||
OPCODE(0xe9, o60_seekFilePos);
|
OPCODE(0xe9, o60_seekFilePos);
|
||||||
OPCODE(0xea, o72_redimArray);
|
OPCODE(0xea, o72_redimArray);
|
||||||
OPCODE(0xeb, o60_readFilePos);
|
OPCODE(0xeb, o60_readFilePos);
|
||||||
|
@ -362,9 +296,6 @@ void ScummEngine_v72he::setupOpcodes() {
|
||||||
OPCODE(0xfb, o71_polygonOps);
|
OPCODE(0xfb, o71_polygonOps);
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o71_polygonHit);
|
OPCODE(0xfc, o71_polygonHit);
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int arrayDataSizes[] = { 0, 1, 4, 8, 8, 16, 32 };
|
static const int arrayDataSizes[] = { 0, 1, 4, 8, 8, 16, 32 };
|
||||||
|
|
|
@ -49,13 +49,8 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0x03, o6_pushWordVar);
|
OPCODE(0x03, o6_pushWordVar);
|
||||||
/* 04 */
|
/* 04 */
|
||||||
OPCODE(0x04, o72_getScriptString);
|
OPCODE(0x04, o72_getScriptString);
|
||||||
OPCODE(0x05, o6_invalid);
|
|
||||||
OPCODE(0x06, o6_invalid);
|
|
||||||
OPCODE(0x07, o6_wordArrayRead);
|
OPCODE(0x07, o6_wordArrayRead);
|
||||||
/* 08 */
|
/* 08 */
|
||||||
OPCODE(0x08, o6_invalid);
|
|
||||||
OPCODE(0x09, o6_invalid);
|
|
||||||
OPCODE(0x0a, o6_invalid);
|
|
||||||
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
||||||
/* 0C */
|
/* 0C */
|
||||||
OPCODE(0x0c, o6_dup);
|
OPCODE(0x0c, o6_dup);
|
||||||
|
@ -78,57 +73,17 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0x1a, o6_pop);
|
OPCODE(0x1a, o6_pop);
|
||||||
OPCODE(0x1b, o72_isAnyOf);
|
OPCODE(0x1b, o72_isAnyOf);
|
||||||
/* 1C */
|
/* 1C */
|
||||||
OPCODE(0x1c, o6_invalid);
|
|
||||||
OPCODE(0x1d, o6_invalid);
|
|
||||||
OPCODE(0x1e, o6_invalid);
|
|
||||||
OPCODE(0x1f, o6_invalid);
|
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(0x20, o6_invalid);
|
|
||||||
OPCODE(0x21, o6_invalid);
|
|
||||||
OPCODE(0x22, o6_invalid);
|
|
||||||
OPCODE(0x23, o6_invalid);
|
|
||||||
/* 24 */
|
/* 24 */
|
||||||
OPCODE(0x24, o6_invalid);
|
|
||||||
OPCODE(0x25, o6_invalid);
|
|
||||||
OPCODE(0x26, o6_invalid);
|
|
||||||
OPCODE(0x27, o6_invalid);
|
|
||||||
/* 28 */
|
/* 28 */
|
||||||
OPCODE(0x28, o6_invalid);
|
|
||||||
OPCODE(0x29, o6_invalid);
|
|
||||||
OPCODE(0x2a, o6_invalid);
|
|
||||||
OPCODE(0x2b, o6_invalid);
|
|
||||||
/* 2C */
|
/* 2C */
|
||||||
OPCODE(0x2c, o6_invalid);
|
|
||||||
OPCODE(0x2d, o6_invalid);
|
|
||||||
OPCODE(0x2e, o6_invalid);
|
|
||||||
OPCODE(0x2f, o6_invalid);
|
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(0x30, o6_invalid);
|
|
||||||
OPCODE(0x31, o6_invalid);
|
|
||||||
OPCODE(0x32, o6_invalid);
|
|
||||||
OPCODE(0x33, o6_invalid);
|
|
||||||
/* 34 */
|
/* 34 */
|
||||||
OPCODE(0x34, o6_invalid);
|
|
||||||
OPCODE(0x35, o6_invalid);
|
|
||||||
OPCODE(0x36, o6_invalid);
|
|
||||||
OPCODE(0x37, o6_invalid);
|
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(0x38, o6_invalid);
|
|
||||||
OPCODE(0x39, o6_invalid);
|
|
||||||
OPCODE(0x3a, o6_invalid);
|
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_invalid);
|
|
||||||
OPCODE(0x43, o6_writeWordVar);
|
OPCODE(0x43, o6_writeWordVar);
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o6_invalid);
|
|
||||||
OPCODE(0x45, o80_createSound);
|
OPCODE(0x45, o80_createSound);
|
||||||
OPCODE(0x46, o80_getFileSize);
|
OPCODE(0x46, o80_getFileSize);
|
||||||
OPCODE(0x47, o6_wordArrayWrite);
|
OPCODE(0x47, o6_wordArrayWrite);
|
||||||
|
@ -144,7 +99,6 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0x4f, o6_wordVarInc);
|
OPCODE(0x4f, o6_wordVarInc);
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o72_resetCutscene);
|
OPCODE(0x50, o72_resetCutscene);
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o72_findObjectWithClassOf);
|
OPCODE(0x52, o72_findObjectWithClassOf);
|
||||||
OPCODE(0x53, o6_wordArrayInc);
|
OPCODE(0x53, o6_wordArrayInc);
|
||||||
/* 54 */
|
/* 54 */
|
||||||
|
@ -174,7 +128,6 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0x67, o6_endCutscene);
|
OPCODE(0x67, o6_endCutscene);
|
||||||
/* 68 */
|
/* 68 */
|
||||||
OPCODE(0x68, o6_cutscene);
|
OPCODE(0x68, o6_cutscene);
|
||||||
OPCODE(0x69, o6_invalid);
|
|
||||||
OPCODE(0x6a, o6_freezeUnfreeze);
|
OPCODE(0x6a, o6_freezeUnfreeze);
|
||||||
OPCODE(0x6b, o80_cursorCommand);
|
OPCODE(0x6b, o80_cursorCommand);
|
||||||
/* 6C */
|
/* 6C */
|
||||||
|
@ -190,7 +143,6 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
/* 74 */
|
/* 74 */
|
||||||
OPCODE(0x74, o70_startSound);
|
OPCODE(0x74, o70_startSound);
|
||||||
OPCODE(0x75, o6_stopSound);
|
OPCODE(0x75, o6_stopSound);
|
||||||
OPCODE(0x76, o6_invalid);
|
|
||||||
OPCODE(0x77, o6_stopObjectScript);
|
OPCODE(0x77, o6_stopObjectScript);
|
||||||
/* 78 */
|
/* 78 */
|
||||||
OPCODE(0x78, o6_panCameraTo);
|
OPCODE(0x78, o6_panCameraTo);
|
||||||
|
@ -210,11 +162,9 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(0x84, o70_pickupObject);
|
OPCODE(0x84, o70_pickupObject);
|
||||||
OPCODE(0x85, o6_loadRoomWithEgo);
|
OPCODE(0x85, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x86, o6_invalid);
|
|
||||||
OPCODE(0x87, o6_getRandomNumber);
|
OPCODE(0x87, o6_getRandomNumber);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_getRandomNumberRange);
|
OPCODE(0x88, o6_getRandomNumberRange);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o6_getActorMoving);
|
OPCODE(0x8a, o6_getActorMoving);
|
||||||
OPCODE(0x8b, o6_isScriptRunning);
|
OPCODE(0x8b, o6_isScriptRunning);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -228,19 +178,15 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0x92, o6_findInventory);
|
OPCODE(0x92, o6_findInventory);
|
||||||
OPCODE(0x93, o6_getInventoryCount);
|
OPCODE(0x93, o6_getInventoryCount);
|
||||||
/* 94 */
|
/* 94 */
|
||||||
OPCODE(0x94, o6_invalid);
|
|
||||||
OPCODE(0x95, o6_beginOverride);
|
OPCODE(0x95, o6_beginOverride);
|
||||||
OPCODE(0x96, o6_endOverride);
|
OPCODE(0x96, o6_endOverride);
|
||||||
OPCODE(0x97, o6_invalid);
|
|
||||||
/* 98 */
|
/* 98 */
|
||||||
OPCODE(0x98, o6_isSoundRunning);
|
OPCODE(0x98, o6_isSoundRunning);
|
||||||
OPCODE(0x99, o6_setBoxFlags);
|
OPCODE(0x99, o6_setBoxFlags);
|
||||||
OPCODE(0x9a, o6_invalid);
|
|
||||||
OPCODE(0x9b, o70_resourceRoutines);
|
OPCODE(0x9b, o70_resourceRoutines);
|
||||||
/* 9C */
|
/* 9C */
|
||||||
OPCODE(0x9c, o72_roomOps);
|
OPCODE(0x9c, o72_roomOps);
|
||||||
OPCODE(0x9d, o72_actorOps);
|
OPCODE(0x9d, o72_actorOps);
|
||||||
OPCODE(0x9e, o6_invalid);
|
|
||||||
OPCODE(0x9f, o6_getActorFromXY);
|
OPCODE(0x9f, o6_getActorFromXY);
|
||||||
/* A0 */
|
/* A0 */
|
||||||
OPCODE(0xa0, o72_findObject);
|
OPCODE(0xa0, o72_findObject);
|
||||||
|
@ -249,7 +195,6 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0xa3, o6_getVerbEntrypoint);
|
OPCODE(0xa3, o6_getVerbEntrypoint);
|
||||||
/* A4 */
|
/* A4 */
|
||||||
OPCODE(0xa4, o72_arrayOps);
|
OPCODE(0xa4, o72_arrayOps);
|
||||||
OPCODE(0xa5, o6_invalid);
|
|
||||||
OPCODE(0xa6, o6_drawBox);
|
OPCODE(0xa6, o6_drawBox);
|
||||||
OPCODE(0xa7, o6_pop);
|
OPCODE(0xa7, o6_pop);
|
||||||
/* A8 */
|
/* A8 */
|
||||||
|
@ -285,8 +230,6 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o72_dim2dimArray);
|
OPCODE(0xc0, o72_dim2dimArray);
|
||||||
OPCODE(0xc1, o72_traceStatus);
|
OPCODE(0xc1, o72_traceStatus);
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_abs);
|
OPCODE(0xc4, o6_abs);
|
||||||
OPCODE(0xc5, o6_distObjectObject);
|
OPCODE(0xc5, o6_distObjectObject);
|
||||||
|
@ -306,7 +249,6 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0xd0, o6_getDateTime);
|
OPCODE(0xd0, o6_getDateTime);
|
||||||
OPCODE(0xd1, o6_stopTalking);
|
OPCODE(0xd1, o6_stopTalking);
|
||||||
OPCODE(0xd2, o6_getAnimateVariable);
|
OPCODE(0xd2, o6_getAnimateVariable);
|
||||||
OPCODE(0xd3, o6_invalid);
|
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_shuffle);
|
OPCODE(0xd4, o6_shuffle);
|
||||||
OPCODE(0xd5, o72_jumpToScript);
|
OPCODE(0xd5, o72_jumpToScript);
|
||||||
|
@ -329,11 +271,7 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0xe3, o80_pickVarRandom);
|
OPCODE(0xe3, o80_pickVarRandom);
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(0xe4, o6_setBoxSet);
|
OPCODE(0xe4, o6_setBoxSet);
|
||||||
OPCODE(0xe5, o6_invalid);
|
|
||||||
OPCODE(0xe6, o6_invalid);
|
|
||||||
OPCODE(0xe7, o6_invalid);
|
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(0xe8, o6_invalid);
|
|
||||||
OPCODE(0xe9, o60_seekFilePos);
|
OPCODE(0xe9, o60_seekFilePos);
|
||||||
OPCODE(0xea, o72_redimArray);
|
OPCODE(0xea, o72_redimArray);
|
||||||
OPCODE(0xeb, o60_readFilePos);
|
OPCODE(0xeb, o60_readFilePos);
|
||||||
|
@ -359,9 +297,6 @@ void ScummEngine_v80he::setupOpcodes() {
|
||||||
OPCODE(0xfb, o71_polygonOps);
|
OPCODE(0xfb, o71_polygonOps);
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o71_polygonHit);
|
OPCODE(0xfc, o71_polygonHit);
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,12 +48,8 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0x03, o6_pushWordVar);
|
OPCODE(0x03, o6_pushWordVar);
|
||||||
/* 04 */
|
/* 04 */
|
||||||
OPCODE(0x04, o72_getScriptString);
|
OPCODE(0x04, o72_getScriptString);
|
||||||
OPCODE(0x05, o6_invalid);
|
|
||||||
OPCODE(0x06, o6_invalid);
|
|
||||||
OPCODE(0x07, o6_wordArrayRead);
|
OPCODE(0x07, o6_wordArrayRead);
|
||||||
/* 08 */
|
/* 08 */
|
||||||
OPCODE(0x08, o6_invalid);
|
|
||||||
OPCODE(0x09, o6_invalid);
|
|
||||||
OPCODE(0x0a, o90_dup_n);
|
OPCODE(0x0a, o90_dup_n);
|
||||||
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
||||||
/* 0C */
|
/* 0C */
|
||||||
|
@ -115,16 +111,8 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0x38, o90_redim2dimArray);
|
OPCODE(0x38, o90_redim2dimArray);
|
||||||
OPCODE(0x39, o90_getLinesIntersectionPoint);
|
OPCODE(0x39, o90_getLinesIntersectionPoint);
|
||||||
OPCODE(0x3a, o90_sortArray);
|
OPCODE(0x3a, o90_sortArray);
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_invalid);
|
|
||||||
OPCODE(0x43, o6_writeWordVar);
|
OPCODE(0x43, o6_writeWordVar);
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o90_getObjectData);
|
OPCODE(0x44, o90_getObjectData);
|
||||||
|
@ -143,7 +131,6 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0x4f, o6_wordVarInc);
|
OPCODE(0x4f, o6_wordVarInc);
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o72_resetCutscene);
|
OPCODE(0x50, o72_resetCutscene);
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o72_findObjectWithClassOf);
|
OPCODE(0x52, o72_findObjectWithClassOf);
|
||||||
OPCODE(0x53, o6_wordArrayInc);
|
OPCODE(0x53, o6_wordArrayInc);
|
||||||
/* 54 */
|
/* 54 */
|
||||||
|
@ -173,7 +160,6 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0x67, o6_endCutscene);
|
OPCODE(0x67, o6_endCutscene);
|
||||||
/* 68 */
|
/* 68 */
|
||||||
OPCODE(0x68, o6_cutscene);
|
OPCODE(0x68, o6_cutscene);
|
||||||
OPCODE(0x69, o6_invalid);
|
|
||||||
OPCODE(0x6a, o6_freezeUnfreeze);
|
OPCODE(0x6a, o6_freezeUnfreeze);
|
||||||
OPCODE(0x6b, o80_cursorCommand);
|
OPCODE(0x6b, o80_cursorCommand);
|
||||||
/* 6C */
|
/* 6C */
|
||||||
|
@ -189,7 +175,6 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
/* 74 */
|
/* 74 */
|
||||||
OPCODE(0x74, o70_startSound);
|
OPCODE(0x74, o70_startSound);
|
||||||
OPCODE(0x75, o6_stopSound);
|
OPCODE(0x75, o6_stopSound);
|
||||||
OPCODE(0x76, o6_invalid);
|
|
||||||
OPCODE(0x77, o6_stopObjectScript);
|
OPCODE(0x77, o6_stopObjectScript);
|
||||||
/* 78 */
|
/* 78 */
|
||||||
OPCODE(0x78, o6_panCameraTo);
|
OPCODE(0x78, o6_panCameraTo);
|
||||||
|
@ -209,11 +194,9 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(0x84, o70_pickupObject);
|
OPCODE(0x84, o70_pickupObject);
|
||||||
OPCODE(0x85, o6_loadRoomWithEgo);
|
OPCODE(0x85, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x86, o6_invalid);
|
|
||||||
OPCODE(0x87, o6_getRandomNumber);
|
OPCODE(0x87, o6_getRandomNumber);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_getRandomNumberRange);
|
OPCODE(0x88, o6_getRandomNumberRange);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o6_getActorMoving);
|
OPCODE(0x8a, o6_getActorMoving);
|
||||||
OPCODE(0x8b, o6_isScriptRunning);
|
OPCODE(0x8b, o6_isScriptRunning);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -230,11 +213,9 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0x94, o90_getPaletteData);
|
OPCODE(0x94, o90_getPaletteData);
|
||||||
OPCODE(0x95, o6_beginOverride);
|
OPCODE(0x95, o6_beginOverride);
|
||||||
OPCODE(0x96, o6_endOverride);
|
OPCODE(0x96, o6_endOverride);
|
||||||
OPCODE(0x97, o6_invalid);
|
|
||||||
/* 98 */
|
/* 98 */
|
||||||
OPCODE(0x98, o6_isSoundRunning);
|
OPCODE(0x98, o6_isSoundRunning);
|
||||||
OPCODE(0x99, o6_setBoxFlags);
|
OPCODE(0x99, o6_setBoxFlags);
|
||||||
OPCODE(0x9a, o6_invalid);
|
|
||||||
OPCODE(0x9b, o70_resourceRoutines);
|
OPCODE(0x9b, o70_resourceRoutines);
|
||||||
/* 9C */
|
/* 9C */
|
||||||
OPCODE(0x9c, o72_roomOps);
|
OPCODE(0x9c, o72_roomOps);
|
||||||
|
@ -284,8 +265,6 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o72_dim2dimArray);
|
OPCODE(0xc0, o72_dim2dimArray);
|
||||||
OPCODE(0xc1, o72_traceStatus);
|
OPCODE(0xc1, o72_traceStatus);
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_abs);
|
OPCODE(0xc4, o6_abs);
|
||||||
OPCODE(0xc5, o6_distObjectObject);
|
OPCODE(0xc5, o6_distObjectObject);
|
||||||
|
@ -305,7 +284,6 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0xd0, o6_getDateTime);
|
OPCODE(0xd0, o6_getDateTime);
|
||||||
OPCODE(0xd1, o6_stopTalking);
|
OPCODE(0xd1, o6_stopTalking);
|
||||||
OPCODE(0xd2, o6_getAnimateVariable);
|
OPCODE(0xd2, o6_getAnimateVariable);
|
||||||
OPCODE(0xd3, o6_invalid);
|
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_shuffle);
|
OPCODE(0xd4, o6_shuffle);
|
||||||
OPCODE(0xd5, o72_jumpToScript);
|
OPCODE(0xd5, o72_jumpToScript);
|
||||||
|
@ -328,11 +306,7 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0xe3, o80_pickVarRandom);
|
OPCODE(0xe3, o80_pickVarRandom);
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(0xe4, o6_setBoxSet);
|
OPCODE(0xe4, o6_setBoxSet);
|
||||||
OPCODE(0xe5, o6_invalid);
|
|
||||||
OPCODE(0xe6, o6_invalid);
|
|
||||||
OPCODE(0xe7, o6_invalid);
|
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(0xe8, o6_invalid);
|
|
||||||
OPCODE(0xe9, o60_seekFilePos);
|
OPCODE(0xe9, o60_seekFilePos);
|
||||||
OPCODE(0xea, o72_redimArray);
|
OPCODE(0xea, o72_redimArray);
|
||||||
OPCODE(0xeb, o60_readFilePos);
|
OPCODE(0xeb, o60_readFilePos);
|
||||||
|
@ -358,9 +332,6 @@ void ScummEngine_v90he::setupOpcodes() {
|
||||||
OPCODE(0xfb, o71_polygonOps);
|
OPCODE(0xfb, o71_polygonOps);
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o71_polygonHit);
|
OPCODE(0xfc, o71_polygonHit);
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v90he::o90_dup_n() {
|
void ScummEngine_v90he::o90_dup_n() {
|
||||||
|
|
|
@ -445,14 +445,14 @@ void ScummEngine::getScriptEntryPoint() {
|
||||||
_scriptPointer = _scriptOrgPointer + vm.slot[_currentScript].offs;
|
_scriptPointer = _scriptOrgPointer + vm.slot[_currentScript].offs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Execute a script - Read opcode, and execute it from the table */
|
/** Execute a script - Read opcode, and execute it from the table */
|
||||||
void ScummEngine::executeScript() {
|
void ScummEngine::executeScript() {
|
||||||
int c;
|
int c;
|
||||||
while (_currentScript != 0xFF) {
|
while (_currentScript != 0xFF) {
|
||||||
|
|
||||||
if (_showStack == 1) {
|
if (_showStack == 1) {
|
||||||
printf("Stack:");
|
printf("Stack:");
|
||||||
for (c=0; c < _scummStackPos; c++) {
|
for (c = 0; c < _scummStackPos; c++) {
|
||||||
printf(" %d", _vmStack[c]);
|
printf(" %d", _vmStack[c]);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -466,7 +466,7 @@ void ScummEngine::executeScript() {
|
||||||
_opcode,
|
_opcode,
|
||||||
getOpcodeDesc(_opcode));
|
getOpcodeDesc(_opcode));
|
||||||
if (_hexdumpScripts == true) {
|
if (_hexdumpScripts == true) {
|
||||||
for (c= -1; c < 15; c++) {
|
for (c = -1; c < 15; c++) {
|
||||||
printf(" %02x", *(_scriptPointer + c));
|
printf(" %02x", *(_scriptPointer + c));
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -478,8 +478,11 @@ void ScummEngine::executeScript() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine::executeOpcode(byte i) {
|
void ScummEngine::executeOpcode(byte i) {
|
||||||
assert(_opcodes[i].proc && _opcodes[i].proc->isValid());
|
if (_opcodes[i].proc && _opcodes[i].proc->isValid())
|
||||||
(*_opcodes[i].proc)();
|
(*_opcodes[i].proc)();
|
||||||
|
else {
|
||||||
|
error("Invalid opcode '%x' at %lx", i, (long)(_scriptPointer - _scriptOrgPointer));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ScummEngine::getOpcodeDesc(byte i) {
|
const char *ScummEngine::getOpcodeDesc(byte i) {
|
||||||
|
|
|
@ -58,13 +58,9 @@ void ScummEngine_v6::setupOpcodes() {
|
||||||
OPCODE(0x02, o6_pushByteVar);
|
OPCODE(0x02, o6_pushByteVar);
|
||||||
OPCODE(0x03, o6_pushWordVar);
|
OPCODE(0x03, o6_pushWordVar);
|
||||||
/* 04 */
|
/* 04 */
|
||||||
OPCODE(0x04, o6_invalid);
|
|
||||||
OPCODE(0x05, o6_invalid);
|
|
||||||
OPCODE(0x06, o6_byteArrayRead);
|
OPCODE(0x06, o6_byteArrayRead);
|
||||||
OPCODE(0x07, o6_wordArrayRead);
|
OPCODE(0x07, o6_wordArrayRead);
|
||||||
/* 08 */
|
/* 08 */
|
||||||
OPCODE(0x08, o6_invalid);
|
|
||||||
OPCODE(0x09, o6_invalid);
|
|
||||||
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
OPCODE(0x0a, o6_byteArrayIndexedRead);
|
||||||
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
OPCODE(0x0b, o6_wordArrayIndexedRead);
|
||||||
/* 0C */
|
/* 0C */
|
||||||
|
@ -86,85 +82,34 @@ void ScummEngine_v6::setupOpcodes() {
|
||||||
OPCODE(0x18, o6_land);
|
OPCODE(0x18, o6_land);
|
||||||
OPCODE(0x19, o6_lor);
|
OPCODE(0x19, o6_lor);
|
||||||
OPCODE(0x1a, o6_pop);
|
OPCODE(0x1a, o6_pop);
|
||||||
OPCODE(0x1b, o6_invalid);
|
|
||||||
/* 1C */
|
/* 1C */
|
||||||
OPCODE(0x1c, o6_invalid);
|
|
||||||
OPCODE(0x1d, o6_invalid);
|
|
||||||
OPCODE(0x1e, o6_invalid);
|
|
||||||
OPCODE(0x1f, o6_invalid);
|
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(0x20, o6_invalid);
|
|
||||||
OPCODE(0x21, o6_invalid);
|
|
||||||
OPCODE(0x22, o6_invalid);
|
|
||||||
OPCODE(0x23, o6_invalid);
|
|
||||||
/* 24 */
|
/* 24 */
|
||||||
OPCODE(0x24, o6_invalid);
|
|
||||||
OPCODE(0x25, o6_invalid);
|
|
||||||
OPCODE(0x26, o6_invalid);
|
|
||||||
OPCODE(0x27, o6_invalid);
|
|
||||||
/* 28 */
|
/* 28 */
|
||||||
OPCODE(0x28, o6_invalid);
|
|
||||||
OPCODE(0x29, o6_invalid);
|
|
||||||
OPCODE(0x2a, o6_invalid);
|
|
||||||
OPCODE(0x2b, o6_invalid);
|
|
||||||
/* 2C */
|
/* 2C */
|
||||||
OPCODE(0x2c, o6_invalid);
|
|
||||||
OPCODE(0x2d, o6_invalid);
|
|
||||||
OPCODE(0x2e, o6_invalid);
|
|
||||||
OPCODE(0x2f, o6_invalid);
|
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(0x30, o6_invalid);
|
|
||||||
OPCODE(0x31, o6_invalid);
|
|
||||||
OPCODE(0x32, o6_invalid);
|
|
||||||
OPCODE(0x33, o6_invalid);
|
|
||||||
/* 34 */
|
/* 34 */
|
||||||
OPCODE(0x34, o6_invalid);
|
|
||||||
OPCODE(0x35, o6_invalid);
|
|
||||||
OPCODE(0x36, o6_invalid);
|
|
||||||
OPCODE(0x37, o6_invalid);
|
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(0x38, o6_invalid);
|
|
||||||
OPCODE(0x39, o6_invalid);
|
|
||||||
OPCODE(0x3a, o6_invalid);
|
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_writeByteVar);
|
OPCODE(0x42, o6_writeByteVar);
|
||||||
OPCODE(0x43, o6_writeWordVar);
|
OPCODE(0x43, o6_writeWordVar);
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o6_invalid);
|
|
||||||
OPCODE(0x45, o6_invalid);
|
|
||||||
OPCODE(0x46, o6_byteArrayWrite);
|
OPCODE(0x46, o6_byteArrayWrite);
|
||||||
OPCODE(0x47, o6_wordArrayWrite);
|
OPCODE(0x47, o6_wordArrayWrite);
|
||||||
/* 48 */
|
/* 48 */
|
||||||
OPCODE(0x48, o6_invalid);
|
|
||||||
OPCODE(0x49, o6_invalid);
|
|
||||||
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
OPCODE(0x4a, o6_byteArrayIndexedWrite);
|
||||||
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
OPCODE(0x4b, o6_wordArrayIndexedWrite);
|
||||||
/* 4C */
|
/* 4C */
|
||||||
OPCODE(0x4c, o6_invalid);
|
|
||||||
OPCODE(0x4d, o6_invalid);
|
|
||||||
OPCODE(0x4e, o6_byteVarInc);
|
OPCODE(0x4e, o6_byteVarInc);
|
||||||
OPCODE(0x4f, o6_wordVarInc);
|
OPCODE(0x4f, o6_wordVarInc);
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o6_invalid);
|
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o6_byteArrayInc);
|
OPCODE(0x52, o6_byteArrayInc);
|
||||||
OPCODE(0x53, o6_wordArrayInc);
|
OPCODE(0x53, o6_wordArrayInc);
|
||||||
/* 54 */
|
/* 54 */
|
||||||
OPCODE(0x54, o6_invalid);
|
|
||||||
OPCODE(0x55, o6_invalid);
|
|
||||||
OPCODE(0x56, o6_byteVarDec);
|
OPCODE(0x56, o6_byteVarDec);
|
||||||
OPCODE(0x57, o6_wordVarDec);
|
OPCODE(0x57, o6_wordVarDec);
|
||||||
/* 58 */
|
/* 58 */
|
||||||
OPCODE(0x58, o6_invalid);
|
|
||||||
OPCODE(0x59, o6_invalid);
|
|
||||||
OPCODE(0x5a, o6_byteArrayDec);
|
OPCODE(0x5a, o6_byteArrayDec);
|
||||||
OPCODE(0x5b, o6_wordArrayDec);
|
OPCODE(0x5b, o6_wordArrayDec);
|
||||||
/* 5C */
|
/* 5C */
|
||||||
|
@ -220,11 +165,9 @@ void ScummEngine_v6::setupOpcodes() {
|
||||||
/* 84 */
|
/* 84 */
|
||||||
OPCODE(0x84, o6_pickupObject);
|
OPCODE(0x84, o6_pickupObject);
|
||||||
OPCODE(0x85, o6_loadRoomWithEgo);
|
OPCODE(0x85, o6_loadRoomWithEgo);
|
||||||
OPCODE(0x86, o6_invalid);
|
|
||||||
OPCODE(0x87, o6_getRandomNumber);
|
OPCODE(0x87, o6_getRandomNumber);
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_getRandomNumberRange);
|
OPCODE(0x88, o6_getRandomNumberRange);
|
||||||
OPCODE(0x89, o6_invalid);
|
|
||||||
OPCODE(0x8a, o6_getActorMoving);
|
OPCODE(0x8a, o6_getActorMoving);
|
||||||
OPCODE(0x8b, o6_isScriptRunning);
|
OPCODE(0x8b, o6_isScriptRunning);
|
||||||
/* 8C */
|
/* 8C */
|
||||||
|
@ -294,9 +237,6 @@ void ScummEngine_v6::setupOpcodes() {
|
||||||
OPCODE(0xbf, o6_startScriptQuick2);
|
OPCODE(0xbf, o6_startScriptQuick2);
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o6_dim2dimArray);
|
OPCODE(0xc0, o6_dim2dimArray);
|
||||||
OPCODE(0xc1, o6_invalid);
|
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_abs);
|
OPCODE(0xc4, o6_abs);
|
||||||
OPCODE(0xc5, o6_distObjectObject);
|
OPCODE(0xc5, o6_distObjectObject);
|
||||||
|
@ -310,13 +250,10 @@ void ScummEngine_v6::setupOpcodes() {
|
||||||
/* CC */
|
/* CC */
|
||||||
OPCODE(0xcc, o6_pickOneOfDefault);
|
OPCODE(0xcc, o6_pickOneOfDefault);
|
||||||
OPCODE(0xcd, o6_stampObject);
|
OPCODE(0xcd, o6_stampObject);
|
||||||
OPCODE(0xce, o6_invalid);
|
|
||||||
OPCODE(0xcf, o6_invalid);
|
|
||||||
/* D0 */
|
/* D0 */
|
||||||
OPCODE(0xd0, o6_getDateTime);
|
OPCODE(0xd0, o6_getDateTime);
|
||||||
OPCODE(0xd1, o6_stopTalking);
|
OPCODE(0xd1, o6_stopTalking);
|
||||||
OPCODE(0xd2, o6_getAnimateVariable);
|
OPCODE(0xd2, o6_getAnimateVariable);
|
||||||
OPCODE(0xd3, o6_invalid);
|
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_shuffle);
|
OPCODE(0xd4, o6_shuffle);
|
||||||
OPCODE(0xd5, o6_jumpToScript);
|
OPCODE(0xd5, o6_jumpToScript);
|
||||||
|
@ -324,54 +261,21 @@ void ScummEngine_v6::setupOpcodes() {
|
||||||
OPCODE(0xd7, o6_bor);
|
OPCODE(0xd7, o6_bor);
|
||||||
/* D8 */
|
/* D8 */
|
||||||
OPCODE(0xd8, o6_isRoomScriptRunning);
|
OPCODE(0xd8, o6_isRoomScriptRunning);
|
||||||
OPCODE(0xd9, o6_invalid);
|
|
||||||
OPCODE(0xda, o6_invalid);
|
|
||||||
OPCODE(0xdb, o6_invalid);
|
|
||||||
/* DC */
|
/* DC */
|
||||||
OPCODE(0xdc, o6_invalid);
|
|
||||||
OPCODE(0xdd, o6_findAllObjects);
|
OPCODE(0xdd, o6_findAllObjects);
|
||||||
OPCODE(0xde, o6_invalid);
|
|
||||||
OPCODE(0xdf, o6_invalid);
|
|
||||||
/* E0 */
|
/* E0 */
|
||||||
OPCODE(0xe0, o6_invalid);
|
|
||||||
OPCODE(0xe1, o6_getPixel);
|
OPCODE(0xe1, o6_getPixel);
|
||||||
OPCODE(0xe2, o6_invalid);
|
|
||||||
OPCODE(0xe3, o6_pickVarRandom);
|
OPCODE(0xe3, o6_pickVarRandom);
|
||||||
/* E4 */
|
/* E4 */
|
||||||
OPCODE(0xe4, o6_setBoxSet);
|
OPCODE(0xe4, o6_setBoxSet);
|
||||||
OPCODE(0xe5, o6_invalid);
|
|
||||||
OPCODE(0xe6, o6_invalid);
|
|
||||||
OPCODE(0xe7, o6_invalid);
|
|
||||||
/* E8 */
|
/* E8 */
|
||||||
OPCODE(0xe8, o6_invalid);
|
|
||||||
OPCODE(0xe9, o6_invalid);
|
|
||||||
OPCODE(0xea, o6_invalid);
|
|
||||||
OPCODE(0xeb, o6_invalid);
|
|
||||||
/* EC */
|
/* EC */
|
||||||
OPCODE(0xec, o6_getActorLayer);
|
OPCODE(0xec, o6_getActorLayer);
|
||||||
OPCODE(0xed, o6_getObjectNewDir);
|
OPCODE(0xed, o6_getObjectNewDir);
|
||||||
OPCODE(0xee, o6_invalid);
|
|
||||||
OPCODE(0xef, o6_invalid);
|
|
||||||
/* F0 */
|
/* F0 */
|
||||||
OPCODE(0xf0, o6_invalid);
|
|
||||||
OPCODE(0xf1, o6_invalid);
|
|
||||||
OPCODE(0xf2, o6_invalid);
|
|
||||||
OPCODE(0xf3, o6_invalid);
|
|
||||||
/* F4 */
|
/* F4 */
|
||||||
OPCODE(0xf4, o6_invalid);
|
|
||||||
OPCODE(0xf5, o6_invalid);
|
|
||||||
OPCODE(0xf6, o6_invalid);
|
|
||||||
OPCODE(0xf7, o6_invalid);
|
|
||||||
/* F8 */
|
/* F8 */
|
||||||
OPCODE(0xf8, o6_invalid);
|
|
||||||
OPCODE(0xf9, o6_invalid);
|
|
||||||
OPCODE(0xfa, o6_invalid);
|
|
||||||
OPCODE(0xfb, o6_invalid);
|
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o6_invalid);
|
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScummEngine_v6::popRoomAndObj(int *room) {
|
int ScummEngine_v6::popRoomAndObj(int *room) {
|
||||||
|
@ -605,10 +509,6 @@ void ScummEngine_v6::o6_pushWordVar() {
|
||||||
push(readVar(fetchScriptWord()));
|
push(readVar(fetchScriptWord()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v6::o6_invalid() {
|
|
||||||
error("Invalid opcode '%x' at %lx", _opcode, (long)(_scriptPointer - _scriptOrgPointer));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScummEngine_v6::o6_byteArrayRead() {
|
void ScummEngine_v6::o6_byteArrayRead() {
|
||||||
int base = pop();
|
int base = pop();
|
||||||
push(readArray(fetchScriptByte(), 0, base));
|
push(readArray(fetchScriptByte(), 0, base));
|
||||||
|
|
|
@ -47,7 +47,6 @@ namespace Scumm {
|
||||||
|
|
||||||
void ScummEngine_v8::setupOpcodes() {
|
void ScummEngine_v8::setupOpcodes() {
|
||||||
/* 00 */
|
/* 00 */
|
||||||
OPCODE(0x00, o6_invalid);
|
|
||||||
OPCODE(0x01, o6_pushWord);
|
OPCODE(0x01, o6_pushWord);
|
||||||
OPCODE(0x02, o6_pushWordVar);
|
OPCODE(0x02, o6_pushWordVar);
|
||||||
OPCODE(0x03, o6_wordArrayRead);
|
OPCODE(0x03, o6_wordArrayRead);
|
||||||
|
@ -75,102 +74,25 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0x14, o6_band);
|
OPCODE(0x14, o6_band);
|
||||||
OPCODE(0x15, o6_bor);
|
OPCODE(0x15, o6_bor);
|
||||||
OPCODE(0x16, o8_mod);
|
OPCODE(0x16, o8_mod);
|
||||||
OPCODE(0x17, o6_invalid);
|
|
||||||
/* 18 */
|
/* 18 */
|
||||||
OPCODE(0x18, o6_invalid);
|
|
||||||
OPCODE(0x19, o6_invalid);
|
|
||||||
OPCODE(0x1a, o6_invalid);
|
|
||||||
OPCODE(0x1b, o6_invalid);
|
|
||||||
/* 1C */
|
/* 1C */
|
||||||
OPCODE(0x1c, o6_invalid);
|
|
||||||
OPCODE(0x1d, o6_invalid);
|
|
||||||
OPCODE(0x1e, o6_invalid);
|
|
||||||
OPCODE(0x1f, o6_invalid);
|
|
||||||
/* 20 */
|
/* 20 */
|
||||||
OPCODE(0x20, o6_invalid);
|
|
||||||
OPCODE(0x21, o6_invalid);
|
|
||||||
OPCODE(0x22, o6_invalid);
|
|
||||||
OPCODE(0x23, o6_invalid);
|
|
||||||
/* 24 */
|
/* 24 */
|
||||||
OPCODE(0x24, o6_invalid);
|
|
||||||
OPCODE(0x25, o6_invalid);
|
|
||||||
OPCODE(0x26, o6_invalid);
|
|
||||||
OPCODE(0x27, o6_invalid);
|
|
||||||
/* 28 */
|
/* 28 */
|
||||||
OPCODE(0x28, o6_invalid);
|
|
||||||
OPCODE(0x29, o6_invalid);
|
|
||||||
OPCODE(0x2a, o6_invalid);
|
|
||||||
OPCODE(0x2b, o6_invalid);
|
|
||||||
/* 2C */
|
/* 2C */
|
||||||
OPCODE(0x2c, o6_invalid);
|
|
||||||
OPCODE(0x2d, o6_invalid);
|
|
||||||
OPCODE(0x2e, o6_invalid);
|
|
||||||
OPCODE(0x2f, o6_invalid);
|
|
||||||
/* 30 */
|
/* 30 */
|
||||||
OPCODE(0x30, o6_invalid);
|
|
||||||
OPCODE(0x31, o6_invalid);
|
|
||||||
OPCODE(0x32, o6_invalid);
|
|
||||||
OPCODE(0x33, o6_invalid);
|
|
||||||
/* 34 */
|
/* 34 */
|
||||||
OPCODE(0x34, o6_invalid);
|
|
||||||
OPCODE(0x35, o6_invalid);
|
|
||||||
OPCODE(0x36, o6_invalid);
|
|
||||||
OPCODE(0x37, o6_invalid);
|
|
||||||
/* 38 */
|
/* 38 */
|
||||||
OPCODE(0x38, o6_invalid);
|
|
||||||
OPCODE(0x39, o6_invalid);
|
|
||||||
OPCODE(0x3a, o6_invalid);
|
|
||||||
OPCODE(0x3b, o6_invalid);
|
|
||||||
/* 3C */
|
/* 3C */
|
||||||
OPCODE(0x3c, o6_invalid);
|
|
||||||
OPCODE(0x3d, o6_invalid);
|
|
||||||
OPCODE(0x3e, o6_invalid);
|
|
||||||
OPCODE(0x3f, o6_invalid);
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
OPCODE(0x40, o6_invalid);
|
|
||||||
OPCODE(0x41, o6_invalid);
|
|
||||||
OPCODE(0x42, o6_invalid);
|
|
||||||
OPCODE(0x43, o6_invalid);
|
|
||||||
/* 44 */
|
/* 44 */
|
||||||
OPCODE(0x44, o6_invalid);
|
|
||||||
OPCODE(0x45, o6_invalid);
|
|
||||||
OPCODE(0x46, o6_invalid);
|
|
||||||
OPCODE(0x47, o6_invalid);
|
|
||||||
/* 48 */
|
/* 48 */
|
||||||
OPCODE(0x48, o6_invalid);
|
|
||||||
OPCODE(0x49, o6_invalid);
|
|
||||||
OPCODE(0x4a, o6_invalid);
|
|
||||||
OPCODE(0x4b, o6_invalid);
|
|
||||||
/* 4C */
|
/* 4C */
|
||||||
OPCODE(0x4c, o6_invalid);
|
|
||||||
OPCODE(0x4d, o6_invalid);
|
|
||||||
OPCODE(0x4e, o6_invalid);
|
|
||||||
OPCODE(0x4f, o6_invalid);
|
|
||||||
/* 50 */
|
/* 50 */
|
||||||
OPCODE(0x50, o6_invalid);
|
|
||||||
OPCODE(0x51, o6_invalid);
|
|
||||||
OPCODE(0x52, o6_invalid);
|
|
||||||
OPCODE(0x53, o6_invalid);
|
|
||||||
/* 54 */
|
/* 54 */
|
||||||
OPCODE(0x54, o6_invalid);
|
|
||||||
OPCODE(0x55, o6_invalid);
|
|
||||||
OPCODE(0x56, o6_invalid);
|
|
||||||
OPCODE(0x57, o6_invalid);
|
|
||||||
/* 58 */
|
/* 58 */
|
||||||
OPCODE(0x58, o6_invalid);
|
|
||||||
OPCODE(0x59, o6_invalid);
|
|
||||||
OPCODE(0x5a, o6_invalid);
|
|
||||||
OPCODE(0x5b, o6_invalid);
|
|
||||||
/* 5C */
|
/* 5C */
|
||||||
OPCODE(0x5c, o6_invalid);
|
|
||||||
OPCODE(0x5d, o6_invalid);
|
|
||||||
OPCODE(0x5e, o6_invalid);
|
|
||||||
OPCODE(0x5f, o6_invalid);
|
|
||||||
/* 60 */
|
/* 60 */
|
||||||
OPCODE(0x60, o6_invalid);
|
|
||||||
OPCODE(0x61, o6_invalid);
|
|
||||||
OPCODE(0x62, o6_invalid);
|
|
||||||
OPCODE(0x63, o6_invalid);
|
|
||||||
/* 64 */
|
/* 64 */
|
||||||
OPCODE(0x64, o6_if);
|
OPCODE(0x64, o6_if);
|
||||||
OPCODE(0x65, o6_ifNot);
|
OPCODE(0x65, o6_ifNot);
|
||||||
|
@ -195,9 +117,7 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0x74, o8_dim2dimArray);
|
OPCODE(0x74, o8_dim2dimArray);
|
||||||
OPCODE(0x75, o6_wordArrayIndexedWrite);
|
OPCODE(0x75, o6_wordArrayIndexedWrite);
|
||||||
OPCODE(0x76, o8_arrayOps);
|
OPCODE(0x76, o8_arrayOps);
|
||||||
OPCODE(0x77, o6_invalid);
|
|
||||||
/* 78 */
|
/* 78 */
|
||||||
OPCODE(0x78, o6_invalid);
|
|
||||||
OPCODE(0x79, o6_startScript);
|
OPCODE(0x79, o6_startScript);
|
||||||
OPCODE(0x7a, o6_startScriptQuick);
|
OPCODE(0x7a, o6_startScriptQuick);
|
||||||
OPCODE(0x7b, o6_stopObjectCode);
|
OPCODE(0x7b, o6_stopObjectCode);
|
||||||
|
@ -215,9 +135,7 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0x84, o6_beginOverride);
|
OPCODE(0x84, o6_beginOverride);
|
||||||
OPCODE(0x85, o6_endOverride);
|
OPCODE(0x85, o6_endOverride);
|
||||||
OPCODE(0x86, o6_stopSentence);
|
OPCODE(0x86, o6_stopSentence);
|
||||||
OPCODE(0x87, o6_invalid);
|
|
||||||
/* 88 */
|
/* 88 */
|
||||||
OPCODE(0x88, o6_invalid);
|
|
||||||
OPCODE(0x89, o6_setClass);
|
OPCODE(0x89, o6_setClass);
|
||||||
OPCODE(0x8a, o6_setState);
|
OPCODE(0x8a, o6_setState);
|
||||||
OPCODE(0x8b, o6_setOwner);
|
OPCODE(0x8b, o6_setOwner);
|
||||||
|
@ -238,9 +156,6 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0x97, o8_blastText);
|
OPCODE(0x97, o8_blastText);
|
||||||
/* 98 */
|
/* 98 */
|
||||||
OPCODE(0x98, o8_drawObject);
|
OPCODE(0x98, o8_drawObject);
|
||||||
OPCODE(0x99, o6_invalid);
|
|
||||||
OPCODE(0x9a, o6_invalid);
|
|
||||||
OPCODE(0x9b, o6_invalid);
|
|
||||||
/* 9C */
|
/* 9C */
|
||||||
OPCODE(0x9c, o8_cursorCommand);
|
OPCODE(0x9c, o8_cursorCommand);
|
||||||
OPCODE(0x9d, o6_loadRoom);
|
OPCODE(0x9d, o6_loadRoom);
|
||||||
|
@ -258,7 +173,6 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0xa7, o6_setBoxFlags);
|
OPCODE(0xa7, o6_setBoxFlags);
|
||||||
/* A8 */
|
/* A8 */
|
||||||
OPCODE(0xa8, o6_createBoxMatrix);
|
OPCODE(0xa8, o6_createBoxMatrix);
|
||||||
OPCODE(0xa9, o6_invalid);
|
|
||||||
OPCODE(0xaa, o8_resourceRoutines);
|
OPCODE(0xaa, o8_resourceRoutines);
|
||||||
OPCODE(0xab, o8_roomOps);
|
OPCODE(0xab, o8_roomOps);
|
||||||
/* AC */
|
/* AC */
|
||||||
|
@ -277,32 +191,17 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0xb6, o6_getDateTime);
|
OPCODE(0xb6, o6_getDateTime);
|
||||||
OPCODE(0xb7, o6_drawBox);
|
OPCODE(0xb7, o6_drawBox);
|
||||||
/* B8 */
|
/* B8 */
|
||||||
OPCODE(0xb8, o6_invalid);
|
|
||||||
OPCODE(0xb9, o8_startVideo);
|
OPCODE(0xb9, o8_startVideo);
|
||||||
OPCODE(0xba, o8_kernelSetFunctions);
|
OPCODE(0xba, o8_kernelSetFunctions);
|
||||||
OPCODE(0xbb, o6_invalid);
|
|
||||||
/* BC */
|
/* BC */
|
||||||
OPCODE(0xbc, o6_invalid);
|
|
||||||
OPCODE(0xbd, o6_invalid);
|
|
||||||
OPCODE(0xbe, o6_invalid);
|
|
||||||
OPCODE(0xbf, o6_invalid);
|
|
||||||
/* C0 */
|
/* C0 */
|
||||||
OPCODE(0xc0, o6_invalid);
|
|
||||||
OPCODE(0xc1, o6_invalid);
|
|
||||||
OPCODE(0xc2, o6_invalid);
|
|
||||||
OPCODE(0xc3, o6_invalid);
|
|
||||||
/* C4 */
|
/* C4 */
|
||||||
OPCODE(0xc4, o6_invalid);
|
|
||||||
OPCODE(0xc5, o6_invalid);
|
|
||||||
OPCODE(0xc6, o6_invalid);
|
|
||||||
OPCODE(0xc7, o6_invalid);
|
|
||||||
/* C8 */
|
/* C8 */
|
||||||
OPCODE(0xc8, o6_startScriptQuick2);
|
OPCODE(0xc8, o6_startScriptQuick2);
|
||||||
OPCODE(0xc9, o6_startObjectQuick);
|
OPCODE(0xc9, o6_startObjectQuick);
|
||||||
OPCODE(0xca, o6_pickOneOf);
|
OPCODE(0xca, o6_pickOneOf);
|
||||||
OPCODE(0xcb, o6_pickOneOfDefault);
|
OPCODE(0xcb, o6_pickOneOfDefault);
|
||||||
/* CC */
|
/* CC */
|
||||||
OPCODE(0xcc, o6_invalid);
|
|
||||||
OPCODE(0xcd, o6_isAnyOf);
|
OPCODE(0xcd, o6_isAnyOf);
|
||||||
OPCODE(0xce, o6_getRandomNumber);
|
OPCODE(0xce, o6_getRandomNumber);
|
||||||
OPCODE(0xcf, o6_getRandomNumberRange);
|
OPCODE(0xcf, o6_getRandomNumberRange);
|
||||||
|
@ -312,10 +211,8 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0xd2, o6_getOwner);
|
OPCODE(0xd2, o6_getOwner);
|
||||||
OPCODE(0xd3, o6_isScriptRunning);
|
OPCODE(0xd3, o6_isScriptRunning);
|
||||||
/* D4 */
|
/* D4 */
|
||||||
OPCODE(0xd4, o6_invalid);
|
|
||||||
OPCODE(0xd5, o6_isSoundRunning);
|
OPCODE(0xd5, o6_isSoundRunning);
|
||||||
OPCODE(0xd6, o6_abs);
|
OPCODE(0xd6, o6_abs);
|
||||||
OPCODE(0xd7, o6_invalid);
|
|
||||||
/* D8 */
|
/* D8 */
|
||||||
OPCODE(0xd8, o8_kernelGetFunctions);
|
OPCODE(0xd8, o8_kernelGetFunctions);
|
||||||
OPCODE(0xd9, o6_isActorInBox);
|
OPCODE(0xd9, o6_isActorInBox);
|
||||||
|
@ -324,7 +221,6 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
/* DC */
|
/* DC */
|
||||||
OPCODE(0xdc, o6_findObject);
|
OPCODE(0xdc, o6_findObject);
|
||||||
OPCODE(0xdd, o6_getVerbFromXY);
|
OPCODE(0xdd, o6_getVerbFromXY);
|
||||||
OPCODE(0xde, o6_invalid);
|
|
||||||
OPCODE(0xdf, o6_findInventory);
|
OPCODE(0xdf, o6_findInventory);
|
||||||
/* E0 */
|
/* E0 */
|
||||||
OPCODE(0xe0, o6_getInventoryCount);
|
OPCODE(0xe0, o6_getInventoryCount);
|
||||||
|
@ -352,20 +248,10 @@ void ScummEngine_v8::setupOpcodes() {
|
||||||
OPCODE(0xf2, o8_getObjectImageWidth);
|
OPCODE(0xf2, o8_getObjectImageWidth);
|
||||||
OPCODE(0xf3, o8_getObjectImageHeight);
|
OPCODE(0xf3, o8_getObjectImageHeight);
|
||||||
/* F4 */
|
/* F4 */
|
||||||
OPCODE(0xf4, o6_invalid);
|
|
||||||
OPCODE(0xf5, o6_invalid);
|
|
||||||
OPCODE(0xf6, o8_getStringWidth);
|
OPCODE(0xf6, o8_getStringWidth);
|
||||||
OPCODE(0xf7, o8_getActorZPlane);
|
OPCODE(0xf7, o8_getActorZPlane);
|
||||||
/* F8 */
|
/* F8 */
|
||||||
OPCODE(0xf8, o6_invalid);
|
|
||||||
OPCODE(0xf9, o6_invalid);
|
|
||||||
OPCODE(0xfa, o6_invalid);
|
|
||||||
OPCODE(0xfb, o6_invalid);
|
|
||||||
/* FC */
|
/* FC */
|
||||||
OPCODE(0xfc, o6_invalid);
|
|
||||||
OPCODE(0xfd, o6_invalid);
|
|
||||||
OPCODE(0xfe, o6_invalid);
|
|
||||||
OPCODE(0xff, o6_invalid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// In V8, the word size is 4 byte, not 2 bytes as in V6/V7 games
|
// In V8, the word size is 4 byte, not 2 bytes as in V6/V7 games
|
||||||
|
|
|
@ -167,7 +167,6 @@ protected:
|
||||||
void o6_pushWord();
|
void o6_pushWord();
|
||||||
void o6_pushByteVar();
|
void o6_pushByteVar();
|
||||||
void o6_pushWordVar();
|
void o6_pushWordVar();
|
||||||
void o6_invalid();
|
|
||||||
void o6_byteArrayRead();
|
void o6_byteArrayRead();
|
||||||
void o6_wordArrayRead();
|
void o6_wordArrayRead();
|
||||||
void o6_byteArrayIndexedRead();
|
void o6_byteArrayIndexedRead();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue