[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.304,2.305 script_v100he.cpp,2.17,2.18 script_v72he.cpp,2.172,2.173 script_v7he.cpp,2.107,2.108 script_v80he.cpp,2.58,2.59 script_v90he.cpp,2.95,2.96

Travis Howell kirben at users.sourceforge.net
Wed Oct 13 03:59:55 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6617/scumm

Modified Files:
	intern.h script_v100he.cpp script_v72he.cpp script_v7he.cpp 
	script_v80he.cpp script_v90he.cpp 
Log Message:

Remove more duplicates.


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.304
retrieving revision 2.305
diff -u -d -r2.304 -r2.305
--- intern.h	13 Oct 2004 09:39:59 -0000	2.304
+++ intern.h	13 Oct 2004 10:55:50 -0000	2.305
@@ -641,6 +641,7 @@
 	void o70_unknownED();
 	void o70_stringLen();
 	void o70_unknownEF();
+	void o70_unknownF1();
 	void o70_readINI();
 	void o70_writeINI();
 	void o70_unknownF5();
@@ -709,7 +710,6 @@
 					int newDim1start, int newDim1end, int type);
 	int readFileToArray(int slot, int32 size);
 	void writeFileFromArray(int slot, int resID);
-	void arrrays_unk2(int dst, int src, int len2, int len);
 
 	void displayWizImage(const WizImage *pwi);
 	void getWizImageDim(int resnum, int state,  uint32 &w, uint32 &h);
@@ -730,14 +730,12 @@
 	void o72_isAnyOf();
 	void o72_unknown50();
 	void o72_findObjectWithClassOf();
-	void o72_wordArrayInc();
 	void o72_getObjectImageX();
 	void o72_getObjectImageY();
 	void o72_captureWizImage();
 	void o72_getTimer();
 	void o72_setTimer();
 	void o72_unknown5A();
-	void o72_wordArrayDec();
 	void o72_startScript();
 	void o72_startObject();
 	void o72_drawObject();
@@ -765,14 +763,11 @@
 	void o72_pickVarRandom();
 	void o72_redimArray();
 	void o72_unknownEC();
-	void o72_unknownED();
 	void o72_unknownEF();
-	void o72_unknownF1();
+	void o72_unknownF0();
 	void o72_checkGlobQueue();
 	void o72_readINI();
 	void o72_writeINI();
-	void o72_unknownF0();
-	void o72_unknownF4();
 	void o72_unknownF5();
 	void o72_unknownF6();
 	void o72_getResourceSize();

Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -d -r2.17 -r2.18
--- script_v100he.cpp	13 Oct 2004 09:39:59 -0000	2.17
+++ script_v100he.cpp	13 Oct 2004 10:55:50 -0000	2.18
@@ -79,7 +79,7 @@
 		OPCODE(o72_traceStatus),
 		OPCODE(o6_wordVarDec),
 		/* 1C */
-		OPCODE(o72_wordArrayDec),
+		OPCODE(o6_wordArrayDec),
 		OPCODE(o72_deleteFile),
 		OPCODE(o100_dim2dimArray),
 		OPCODE(o100_dimArray),
@@ -324,17 +324,17 @@
 		OPCODE(o6_startScriptQuick2),
 		OPCODE(o6_getState),
 		/* E0 */
-		OPCODE(o72_unknownF1),
+		OPCODE(o70_unknownF1),
 		OPCODE(o72_unknownEC),
 		OPCODE(o72_unknownEF),
 		OPCODE(o72_unknownF0),
 		/* E4 */
 		OPCODE(o70_stringLen),
-		OPCODE(o72_unknownF5),
+		OPCODE(o70_unknownF5),
 		OPCODE(o6_invalid),
-		OPCODE(o72_unknownF6),
+		OPCODE(o70_unknownF6),
 		/* E8 */
-		OPCODE(o72_unknownED),
+		OPCODE(o70_unknownED),
 		OPCODE(o60_readFilePos),
 		OPCODE(o72_getTimer),
 		OPCODE(o6_getVerbEntrypoint),

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.172
retrieving revision 2.173
diff -u -d -r2.172 -r2.173
--- script_v72he.cpp	13 Oct 2004 09:39:59 -0000	2.172
+++ script_v72he.cpp	13 Oct 2004 10:55:50 -0000	2.173
@@ -148,7 +148,7 @@
 		OPCODE(o72_unknown50),
 		OPCODE(o6_invalid),
 		OPCODE(o72_findObjectWithClassOf),
