[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.127,1.128 saveload.cpp,1.16,1.17 simon.h,1.145,1.146
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sat Oct 8 03:00:36 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga ihnm_introproc.cpp,1.55,1.56 interface.cpp,1.142,1.143 interface.h,1.76,1.77
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.193,1.194 events.cpp,1.68,1.69 interface.cpp,1.143,1.144 isomap.cpp,1.61,1.62 saga.h,1.128,1.129 scene.cpp,1.150,1.151 scene.h,1.79,1.80 script.cpp,1.82,1.83 sfuncs.cpp,1.171,1.172 sprite.cpp,1.66,1.67
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14608
Modified Files:
items.cpp saveload.cpp simon.h
Log Message:
Added/stubbed some Feeble opcodes, and fixed a regression that made it
impossible to load old (and probably new, for that matter) Simon savegames.
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- items.cpp 6 Oct 2005 14:54:25 -0000 1.127
+++ items.cpp 8 Oct 2005 09:59:36 -0000 1.128
@@ -1078,6 +1078,74 @@
}
break;
+ // Feeble opcodes
+ case 191:
+ warning("STUB: script opcode 191");
+ if (_bitArray[5] & 0x0008) {
+ // Clear some variables
+ } else {
+ // Clear some other variables
+ }
+ break;
+
+ case 192:{
+ uint a = getVarOrByte();
+ uint b = getVarOrByte();
+ uint c = getVarOrByte();
+ uint d = getVarOrByte();
+ if (_bitArray[5] & 0x0008) {
+ // Set some variables
+ } else {
+ // Set some other variables
+ }
+ warning("STUB: script opcode 192 (%d, %d, %d, %d)", a, b, c, d);
+ }
+ break;
+
+ case 193:
+ // pause clock
+ warning("STUB: script opcode 193");
+ break;
+
+ case 194:
+ // resume clock
+ warning("STUB: script opcode 194");
+ break;
+
+ case 195:{
+ // Set palette colour?
+ uint blue = getVarOrByte();
+ uint green = getVarOrByte();
+ uint red = getVarOrByte();
+ uint color = getVarOrByte();
+ warning("STUB: script opcode 195 (%d, %d, %d, %d)", blue, green, red, color);
+ }
+ break;
+
+ case 196:{ /* set bit3 */
+ uint bit = getVarOrByte();
+ _bitArray[(bit >> 4) + 32] |= 1 << (bit & 15);
+ }
+ break;
+
+ case 197:{ /* clear bit3 */
+ uint bit = getVarOrByte();
+ _bitArray[(bit >> 4) + 32] &= ~(1 << (bit & 15));
+ }
+ break;
+
+ case 198:{ /* is bit3 clear */
+ uint bit = getVarOrByte();
+ condition = (_bitArray[(bit >> 4) + 32] & (1 << (bit & 15))) == 0;
+ }
+ break;
+
+ case 199:{ /* is bit3 set */
+ uint bit = getVarOrByte();
+ condition = (_bitArray[(bit >> 4) + 32] & (1 << (bit & 15))) != 0;
+ }
+ break;
+
default:
invalid_opcode:;
error("Invalid opcode '%d'", opcode);
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/saveload.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- saveload.cpp 7 Oct 2005 06:59:49 -0000 1.16
+++ saveload.cpp 8 Oct 2005 09:59:36 -0000 1.17
@@ -412,7 +412,11 @@
return false;
}
- f->write(caption, 0x12);
+ if (_game == GAME_FEEBLEFILES) {
+ f->write(caption, 100);
+ } else {
+ f->write(caption, 18);
+ }
f->writeUint32BE(_itemArrayInited - 1);
f->writeUint32BE(0xFFFFFFFF);
@@ -477,6 +481,12 @@
for (i = 0; i != 32; i++)
f->writeUint16BE(_bitArray[i]);
+ // Write the bits in array 3
+ if (_game == GAME_FEEBLEFILES) {
+ for (i = 33; i != 48; i++)
+ f->writeUint16BE(_bitArray[i]);
+ }
+
delete f;
_lockWord &= ~0x100;
@@ -514,9 +524,9 @@
}
if (_game == GAME_FEEBLEFILES) {
- f->read(ident, 18);
- } else {
f->read(ident, 100);
+ } else {
+ f->read(ident, 18);
}
num = f->readUint32BE();
@@ -590,15 +600,21 @@
writeVariable(i, f->readUint16BE());
}
- // write the items in array 6
+ // read the items in array 6
for (i = 0; i != 10; i++) {
_itemArray6[i] = derefItem(f->readUint16BE());
}
- // Write the bits in array 1 & 2
+ // Read the bits in array 1 & 2
for (i = 0; i != 32; i++)
_bitArray[i] = f->readUint16BE();
+ // Read the bits in array 3
+ if (_game == GAME_FEEBLEFILES) {
+ for (i = 33; i != 48; i++)
+ _bitArray[i] = f->readUint16BE();
+ }
+
if (f->ioFailed()) {
error("load failed");
}
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- simon.h 7 Oct 2005 07:36:09 -0000 1.145
+++ simon.h 8 Oct 2005 09:59:36 -0000 1.146
@@ -304,7 +304,7 @@
uint16 _stringIdArray3[20];
uint16 _speechIdArray4[20];
- uint16 _bitArray[32];
+ uint16 _bitArray[48];
int16 _variableArray[256];
FillOrCopyStruct *_fcsPtrArray3[8];
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga ihnm_introproc.cpp,1.55,1.56 interface.cpp,1.142,1.143 interface.h,1.76,1.77
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.193,1.194 events.cpp,1.68,1.69 interface.cpp,1.143,1.144 isomap.cpp,1.61,1.62 saga.h,1.128,1.129 scene.cpp,1.150,1.151 scene.h,1.79,1.80 script.cpp,1.82,1.83 sfuncs.cpp,1.171,1.172 sprite.cpp,1.66,1.67
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list