From 0d27b23efdeeaead3ec57126bddea6621d53e2cd Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Fri, 26 Nov 2004 20:17:02 +0000 Subject: renamed some HE opcodes and got rid of o72_unknownEF as it seems it was a duplicate of o70_unknownEF svn-id: r15896 --- scumm/intern.h | 19 +++++++++--------- scumm/script_v100he.cpp | 12 ++++++------ scumm/script_v72he.cpp | 51 +++++++++++++++---------------------------------- scumm/script_v7he.cpp | 32 +++++++++++++++---------------- scumm/script_v80he.cpp | 14 +++++++------- scumm/script_v90he.cpp | 26 ++++++++++++------------- 6 files changed, 66 insertions(+), 88 deletions(-) (limited to 'scumm') diff --git a/scumm/intern.h b/scumm/intern.h index dd12d10660..78e3a0acb8 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -632,7 +632,7 @@ protected: virtual void redrawBGAreas(); - void arrrays_unk2(int dst, int src, int len2, int len); + void appendSubstring(int dst, int src, int len2, int len); int findObject(int x, int y, int num, int *args); void polygonErase(int fromId, int toId); @@ -652,12 +652,12 @@ protected: void o70_kernelSetFunctions(); void o70_getStringWidth(); void o70_getStringLen(); - void o70_unknownEF(); - void o70_stringCompare(); + void o70_appendString(); + void o70_compareString(); void o70_readINI(); void o70_writeINI(); - void o70_unknownF5(); - void o70_unknownF6(); + void o70_getStringLenForWidth(); + void o70_getCharIndexInString(); void o70_setFilePath(); void o70_setWindowCaption(); void o70_polygonOps(); @@ -740,7 +740,7 @@ protected: void o72_pushDWord(); void o72_addMessageToStack(); void o72_isAnyOf(); - void o72_unknown50(); + void o72_resetCutscene(); void o72_findObjectWithClassOf(); void o72_getObjectImageX(); void o72_getObjectImageY(); @@ -773,9 +773,8 @@ protected: void o72_getPixel(); void o72_pickVarRandom(); void o72_redimArray(); - void o72_unknownEC(); - void o72_unknownEF(); - void o72_unknownF0(); + void o72_copyString(); + void o72_concatString(); void o72_checkGlobQueue(); void o72_readINI(); void o72_writeINI(); @@ -903,7 +902,7 @@ protected: void o90_shr4(); void o90_findAllObjectsWithClassOf(); void o90_getPolygonOverlap(); - void o90_unknown36(); + void o90_cond(); void o90_dim2dim2Array(); void o90_sortArray(); void o90_getObjectData(); diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 0878ce82e9..2a16d1bfda 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -324,15 +324,15 @@ void ScummEngine_v100he::setupOpcodes() { OPCODE(o6_startScriptQuick2), OPCODE(o6_getState), /* E0 */ - OPCODE(o70_stringCompare), - OPCODE(o72_unknownEC), - OPCODE(o72_unknownEF), - OPCODE(o72_unknownF0), + OPCODE(o70_compareString), + OPCODE(o72_copyString), + OPCODE(o70_appendString), + OPCODE(o72_concatString), /* E4 */ OPCODE(o70_getStringLen), - OPCODE(o70_unknownF5), + OPCODE(o70_getStringLenForWidth), OPCODE(o6_invalid), - OPCODE(o70_unknownF6), + OPCODE(o70_getCharIndexInString), /* E8 */ OPCODE(o70_getStringWidth), OPCODE(o60_readFilePos), diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index c4eda07719..6161525d4e 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -145,7 +145,7 @@ void ScummEngine_v72he::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o6_wordVarInc), /* 50 */ - OPCODE(o72_unknown50), + OPCODE(o72_resetCutscene), OPCODE(o6_invalid), OPCODE(o72_findObjectWithClassOf), OPCODE(o6_wordArrayInc), @@ -340,19 +340,19 @@ void ScummEngine_v72he::setupOpcodes() { OPCODE(o72_redimArray), OPCODE(o60_readFilePos), /* EC */ - OPCODE(o72_unknownEC), + OPCODE(o72_copyString), OPCODE(o70_getStringWidth), OPCODE(o70_getStringLen), - OPCODE(o72_unknownEF), + OPCODE(o70_appendString), /* F0 */ - OPCODE(o72_unknownF0), - OPCODE(o70_stringCompare), + OPCODE(o72_concatString), + OPCODE(o70_compareString), OPCODE(o72_checkGlobQueue), OPCODE(o72_readINI), /* F4 */ OPCODE(o72_writeINI), - OPCODE(o70_unknownF5), - OPCODE(o70_unknownF6), + OPCODE(o70_getStringLenForWidth), + OPCODE(o70_getCharIndexInString), OPCODE(o6_invalid), /* F8 */ OPCODE(o72_getResourceSize), @@ -638,7 +638,7 @@ void ScummEngine_v72he::o72_isAnyOf() { push(0); } -void ScummEngine_v72he::o72_unknown50() { +void ScummEngine_v72he::o72_resetCutscene() { int idx; idx = vm.cutSceneStackPointer; @@ -2367,7 +2367,7 @@ void ScummEngine_v72he::redimArray(int arrayId, int newDim2start, int newDim2end ah->dim2end = TO_LE_32(newDim2end); } -void ScummEngine_v72he::o72_unknownEC() { +void ScummEngine_v72he::o72_copyString() { int dst, size; int src = pop(); @@ -2378,34 +2378,13 @@ void ScummEngine_v72he::o72_unknownEC() { writeArray(0, 0, 0, 0); dst = readVar(0); - arrrays_unk2(dst, src, -1, -1); + appendSubstring(dst, src, -1, -1); push(dst); - debug(1,"stub o72_unknownEC"); + debug(1,"stub o72_copyString"); } -void ScummEngine_v72he::o72_unknownEF() { - int dst, size; - - int len = pop(); - int srcOffs = pop(); - int src = pop(); - - size = len - srcOffs + 2; - - writeVar(0, 0); - defineArray(0, kStringArray, 0, 0, 0, size); - writeArray(0, 0, 0, 0); - - dst = readVar(0); - - arrrays_unk2(dst, src, srcOffs, len); - - push(dst); - debug(1,"stub o72_unknownEF"); -} - -void ScummEngine_v72he::o72_unknownF0() { +void ScummEngine_v72he::o72_concatString() { int dst, size; int src2 = pop(); @@ -2420,11 +2399,11 @@ void ScummEngine_v72he::o72_unknownF0() { dst = readVar(0); - arrrays_unk2(dst, src1, 0, -1); - arrrays_unk2(dst, src2, 0, -1); + appendSubstring(dst, src1, 0, -1); + appendSubstring(dst, src2, 0, -1); push(dst); - debug(1,"stub o72_unknownF0"); + debug(1,"stub o72_concatString"); } void ScummEngine_v72he::o72_checkGlobQueue() { diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index 458a38fc17..d5b502f391 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -344,16 +344,16 @@ void ScummEngine_v70he::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o70_getStringWidth), OPCODE(o70_getStringLen), - OPCODE(o70_unknownEF), + OPCODE(o70_appendString), /* F0 */ OPCODE(o6_invalid), - OPCODE(o70_stringCompare), + OPCODE(o70_compareString), OPCODE(o6_invalid), OPCODE(o70_readINI), /* F4 */ OPCODE(o70_writeINI), - OPCODE(o70_unknownF5), - OPCODE(o70_unknownF6), + OPCODE(o70_getStringLenForWidth), + OPCODE(o70_getCharIndexInString), OPCODE(o6_invalid), /* F8 */ OPCODE(o6_invalid), @@ -379,7 +379,7 @@ const char *ScummEngine_v70he::getOpcodeDesc(byte i) { return _opcodesv70he[i].desc; } -void ScummEngine_v70he::arrrays_unk2(int dst, int src, int srcOffs, int len) { +void ScummEngine_v70he::appendSubstring(int dst, int src, int srcOffs, int len) { int dstOffs, value; int i = 0; @@ -813,7 +813,7 @@ void ScummEngine_v70he::o70_getStringLen() { push(len); } -void ScummEngine_v70he::o70_unknownEF() { +void ScummEngine_v70he::o70_appendString() { int dst, size; int len = pop(); @@ -828,13 +828,13 @@ void ScummEngine_v70he::o70_unknownEF() { dst = readVar(0); - arrrays_unk2(dst, src, srcOffs, len); + appendSubstring(dst, src, srcOffs, len); push(dst); - debug(1,"stub o70_unknownEF"); + debug(1,"stub o70_appendString"); } -void ScummEngine_v70he::o70_stringCompare() { +void ScummEngine_v70he::o70_compareString() { byte *addr, *addr2; int i = 0; @@ -843,11 +843,11 @@ void ScummEngine_v70he::o70_stringCompare() { addr = getStringAddress(id); if (!addr) - error("o70_stringCompare: Reference to zeroed array pointer (%d)", id); + error("o70_compareString: Reference to zeroed array pointer (%d)", id); addr2 = getStringAddress(id2); if (!addr2) - error("o70_stringCompare: Reference to zeroed array pointer (%d)", id); + error("o70_compareString: Reference to zeroed array pointer (%d)", id); while(1) { if (*addr != *addr2) @@ -873,7 +873,7 @@ void ScummEngine_v70he::o70_stringCompare() { } push (i); - debug(1,"o70_stringCompare stub (%d, %d, %d)", id, id2, i); + debug(1,"o70_compareString stub (%d, %d, %d)", id, id2, i); } void ScummEngine_v70he::o70_readINI() { @@ -934,7 +934,7 @@ void ScummEngine_v70he::o70_writeINI() { } } -void ScummEngine_v70he::o70_unknownF5() { +void ScummEngine_v70he::o70_getStringLenForWidth() { int chr, max; int array, len, pos, width = 0; @@ -956,10 +956,10 @@ void ScummEngine_v70he::o70_unknownF5() { } push(len); - debug(1,"stub o70_unknownF5 (%d)", len); + debug(1,"stub o70_getStringLenForWidth (%d)", len); } -void ScummEngine_v70he::o70_unknownF6() { +void ScummEngine_v70he::o70_getCharIndexInString() { int array, end, len, pos, value; value = pop(); @@ -998,7 +998,7 @@ void ScummEngine_v70he::o70_unknownF6() { } push(-1); - debug(1,"stub o70_unknownF6"); + debug(1,"stub o70_getCharIndexInString"); } void ScummEngine_v70he::o70_setFilePath() { diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp index 9d6d6b94cf..4812ce276a 100644 --- a/scumm/script_v80he.cpp +++ b/scumm/script_v80he.cpp @@ -144,7 +144,7 @@ void ScummEngine_v80he::setupOpcodes() { OPCODE(o80_writeConfigFile), OPCODE(o6_wordVarInc), /* 50 */ - OPCODE(o72_unknown50), + OPCODE(o72_resetCutscene), OPCODE(o6_invalid), OPCODE(o72_findObjectWithClassOf), OPCODE(o6_wordArrayInc), @@ -339,19 +339,19 @@ void ScummEngine_v80he::setupOpcodes() { OPCODE(o72_redimArray), OPCODE(o60_readFilePos), /* EC */ - OPCODE(o72_unknownEC), + OPCODE(o72_copyString), OPCODE(o70_getStringWidth), OPCODE(o70_getStringLen), - OPCODE(o72_unknownEF), + OPCODE(o70_appendString), /* F0 */ - OPCODE(o72_unknownF0), - OPCODE(o70_stringCompare), + OPCODE(o72_concatString), + OPCODE(o70_compareString), OPCODE(o72_checkGlobQueue), OPCODE(o72_readINI), /* F4 */ OPCODE(o72_writeINI), - OPCODE(o70_unknownF5), - OPCODE(o70_unknownF6), + OPCODE(o70_getStringLenForWidth), + OPCODE(o70_getCharIndexInString), OPCODE(o6_invalid), /* F8 */ OPCODE(o72_getResourceSize), diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 37d9daf763..4688ce91a3 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -90,11 +90,11 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o90_getSegmentAngle), /* 24 */ OPCODE(o90_getDistanceBetweenPoints), - OPCODE(o90_unknown25), - OPCODE(o90_unknown26), - OPCODE(o90_unknown27), + OPCODE(o90_unknown25), // o90_getSpriteInfo + OPCODE(o90_unknown26), // o90_setSpriteInfo + OPCODE(o90_unknown27), // o90_getSpriteGroupInfo /* 28 */ - OPCODE(o90_unknown28), + OPCODE(o90_unknown28), // o90_setSpriteGroupInfo OPCODE(o90_getWizData), OPCODE(o6_invalid), OPCODE(o90_startScriptUnk), @@ -111,7 +111,7 @@ void ScummEngine_v90he::setupOpcodes() { /* 34 */ OPCODE(o90_findAllObjectsWithClassOf), OPCODE(o90_getPolygonOverlap), - OPCODE(o90_unknown36), + OPCODE(o90_cond), OPCODE(o90_dim2dim2Array), /* 38 */ OPCODE(o6_invalid), @@ -144,7 +144,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o80_writeConfigFile), OPCODE(o6_wordVarInc), /* 50 */ - OPCODE(o72_unknown50), + OPCODE(o72_resetCutscene), OPCODE(o6_invalid), OPCODE(o72_findObjectWithClassOf), OPCODE(o6_wordArrayInc), @@ -339,19 +339,19 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o72_redimArray), OPCODE(o60_readFilePos), /* EC */ - OPCODE(o72_unknownEC), + OPCODE(o72_copyString), OPCODE(o70_getStringWidth), OPCODE(o70_getStringLen), - OPCODE(o72_unknownEF), + OPCODE(o70_appendString), /* F0 */ - OPCODE(o72_unknownF0), - OPCODE(o70_stringCompare), + OPCODE(o72_concatString), + OPCODE(o70_compareString), OPCODE(o72_checkGlobQueue), OPCODE(o72_readINI), /* F4 */ OPCODE(o72_writeINI), - OPCODE(o70_unknownF5), - OPCODE(o70_unknownF6), + OPCODE(o70_getStringLenForWidth), + OPCODE(o70_getCharIndexInString), OPCODE(o6_invalid), /* F8 */ OPCODE(o72_getResourceSize), @@ -1510,7 +1510,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() { } } -void ScummEngine_v90he::o90_unknown36() { +void ScummEngine_v90he::o90_cond() { int a = pop(); int b = pop(); int c = pop(); -- cgit v1.2.3