[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.329,2.330 script_v100he.cpp,2.41,2.42 script_v72he.cpp,2.201,2.202 script_v7he.cpp,2.125,2.126 script_v80he.cpp,2.72,2.73 script_v90he.cpp,2.123,2.124
kirben
kirben at users.sourceforge.net
Wed Feb 2 04:09:01 CET 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11162/scumm
Modified Files:
intern.h script_v100he.cpp script_v72he.cpp script_v7he.cpp
script_v80he.cpp script_v90he.cpp
Log Message:
Merge two opcode, move two opcodes back to HE70.
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.329
retrieving revision 2.330
diff -u -d -r2.329 -r2.330
--- intern.h 1 Feb 2005 06:37:30 -0000 2.329
+++ intern.h 2 Feb 2005 12:05:00 -0000 2.330
@@ -661,6 +661,7 @@
virtual void redrawBGAreas();
+ int setupStringArray(int size);
void appendSubstring(int dst, int src, int len2, int len);
int findObject(int x, int y, int num, int *args);
@@ -675,9 +676,11 @@
void o70_findObject();
void o70_quitPauseRestart();
void o70_kernelSetFunctions();
+ void o70_copyString();
void o70_getStringWidth();
void o70_getStringLen();
void o70_appendString();
+ void o70_concatString();
void o70_compareString();
void o70_readINI();
void o70_writeINI();
@@ -734,6 +737,7 @@
virtual void writeArray(int array, int idx2, int idx1, int value);
void redimArray(int arrayId, int newDim2start, int newDim2end,
int newDim1start, int newDim1end, int type);
+ int setupStringArray(int size);
int readFileToArray(int slot, int32 size);
void writeFileFromArray(int slot, int resID);
@@ -787,9 +791,6 @@
void o72_getPixel();
void o72_pickVarRandom();
void o72_redimArray();
- void o72_copyString();
- void o72_appendString();
- void o72_concatString();
void o72_checkGlobQueue();
void o72_readINI();
void o72_writeINI();
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.41
retrieving revision 2.42
diff -u -d -r2.41 -r2.42
--- script_v100he.cpp 1 Feb 2005 06:37:30 -0000 2.41
+++ script_v100he.cpp 2 Feb 2005 12:05:00 -0000 2.42
@@ -322,9 +322,9 @@
OPCODE(o6_getState),
/* E0 */
OPCODE(o70_compareString),
- OPCODE(o72_copyString),
- OPCODE(o72_appendString),
- OPCODE(o72_concatString),
+ OPCODE(o70_copyString),
+ OPCODE(o70_appendString),
+ OPCODE(o70_concatString),
/* E4 */
OPCODE(o70_getStringLen),
OPCODE(o70_getStringLenForWidth),
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.201
retrieving revision 2.202
diff -u -d -r2.201 -r2.202
--- script_v72he.cpp 31 Jan 2005 00:27:30 -0000 2.201
+++ script_v72he.cpp 2 Feb 2005 12:05:00 -0000 2.202
@@ -338,12 +338,12 @@
OPCODE(o72_redimArray),
OPCODE(o60_readFilePos),
/* EC */
- OPCODE(o72_copyString),
+ OPCODE(o70_copyString),
OPCODE(o70_getStringWidth),
OPCODE(o70_getStringLen),
- OPCODE(o72_appendString),
+ OPCODE(o70_appendString),
/* F0 */
- OPCODE(o72_concatString),
+ OPCODE(o70_concatString),
OPCODE(o70_compareString),
OPCODE(o72_checkGlobQueue),
OPCODE(o72_readINI),
@@ -494,6 +494,13 @@
}
}
+int ScummEngine_v72he::setupStringArray(int size) {
+ writeVar(0, 0);
+ defineArray(0, kStringArray, 0, 0, 0, size + 1);
+ writeArray(0, 0, 0, 0);
+ return readVar(0);
+}
+
void ScummEngine_v72he::readArrayFromIndexFile() {
int num;
int a, b, c;
@@ -1822,66 +1829,6 @@
ah->dim2end = TO_LE_32(newDim2end);
}
-void ScummEngine_v72he::o72_copyString() {
- int dst, size;
- int src = pop();
-
- size = resStrLen(getStringAddress(src)) + 1;
-
- writeVar(0, 0);
- defineArray(0, kStringArray, 0, 0, 0, size);
- writeArray(0, 0, 0, 0);
- dst = readVar(0);
-
- appendSubstring(dst, src, -1, -1);
-
- push(dst);
- debug(1,"o72_copyString");
-}
-
-void ScummEngine_v72he::o72_appendString() {
- 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);
-
- appendSubstring(dst, src, srcOffs, len);
-
- push(dst);
- debug(1,"o72_appendString");
-}
-
-void ScummEngine_v72he::o72_concatString() {
- int dst, size;
-
- int src2 = pop();
- int src1 = pop();
-
- size = resStrLen(getStringAddress(src1));
- size += resStrLen(getStringAddress(src2)) + 1;
-
- writeVar(0, 0);
- defineArray(0, kStringArray, 0, 0, 0, size);
- writeArray(0, 0, 0, 0);
-
- dst = readVar(0);
-
- appendSubstring(dst, src1, 0, -1);
- appendSubstring(dst, src2, 0, -1);
-
- push(dst);
- debug(1,"o72_concatString");
-}
-
void ScummEngine_v72he::o72_checkGlobQueue() {
byte subOp = fetchScriptByte();
int idx = pop();
Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.125
retrieving revision 2.126
diff -u -d -r2.125 -r2.126
--- script_v7he.cpp 2 Feb 2005 00:31:56 -0000 2.125
+++ script_v7he.cpp 2 Feb 2005 12:05:00 -0000 2.126
@@ -337,12 +337,12 @@
OPCODE(o60_redimArray),
OPCODE(o60_readFilePos),
/* EC */
- OPCODE(o6_invalid),
+ OPCODE(o70_copyString),
OPCODE(o70_getStringWidth),
OPCODE(o70_getStringLen),
OPCODE(o70_appendString),
/* F0 */
- OPCODE(o6_invalid),
+ OPCODE(o70_concatString),
OPCODE(o70_compareString),
OPCODE(o6_invalid),
OPCODE(o70_readINI),
@@ -375,6 +375,13 @@
return _opcodesv70he[i].desc;
}
+int ScummEngine_v70he::setupStringArray(int size) {
+ writeVar(0, 0);
+ defineArray(0, kStringArray, 0, size + 1);
+ writeArray(0, 0, 0, 0);
+ return readVar(0);
+}
+
void ScummEngine_v70he::appendSubstring(int dst, int src, int srcOffs, int len) {
int dstOffs, value;
int i = 0;
@@ -714,6 +721,19 @@
}
}
+void ScummEngine_v70he::o70_copyString() {
+ int dst, size;
+ int src = pop();
+
+ size = resStrLen(getStringAddress(src)) + 1;
+ dst = setupStringArray(size);
+
+ appendSubstring(dst, src, -1, -1);
+
+ push(dst);
+ debug(1,"o70_copyString");
+}
+
void ScummEngine_v70he::o70_getStringWidth() {
int array, pos, len;
int chr, width = 0;
@@ -821,12 +841,7 @@
int src = pop();
size = len - srcOffs + 2;
-
- writeVar(0, 0);
- defineArray(0, kStringArray, 0, size);
- writeArray(0, 0, 0, 0);
-
- dst = readVar(0);
+ dst = setupStringArray(size);
appendSubstring(dst, src, srcOffs, len);
@@ -834,6 +849,23 @@
debug(1,"o70_appendString");
}
+void ScummEngine_v70he::o70_concatString() {
+ int dst, size;
+
+ int src2 = pop();
+ int src1 = pop();
+
+ size = resStrLen(getStringAddress(src1));
+ size += resStrLen(getStringAddress(src2)) + 1;
+ dst = setupStringArray(size);
+
+ appendSubstring(dst, src1, 0, -1);
+ appendSubstring(dst, src2, 0, -1);
+
+ push(dst);
+ debug(1,"o70_concatString");
+}
+
void ScummEngine_v70he::o70_compareString() {
byte *addr, *addr2;
int i = 0;
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.72
retrieving revision 2.73
diff -u -d -r2.72 -r2.73
--- script_v80he.cpp 30 Jan 2005 11:03:47 -0000 2.72
+++ script_v80he.cpp 2 Feb 2005 12:05:00 -0000 2.73
@@ -336,12 +336,12 @@
OPCODE(o72_redimArray),
OPCODE(o60_readFilePos),
/* EC */
- OPCODE(o72_copyString),
+ OPCODE(o70_copyString),
OPCODE(o70_getStringWidth),
OPCODE(o70_getStringLen),
- OPCODE(o72_appendString),
+ OPCODE(o70_appendString),
/* F0 */
- OPCODE(o72_concatString),
+ OPCODE(o70_concatString),
OPCODE(o70_compareString),
OPCODE(o72_checkGlobQueue),
OPCODE(o72_readINI),
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.123
retrieving revision 2.124
diff -u -d -r2.123 -r2.124
--- script_v90he.cpp 1 Feb 2005 04:58:14 -0000 2.123
+++ script_v90he.cpp 2 Feb 2005 12:05:00 -0000 2.124
@@ -336,12 +336,12 @@
OPCODE(o72_redimArray),
OPCODE(o60_readFilePos),
/* EC */
- OPCODE(o72_copyString),
+ OPCODE(o70_copyString),
OPCODE(o70_getStringWidth),
OPCODE(o70_getStringLen),
- OPCODE(o72_appendString),
+ OPCODE(o70_appendString),
/* F0 */
- OPCODE(o72_concatString),
+ OPCODE(o70_concatString),
OPCODE(o70_compareString),
OPCODE(o72_checkGlobQueue),
OPCODE(o72_readINI),
More information about the Scummvm-git-logs
mailing list