[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.179,2.180 resource.cpp,1.242,1.243 script_v7he.cpp,2.37,2.38
Travis Howell
kirben at users.sourceforge.net
Mon Aug 23 01:44:31 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.98,2.99 charset.h,2.28,2.29 cursor.cpp,2.11,2.12 script_v5.cpp,1.259,1.260 scumm.h,1.447,1.448
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v7he.cpp,2.38,2.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv515/scumm
Modified Files:
intern.h resource.cpp script_v7he.cpp
Log Message:
More changes for He 7.2 games
Might need HE7.2 class eventually
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.179
retrieving revision 2.180
diff -u -d -r2.179 -r2.180
--- intern.h 23 Aug 2004 05:23:58 -0000 2.179
+++ intern.h 23 Aug 2004 08:41:22 -0000 2.180
@@ -634,6 +634,9 @@
void o7_quitPauseRestart();
void o7_getActorRoom();
void o7_pickupObject();
+ void o7_arrayOps();
+ void o7_dimArray();
+ void o7_startScript();
void o7_startSound();
void o7_cursorCommand();
};
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- resource.cpp 23 Aug 2004 08:35:35 -0000 1.242
+++ resource.cpp 23 Aug 2004 08:41:23 -0000 1.243
@@ -2324,6 +2324,9 @@
_numGlobalObjects = _fileHandle.readUint16LE();
_fileHandle.readUint16LE();
+ // FIXME: Where is this set???
+ _numVerbs = 200;
+
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
// FIXME: Is this correct??? A V6+ game which doesn't use object name
Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.37
retrieving revision 2.38
diff -u -d -r2.37 -r2.38
--- script_v7he.cpp 23 Aug 2004 05:56:29 -0000 2.37
+++ script_v7he.cpp 23 Aug 2004 08:41:23 -0000 2.38
@@ -169,7 +169,7 @@
/* 5C */
OPCODE(o6_if),
OPCODE(o6_ifNot),
- OPCODE(o6_startScript),
+ OPCODE(o7_startScript),
OPCODE(o6_startScriptQuick),
/* 60 */
OPCODE(o6_startObject),
@@ -257,7 +257,7 @@
OPCODE(o6_getActorElevation),
OPCODE(o6_getVerbEntrypoint),
/* A4 */
- OPCODE(o6_arrayOps),
+ OPCODE(o7_arrayOps),
OPCODE(o6_saveRestoreVerbs),
OPCODE(o6_drawBox),
OPCODE(o6_pop),
@@ -287,7 +287,7 @@
OPCODE(o6_talkActor),
OPCODE(o6_talkEgo),
/* BC */
- OPCODE(o6_dimArray),
+ OPCODE(o7_dimArray),
OPCODE(o6_dummy),
OPCODE(o6_startObjectQuick),
OPCODE(o6_startScriptQuick2),
@@ -670,6 +670,103 @@
push(getObjectRoom(act));
}
+void ScummEngine_v7he::o7_dimArray() {
+ if (_heversion <= 71) {
+ ScummEngine_v6:o6_dimArray();
+ return;
+ }
+
+ int data;
+ int type = fetchScriptByte();
+
+ switch (type) {
+ case 5: // SO_INT_ARRAY
+ data = kIntArray;
+ break;
+ case 2: // SO_BIT_ARRAY
+ data = kBitArray;
+ break;
+ case 3: // SO_NIBBLE_ARRAY
+ data = kNibbleArray;
+ break;
+ case 4: // SO_BYTE_ARRAY
+ data = kByteArray;
+ break;
+ case 7: // SO_STRING_ARRAY
+ data = kStringArray;
+ break;
+ case 204: // SO_UNDIM_ARRAY
+ nukeArray(fetchScriptWord());
+ return;
+ default:
+ error("o7_dimArray: default case %d", type);
+ }
+
+ defineArray(fetchScriptWord(), data, 0, pop());
+}
+
+void ScummEngine_v7he::o7_arrayOps() {
+ byte subOp = fetchScriptByte();
+ int array = fetchScriptWord();
+ int b, c, d, len;
+ ArrayHeader *ah;
+ int list[128];
+
+ switch (subOp) {
+ case 7: // SO_ASSIGN_STRING
+ len = resStrLen(_scriptPointer);
+ ah = defineArray(array, kStringArray, 0, len + 1);
+ copyScriptString(ah->data);
+ break;
+ case 205: // SO_ASSIGN_STRING
+ b = pop();
+ len = resStrLen(_scriptPointer);
+ ah = defineArray(array, kStringArray, 0, len + 1);
+ copyScriptString(ah->data + b);
+ break;
+ case 208: // SO_ASSIGN_INT_LIST
+ b = pop();
+ c = pop();
+ d = readVar(array);
+ if (d == 0) {
+ defineArray(array, kIntArray, 0, b + c);
+ }
+ while (c--) {
+ writeArray(array, 0, b + c, pop());
+ }
+ break;
+ case 212: // SO_ASSIGN_2DIM_LIST
+ b = pop();
+ len = getStackList(list, ARRAYSIZE(list));
+ d = readVar(array);
+ if (d == 0)
+ error("Must DIM a two dimensional array before assigning");
+ c = pop();
+ while (--len >= 0) {
+ writeArray(array, c, b + len, list[len]);
+ }
+ break;
+ default:
+ error("o7_arrayOps: default case %d (array %d)", subOp, array);
+ }
+}
+
+void ScummEngine_v7he::o7_startScript() {
+ if (_heversion <= 71) {
+ ScummEngine_v6:o6_startScript();
+ return;
+ }
+
+ int args[16];
+ int script, flags;
+
+ getStackList(args, ARRAYSIZE(args));
+ script = pop();
+ flags = fetchScriptByte();
+
+ runScript(script, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args);
+}
+
void ScummEngine_v7he::o7_startSound() {
byte op;
op = fetchScriptByte();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.98,2.99 charset.h,2.28,2.29 cursor.cpp,2.11,2.12 script_v5.cpp,1.259,1.260 scumm.h,1.447,1.448
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v7he.cpp,2.38,2.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list