diff options
author | Max Horn | 2009-04-16 09:27:22 +0000 |
---|---|---|
committer | Max Horn | 2009-04-16 09:27:22 +0000 |
commit | cbe9e520d3b2b515428d33a4da8726e1a2dd82f1 (patch) | |
tree | c137855c759e3044fd22ff05cbe8969f408603f6 /engines/scumm/he/script_v60he.cpp | |
parent | 99df028d35a80a8cf932415a9e6bfc09179adf3e (diff) | |
download | scummvm-rg350-cbe9e520d3b2b515428d33a4da8726e1a2dd82f1.tar.gz scummvm-rg350-cbe9e520d3b2b515428d33a4da8726e1a2dd82f1.tar.bz2 scummvm-rg350-cbe9e520d3b2b515428d33a4da8726e1a2dd82f1.zip |
SCUMM: Compacted various setupOpcodes() implementations by using the fact that opcode tables tend not to change much between most SCUMM versions
svn-id: r39958
Diffstat (limited to 'engines/scumm/he/script_v60he.cpp')
-rw-r--r-- | engines/scumm/he/script_v60he.cpp | 220 |
1 files changed, 8 insertions, 212 deletions
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index 6d2adb439b..5ad447b1c7 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -66,235 +66,31 @@ static int virtScreenSavePack(byte *dst, byte *src, int len, int unk); #define OPCODE(i, x) _opcodes[i]._OPCODE(ScummEngine_v60he, x) void ScummEngine_v60he::setupOpcodes() { - /* 00 */ - OPCODE(0x00, o6_pushByte); - OPCODE(0x01, o6_pushWord); - OPCODE(0x02, o6_pushByteVar); - OPCODE(0x03, o6_pushWordVar); - /* 04 */ - OPCODE(0x06, o6_byteArrayRead); - OPCODE(0x07, o6_wordArrayRead); - /* 08 */ - OPCODE(0x0a, o6_byteArrayIndexedRead); - OPCODE(0x0b, o6_wordArrayIndexedRead); - /* 0C */ - OPCODE(0x0c, o6_dup); - OPCODE(0x0d, o6_not); - OPCODE(0x0e, o6_eq); - OPCODE(0x0f, o6_neq); - /* 10 */ - OPCODE(0x10, o6_gt); - OPCODE(0x11, o6_lt); - OPCODE(0x12, o6_le); - OPCODE(0x13, o6_ge); - /* 14 */ - OPCODE(0x14, o6_add); - OPCODE(0x15, o6_sub); - OPCODE(0x16, o6_mul); - OPCODE(0x17, o6_div); - /* 18 */ - OPCODE(0x18, o6_land); - OPCODE(0x19, o6_lor); - OPCODE(0x1a, o6_pop); - /* 1C */ - /* 20 */ - /* 24 */ - /* 28 */ - /* 2C */ - /* 30 */ - /* 34 */ - /* 38 */ - /* 3C */ - /* 40 */ - OPCODE(0x42, o6_writeByteVar); - OPCODE(0x43, o6_writeWordVar); - /* 44 */ - OPCODE(0x46, o6_byteArrayWrite); - OPCODE(0x47, o6_wordArrayWrite); - /* 48 */ - OPCODE(0x4a, o6_byteArrayIndexedWrite); - OPCODE(0x4b, o6_wordArrayIndexedWrite); - /* 4C */ - OPCODE(0x4e, o6_byteVarInc); - OPCODE(0x4f, o6_wordVarInc); - /* 50 */ - OPCODE(0x52, o6_byteArrayInc); - OPCODE(0x53, o6_wordArrayInc); - /* 54 */ - OPCODE(0x56, o6_byteVarDec); - OPCODE(0x57, o6_wordVarDec); - /* 58 */ - OPCODE(0x5a, o6_byteArrayDec); - OPCODE(0x5b, o6_wordArrayDec); - /* 5C */ - OPCODE(0x5c, o6_if); - OPCODE(0x5d, o6_ifNot); - OPCODE(0x5e, o6_startScript); - OPCODE(0x5f, o6_startScriptQuick); - /* 60 */ - OPCODE(0x60, o6_startObject); - OPCODE(0x61, o6_drawObject); - OPCODE(0x62, o6_drawObjectAt); - /* 64 */ - OPCODE(0x65, o6_stopObjectCode); - OPCODE(0x66, o6_stopObjectCode); - OPCODE(0x67, o6_endCutscene); - /* 68 */ - OPCODE(0x68, o6_cutscene); - OPCODE(0x69, o6_stopMusic); - OPCODE(0x6a, o6_freezeUnfreeze); - OPCODE(0x6b, o6_cursorCommand); - /* 6C */ - OPCODE(0x6c, o6_breakHere); - OPCODE(0x6d, o6_ifClassOfIs); - OPCODE(0x6e, o6_setClass); - OPCODE(0x6f, o6_getState); - /* 70 */ + ScummEngine_v6::setupOpcodes(); + + _opcodes[0x63].setProc(0, 0); + _opcodes[0x64].setProc(0, 0); OPCODE(0x70, o60_setState); - OPCODE(0x71, o6_setOwner); - OPCODE(0x72, o6_getOwner); - OPCODE(0x73, o6_jump); - /* 74 */ - OPCODE(0x74, o6_startSound); - OPCODE(0x75, o6_stopSound); - OPCODE(0x76, o6_startMusic); - OPCODE(0x77, o6_stopObjectScript); - /* 78 */ - OPCODE(0x78, o6_panCameraTo); - OPCODE(0x79, o6_actorFollowCamera); - OPCODE(0x7a, o6_setCameraAt); - OPCODE(0x7b, o6_loadRoom); - /* 7C */ - OPCODE(0x7c, o6_stopScript); - OPCODE(0x7d, o6_walkActorToObj); - OPCODE(0x7e, o6_walkActorTo); - OPCODE(0x7f, o6_putActorAtXY); - /* 80 */ - OPCODE(0x80, o6_putActorAtObject); - OPCODE(0x81, o6_faceActor); - OPCODE(0x82, o6_animateActor); - OPCODE(0x83, o6_doSentence); - /* 84 */ - OPCODE(0x84, o6_pickupObject); - OPCODE(0x85, o6_loadRoomWithEgo); - OPCODE(0x87, o6_getRandomNumber); - /* 88 */ - OPCODE(0x88, o6_getRandomNumberRange); - OPCODE(0x8a, o6_getActorMoving); - OPCODE(0x8b, o6_isScriptRunning); - /* 8C */ - OPCODE(0x8c, o6_getActorRoom); - OPCODE(0x8d, o6_getObjectX); - OPCODE(0x8e, o6_getObjectY); - OPCODE(0x8f, o6_getObjectOldDir); - /* 90 */ - OPCODE(0x90, o6_getActorWalkBox); - OPCODE(0x91, o6_getActorCostume); - OPCODE(0x92, o6_findInventory); - OPCODE(0x93, o6_getInventoryCount); - /* 94 */ - OPCODE(0x94, o6_getVerbFromXY); - OPCODE(0x95, o6_beginOverride); - OPCODE(0x96, o6_endOverride); - OPCODE(0x97, o6_setObjectName); - /* 98 */ - OPCODE(0x98, o6_isSoundRunning); - OPCODE(0x99, o6_setBoxFlags); - OPCODE(0x9b, o6_resourceRoutines); - /* 9C */ + _opcodes[0x9a].setProc(0, 0); OPCODE(0x9c, o60_roomOps); OPCODE(0x9d, o60_actorOps); - OPCODE(0x9e, o6_verbOps); - OPCODE(0x9f, o6_getActorFromXY); - /* A0 */ - OPCODE(0xa0, o6_findObject); - OPCODE(0xa1, o6_pseudoRoom); - OPCODE(0xa2, o6_getActorElevation); - OPCODE(0xa3, o6_getVerbEntrypoint); - /* A4 */ - OPCODE(0xa4, o6_arrayOps); - OPCODE(0xa5, o6_saveRestoreVerbs); - OPCODE(0xa6, o6_drawBox); - OPCODE(0xa7, o6_pop); - /* A8 */ - OPCODE(0xa8, o6_getActorWidth); - OPCODE(0xa9, o6_wait); - OPCODE(0xaa, o6_getActorScaleX); - OPCODE(0xab, o6_getActorAnimCounter); - /* AC */ - OPCODE(0xad, o6_isAnyOf); - OPCODE(0xae, o6_systemOps); - OPCODE(0xaf, o6_isActorInBox); - /* B0 */ - OPCODE(0xb0, o6_delay); - OPCODE(0xb1, o6_delaySeconds); - OPCODE(0xb2, o6_delayMinutes); - OPCODE(0xb3, o6_stopSentence); - /* B4 */ - OPCODE(0xb4, o6_printLine); - OPCODE(0xb5, o6_printText); - OPCODE(0xb6, o6_printDebug); - OPCODE(0xb7, o6_printSystem); - /* B8 */ - OPCODE(0xb8, o6_printActor); - OPCODE(0xb9, o6_printEgo); - OPCODE(0xba, o6_talkActor); - OPCODE(0xbb, o6_talkEgo); - /* BC */ - OPCODE(0xbc, o6_dimArray); + _opcodes[0xac].setProc(0, 0); OPCODE(0xbd, o6_stopObjectCode); - OPCODE(0xbe, o6_startObjectQuick); - OPCODE(0xbf, o6_startScriptQuick2); - /* C0 */ - OPCODE(0xc0, o6_dim2dimArray); - /* C4 */ - OPCODE(0xc4, o6_abs); - OPCODE(0xc5, o6_distObjectObject); - OPCODE(0xc6, o6_distObjectPt); - OPCODE(0xc7, o6_distPtPt); - /* C8 */ OPCODE(0xc8, o60_kernelGetFunctions); OPCODE(0xc9, o60_kernelSetFunctions); - OPCODE(0xca, o6_delayFrames); - OPCODE(0xcb, o6_pickOneOf); - /* CC */ - OPCODE(0xcc, o6_pickOneOfDefault); - OPCODE(0xcd, o6_stampObject); - /* D0 */ - OPCODE(0xd0, o6_getDateTime); - OPCODE(0xd1, o6_stopTalking); - OPCODE(0xd2, o6_getAnimateVariable); - /* D4 */ - OPCODE(0xd4, o6_shuffle); - OPCODE(0xd5, o6_jumpToScript); - OPCODE(0xd6, o6_band); - OPCODE(0xd7, o6_bor); - /* D8 */ - OPCODE(0xd8, o6_isRoomScriptRunning); OPCODE(0xd9, o60_closeFile); OPCODE(0xda, o60_openFile); OPCODE(0xdb, o60_readFile); - /* DC */ OPCODE(0xdc, o60_writeFile); - OPCODE(0xdd, o6_findAllObjects); OPCODE(0xde, o60_deleteFile); OPCODE(0xdf, o60_rename); - /* E0 */ OPCODE(0xe0, o60_soundOps); - OPCODE(0xe1, o6_getPixel); OPCODE(0xe2, o60_localizeArrayToScript); - OPCODE(0xe3, o6_pickVarRandom); - /* E4 */ - OPCODE(0xe4, o6_setBoxSet); - /* E8 */ OPCODE(0xe9, o60_seekFilePos); OPCODE(0xea, o60_redimArray); OPCODE(0xeb, o60_readFilePos); - /* EC */ - /* F0 */ - /* F4 */ - /* F8 */ - /* FC */ + _opcodes[0xec].setProc(0, 0); + _opcodes[0xed].setProc(0, 0); } int ScummEngine_v60he::convertFilePath(byte *dst) { |