-		OPCODE(o72_wordArrayInc),
+		OPCODE(o6_wordArrayInc),
 		/* 54 */
 		OPCODE(o72_getObjectImageX),
 		OPCODE(o72_getObjectImageY),
@@ -158,7 +158,7 @@
 		OPCODE(o72_getTimer),
 		OPCODE(o72_setTimer),
 		OPCODE(o72_unknown5A),
-		OPCODE(o72_wordArrayDec),
+		OPCODE(o6_wordArrayDec),
 		/* 5C */
 		OPCODE(o6_if),
 		OPCODE(o6_ifNot),
@@ -341,18 +341,18 @@
 		OPCODE(o60_readFilePos),
 		/* EC */
 		OPCODE(o72_unknownEC),
-		OPCODE(o72_unknownED),
+		OPCODE(o70_unknownED),
 		OPCODE(o70_stringLen),
 		OPCODE(o72_unknownEF),
 		/* F0 */
 		OPCODE(o72_unknownF0),
-		OPCODE(o72_unknownF1),
+		OPCODE(o70_unknownF1),
 		OPCODE(o72_checkGlobQueue),
 		OPCODE(o72_readINI),
 		/* F4 */
 		OPCODE(o72_writeINI),
-		OPCODE(o72_unknownF5),
-		OPCODE(o72_unknownF6),
+		OPCODE(o70_unknownF5),
+		OPCODE(o70_unknownF6),
 		OPCODE(o6_invalid),
 		/* F8 */
 		OPCODE(o72_getResourceSize),
@@ -512,31 +512,6 @@
 	}
 }
 
-void ScummEngine_v72he::arrrays_unk2(int dst, int src, int len2, int len) {
-	int edi, value;
-	int i = 0;
-
-	if (len == -1) {
-		len = resStrLen(getStringAddress(src));
-		len2 = 0;
-	}
-
-	edi = resStrLen(getStringAddress(dst));
-
-	len -= len2;
-	len++;
-
-	while (i < len) {
-		writeVar(0, src);
-		value = readArray(0, 0, len2 + i);
-		writeVar(0, dst);
-		writeArray(0, 0, edi + i, value);
-		i++;
-	}
-
-	writeArray(0, 0, edi + i, 0);
-}
-
 void ScummEngine_v72he::copyScriptString(byte *dst) {
 	int i = 0;
 	byte b;
@@ -741,18 +716,6 @@
 	push(r);
 }
 
-void ScummEngine_v72he::o72_wordArrayInc() {
-	int var = fetchScriptWord();
-	int base = pop();
-	writeArray(var, 0, base, readArray(var, 0, base) + 1);
-}
-
-void ScummEngine_v72he::o72_wordArrayDec() {
-	int var = fetchScriptWord();
-	int base = pop();
-	writeArray(var, 0, base, readArray(var, 0, base) - 1);
-}
-
 void ScummEngine_v72he::o72_getObjectImageX() {
 	int object = pop();
 	int objnum = getObjectIndex(object);
@@ -2232,31 +2195,6 @@
 	debug(1,"stub o72_unknownEC");
 }
 
-void ScummEngine_v72he::o72_unknownED() {
-	int array, pos, len;
-	int chr, result = 0;
-
-	len = pop();
-	pos = pop();
-	array = pop();
-
-	if (len == -1) {
-		pos = 0;
-		len = resStrLen(getStringAddress(array));
-	}
-
-	writeVar(0, array);
-	while (pos <= len) {
-		chr = readArray(0, 0, pos);
-		if (chr)
-			result += _charset->getCharWidth(chr);
-		pos++;
-	}
-
-	push(result);
-	debug(1,"stub o72_unknownED");
-}
-
 void ScummEngine_v72he::o72_unknownEF() {
 	int dst, size;
 	int b = pop();
@@ -2299,48 +2237,6 @@
 	debug(1,"stub o72_unknownF0");
 }
 
