[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.263,2.264 script_v72he.cpp,2.112,2.113 script_v80he.cpp,2.33,2.34 script_v90he.cpp,2.46,2.47
Max Horn
fingolfin at users.sourceforge.net
Mon Sep 20 12:21:01 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.294,1.295 akos.cpp,1.177,1.178 gfx.cpp,2.312,2.313 gfx.h,1.72,1.73 vars.cpp,1.104,1.105
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.313,2.314
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13727
Modified Files:
intern.h script_v72he.cpp script_v80he.cpp script_v90he.cpp
Log Message:
cleanup
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.263
retrieving revision 2.264
diff -u -d -r2.263 -r2.264
--- intern.h 19 Sep 2004 13:42:25 -0000 2.263
+++ intern.h 20 Sep 2004 19:19:56 -0000 2.264
@@ -357,8 +357,8 @@
ArrayHeader *defineArray(int array, int type, int dim2, int dim1);
int findFreeArrayId();
void nukeArray(int array);
- int readArray(int array, int index, int base);
- void writeArray(int array, int index, int base, int value);
+ virtual int readArray(int array, int index, int base);
+ virtual void writeArray(int array, int index, int base, int value);
void shuffleArray(int num, int minIdx, int maxIdx);
void setCursorTransparency(int a);
@@ -707,11 +707,10 @@
virtual void redrawBGAreas();
ArrayHeader *defineArray(int array, int type, int dim2start, int dim2end, int dim1start, int dim1end);
- int readArray(int array, int idx2, int idx1);
- void writeArray(int array, int idx2, int idx1, int value);
+ virtual int readArray(int array, int idx2, int idx1);
+ 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);
- void shuffleArray(int num, int minIdx, int maxIdx);
int readFileToArray(int slot, int32 size);
void writeFileFromArray(int slot, int resID);
void arrrays_unk2(int dst, int src, int len2, int len);
@@ -731,10 +730,6 @@
/* HE version 72 script opcodes */
void o72_pushDWord();
void o72_addMessageToStack();
- void o72_wordArrayRead();
- void o72_wordArrayIndexedRead();
- void o72_wordArrayWrite();
- void o72_wordArrayIndexedWrite();
void o72_isAnyOf();
void o72_unknown50();
void o72_findObjectWithClassOf();
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.112
retrieving revision 2.113
diff -u -d -r2.112 -r2.113
--- script_v72he.cpp 19 Sep 2004 23:21:09 -0000 2.112
+++ script_v72he.cpp 20 Sep 2004 19:19:56 -0000 2.113
@@ -53,12 +53,12 @@
OPCODE(o72_addMessageToStack),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayRead),
+ OPCODE(o6_wordArrayRead),
/* 08 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayIndexedRead),
+ OPCODE(o6_wordArrayIndexedRead),
/* 0C */
OPCODE(o6_dup),
OPCODE(o6_not),
@@ -133,12 +133,12 @@
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayWrite),
+ OPCODE(o6_wordArrayWrite),
/* 48 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayIndexedWrite),
+ OPCODE(o6_wordArrayIndexedWrite),
/* 4C */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@@ -654,17 +654,6 @@
_scriptPointer += _stringLength;
}
-void ScummEngine_v72he::o72_wordArrayRead() {
- int base = pop();
- push(readArray(fetchScriptWord(), 0, base));
-}
-
-void ScummEngine_v72he::o72_wordArrayIndexedRead() {
- int base = pop();
- int idx = pop();
- push(readArray(fetchScriptWord(), idx, base));
-}
-
void ScummEngine_v72he::o72_isAnyOf() {
int args[128], i = 0;
int num = getStackList(args, ARRAYSIZE(args));
@@ -681,17 +670,6 @@
push(0);
}
-void ScummEngine_v72he::o72_wordArrayWrite() {
- int a = pop();
- writeArray(fetchScriptWord(), 0, pop(), a);
-}
-
-void ScummEngine_v72he::o72_wordArrayIndexedWrite() {
- int val = pop();
- int base = pop();
- writeArray(fetchScriptWord(), pop(), base, val);
-}
-
void ScummEngine_v72he::o72_unknown50() {
int idx;
@@ -719,6 +697,12 @@
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_objectX() {
int object = pop();
int objnum = getObjectIndex(object);
@@ -789,12 +773,6 @@
debug(1,"o72_unknown5A stub (%d)", snd);
}
-void ScummEngine_v72he::o72_wordArrayDec() {
- int var = fetchScriptWord();
- int base = pop();
- writeArray(var, 0, base, readArray(var, 0, base) - 1);
-}
-
void ScummEngine_v72he::o72_startScript() {
int args[16];
int script, flags;
@@ -1729,24 +1707,6 @@
push(readVar(0));
}
-void ScummEngine_v72he::shuffleArray(int num, int minIdx, int maxIdx) {
- int range = maxIdx - minIdx;
- int count = range * 2;
-
- // Shuffle the array 'num'
- while (count--) {
- // Determine two random elements...
- int rand1 = _rnd.getRandomNumber(range) + minIdx;
- int rand2 = _rnd.getRandomNumber(range) + minIdx;
-
- // ...and swap them
- int val1 = readArray(num, 0, rand1);
- int val2 = readArray(num, 0, rand2);
- writeArray(num, 0, rand1, val2);
- writeArray(num, 0, rand2, val1);
- }
-}
-
void ScummEngine_v72he::o72_shuffle() {
int b = pop();
int a = pop();
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.33
retrieving revision 2.34
diff -u -d -r2.33 -r2.34
--- script_v80he.cpp 19 Sep 2004 08:37:19 -0000 2.33
+++ script_v80he.cpp 20 Sep 2004 19:19:57 -0000 2.34
@@ -53,12 +53,12 @@
OPCODE(o72_addMessageToStack),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayRead),
+ OPCODE(o6_wordArrayRead),
/* 08 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayIndexedRead),
+ OPCODE(o6_wordArrayIndexedRead),
/* 0C */
OPCODE(o6_dup),
OPCODE(o6_not),
@@ -133,12 +133,12 @@
OPCODE(o6_invalid),
OPCODE(o80_unknown45),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayWrite),
+ OPCODE(o6_wordArrayWrite),
/* 48 */
OPCODE(o80_unknown48),
OPCODE(o80_unknown49),
OPCODE(o80_unknown4A),
- OPCODE(o72_wordArrayIndexedWrite),
+ OPCODE(o6_wordArrayIndexedWrite),
/* 4C */
OPCODE(o6_invalid),
OPCODE(o80_readConfigFile),
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.46
retrieving revision 2.47
diff -u -d -r2.46 -r2.47
--- script_v90he.cpp 20 Sep 2004 09:16:49 -0000 2.46
+++ script_v90he.cpp 20 Sep 2004 19:19:57 -0000 2.47
@@ -53,12 +53,12 @@
OPCODE(o72_addMessageToStack),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayRead),
+ OPCODE(o6_wordArrayRead),
/* 08 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayIndexedRead),
+ OPCODE(o6_wordArrayIndexedRead),
/* 0C */
OPCODE(o6_dup),
OPCODE(o6_not),
@@ -133,12 +133,12 @@
OPCODE(o6_invalid),
OPCODE(o80_unknown45),
OPCODE(o6_invalid),
- OPCODE(o72_wordArrayWrite),
+ OPCODE(o6_wordArrayWrite),
/* 48 */
OPCODE(o80_unknown48),
OPCODE(o80_unknown49),
OPCODE(o80_unknown4A),
- OPCODE(o72_wordArrayIndexedWrite),
+ OPCODE(o6_wordArrayIndexedWrite),
/* 4C */
OPCODE(o6_invalid),
OPCODE(o80_readConfigFile),
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.294,1.295 akos.cpp,1.177,1.178 gfx.cpp,2.312,2.313 gfx.h,1.72,1.73 vars.cpp,1.104,1.105
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.313,2.314
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list