-void ScummEngine_v72he::o72_unknownF1() {
-	byte *addr, *addr2;
-	int i = 0;
-
-	int id = pop();
-	int id2 = pop();
-
-	addr = getStringAddress(id);
-	if (!addr)
-		error("o72_stringLen: Reference to zeroed array pointer (%d)", id);
-
-	addr2 = getStringAddress(id2);
-	if (!addr)
-		error("o72_stringLen: Reference to zeroed array pointer (%d)", id);
-
-	while(1) {
-		if (*addr != *addr2)
-			break;
-		if (*addr == 0) {
-			push(0);
-			return;
-		}
-
-		addr++;
-		addr2++;
-
-		if (*addr != *addr2)
-			break;
-		if (*addr == 0) {
-			push(0);
-			return;
-		}
-
-		addr++;
-		addr2++;
-		i += 2;
-	}
-
-	push (i);
-	debug(1,"o70_unknownF1 stub (%d, %d, %d)", id, id2, i);
-}
-
 void ScummEngine_v72he::o72_checkGlobQueue() {
 	byte subOp = fetchScriptByte();
 	int idx = pop();
@@ -2403,71 +2299,6 @@
 	}
 }
 
-void ScummEngine_v72he::o72_unknownF5() {
-	int chr, max;
-	int array, len, pos, result = 0;
-	max = pop();
-	pos = pop();
-	array = pop();
-
-	len = resStrLen(getStringAddress(array));
-
-	writeVar(0, array);
-	while (pos <= len) {
-		chr = readArray(0, 0, pos);
-		result += _charset->getCharWidth(chr);
-		if (result >= max) {
-			push(pos);
-			return;
-		}
-		pos++;
-	}
-
-	push(len);
-	debug(1,"stub o72_unknownF5 (%d)", result);
-}
-
-void ScummEngine_v72he::o72_unknownF6() {
-	int len, edi, pos, value, id;
-	value = pop();
-	edi = pop();
-	pos = pop();
-	id = pop();
-
-	if (edi >= 0) {
-		len = resStrLen(getStringAddress(id));
-		if (len < edi)
-			edi = len;
-	} else {
-		edi = 0;
-	}
-
-	if (pos < 0)
-		pos = 0;
-
-	writeVar(0, id);
-	if (edi > pos) {
-		while (edi >= pos) {
-			if (readArray(0, 0, pos) == value) {
-				push(pos);
-				return;
-			}
-			pos++;
-		}
-	} else {
-		while (edi <= pos) {
-			if (readArray(0, 0, pos) == value) {
-				push(pos);
-				return;
-			}
-			pos--;
-		}
-	}
-
-	push(-1);
-	debug(1,"stub o72_unknownF6");
-}
-
 void ScummEngine_v72he::o72_getResourceSize() {
 	int size = 0, type;
 

Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.107
retrieving revision 2.108
diff -u -d -r2.107 -r2.108
--- script_v7he.cpp	13 Oct 2004 09:39:59 -0000	2.107
+++ script_v7he.cpp	13 Oct 2004 10:55:50 -0000	2.108
@@ -347,7 +347,7 @@
 		OPCODE(o70_unknownEF),
 		/* F0 */
 		OPCODE(o6_invalid),
-		OPCODE(o6_invalid),
+		OPCODE(o70_unknownF1),
 		OPCODE(o6_invalid),
 		OPCODE(o70_readINI),
 		/* F4 */
@@ -761,6 +761,48 @@
 	debug(1,"stub o70_unknownEF");
 }
 
+void ScummEngine_v70he::o70_unknownF1() {
+	byte *addr, *addr2;
+	int i = 0;
+
+	int id = pop();
+	int id2 = pop();
+
+	addr = getStringAddress(id);
+	if (!addr)
+		error("o72_stringLen: Reference to zeroed array pointer (%d)", id);
+
+	addr2 = getStringAddress(id2);
+	if (!addr)
+		error("o72_stringLen: Reference to zeroed array pointer (%d)", id);
+
+	while(1) {
+		if (*addr != *addr2)
+			break;
+		if (*addr == 0) {
+			push(0);
+			return;
+		}
+
+		addr++;
+		addr2++;
+
+		if (*addr != *addr2)
+			break;
+		if (*addr == 0) {
+			push(0);
+			return;
+		}
+
+		addr++;
+		addr2++;
+		i += 2;
+	}
+
+	push (i);
+	debug(1,"o70_unknownF1 stub (%d, %d, %d)", id, id2, i);
+}
+
 void ScummEngine_v70he::o70_readINI() {
 	int len;
 	int type;

Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.58
retrieving revision 2.59
diff -u -d -r2.58 -r2.59
--- script_v80he.cpp	13 Oct 2004 09:39:59 -0000	2.58
+++ script_v80he.cpp	13 Oct 2004 10:55:50 -0000	2.59
@@ -147,7 +147,7 @@
 		OPCODE(o72_unknown50),
 		OPCODE(o6_invalid),
 		OPCODE(o72_findObjectWithClassOf),
-		OPCODE(o72_wordArrayInc),
+		OPCODE(o6_wordArrayInc),
 		/* 54 */
 		OPCODE(o72_getObjectImageX),
 		OPCODE(o72_getObjectImageY),
@@ -157,7 +157,7 @@
 		OPCODE(o72_getTimer),
 		OPCODE(o72_setTimer),
 		OPCODE(o72_unknown5A),
-		OPCODE(o72_wordArrayDec),
+		OPCODE(o6_wordArrayDec),
 		/* 5C */
 		OPCODE(o6_if),
 		OPCODE(o6_ifNot),
@@ -340,18 +340,18 @@
 		OPCODE(o60_readFilePos),
 		/* EC */
 		OPCODE(o72_unknownEC),
-		OPCODE(o72_unknownED),
+		OPCODE(o70_unknownED),
 		OPCODE(o70_stringLen),
 		OPCODE(o72_unknownEF),
 		/* F0 */
 		OPCODE(o72_unknownF0),
-		OPCODE(o72_unknownF1),
+		OPCODE(o70_unknownF1),
 		OPCODE(o72_checkGlobQueue),
 		OPCODE(o72_readINI),
 		/* F4 */
 		OPCODE(o72_writeINI),
-		OPCODE(o72_unknownF5),
-		OPCODE(o72_unknownF6),
+		OPCODE(o70_unknownF5),
+		OPCODE(o70_unknownF6),
 		OPCODE(o6_invalid),
 		/* F8 */
 		OPCODE(o72_getResourceSize),

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.95
retrieving revision 2.96
diff -u -d -r2.95 -r2.96
--- script_v90he.cpp	13 Oct 2004 09:39:59 -0000	2.95
+++ script_v90he.cpp	13 Oct 2004 10:55:50 -0000	2.96
@@ -147,7 +147,7 @@
 		OPCODE(o72_unknown50),
 		OPCODE(o6_invalid),
 		OPCODE(o72_findObjectWithClassOf),
-		OPCODE(o72_wordArrayInc),
+		OPCODE(o6_wordArrayInc),
 		/* 54 */
 		OPCODE(o72_getObjectImageX),
 		OPCODE(o72_getObjectImageY),
@@ -157,7 +157,7 @@
 		OPCODE(o72_getTimer),
 		OPCODE(o72_setTimer),
 		OPCODE(o72_unknown5A),
-		OPCODE(o72_wordArrayDec),
+		OPCODE(o6_wordArrayDec),
 		/* 5C */
 		OPCODE(o6_if),
 		OPCODE(o6_ifNot),
@@ -340,18 +340,18 @@
 		OPCODE(o60_readFilePos),
 		/* EC */
 		OPCODE(o72_unknownEC),
-		OPCODE(o72_unknownED),
+		OPCODE(o70_unknownED),
 		OPCODE(o70_stringLen),
 		OPCODE(o72_unknownEF),
 		/* F0 */
 		OPCODE(o72_unknownF0),
-		OPCODE(o72_unknownF1),
+		OPCODE(o70_unknownF1),
 		OPCODE(o72_checkGlobQueue),
 		OPCODE(o72_readINI),
 		/* F4 */
 		OPCODE(o72_writeINI),
-		OPCODE(o72_unknownF5),
-		OPCODE(o72_unknownF6),
+		OPCODE(o70_unknownF5),
+		OPCODE(o70_unknownF6),
 		OPCODE(o6_invalid),
 		/* F8 */
 		OPCODE(o72_getResourceSize),





More information about the Scummvm-git-logs mailing list