[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.311,1.312 resource_v4.cpp,1.23,1.24
Max Horn
fingolfin at users.sourceforge.net
Sun Apr 10 06:17:06 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1508
Modified Files:
resource.cpp resource_v4.cpp
Log Message:
Read the RNAM data (might be useful for debugging)
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -d -r1.311 -r1.312
--- resource.cpp 10 Apr 2005 12:58:56 -0000 1.311
+++ resource.cpp 10 Apr 2005 13:16:48 -0000 1.312
@@ -345,10 +345,15 @@
break;
case MKID('RNAM'):
- // Names of rooms. Maybe we should read them and put them
- // into a table, for use by the debugger?
- _fileHandle->seek(itemsize - 8, SEEK_CUR);
- debug(9, "found RNAM block, skipping");
+ // Names of rooms. Maybe we should put them into a table, for use by the debugger?
+ for (int room; (room = _fileHandle->readByte()); ) {
+ char buf[10];
+ _fileHandle->read(buf, 9);
+ buf[9] = 0;
+ for (i = 0; i < 9; i++)
+ buf[i] ^= 0xFF;
+ debug(5, "Room %d: '%s'\n", room, buf);
+ }
break;
case MKID('DLFL'):
@@ -994,7 +999,8 @@
void ScummEngine_v8::readMAXS(int blockSize) {
debug(9, "readMAXS: MAXS has blocksize %d", blockSize);
- _fileHandle->seek(50 + 50, SEEK_CUR); // 176 - 8
+ _fileHandle->seek(50, SEEK_CUR); // Skip over SCUMM engine version
+ _fileHandle->seek(50, SEEK_CUR); // Skip over data file version
_numVariables = _fileHandle->readUint32LE(); // 1500
_numBitVariables = _fileHandle->readUint32LE(); // 2048
_fileHandle->readUint32LE(); // 40
@@ -1023,7 +1029,8 @@
void ScummEngine_v7::readMAXS(int blockSize) {
debug(9, "readMAXS: MAXS has blocksize %d", blockSize);
- _fileHandle->seek(50 + 50, SEEK_CUR);
+ _fileHandle->seek(50, SEEK_CUR); // Skip over SCUMM engine version
+ _fileHandle->seek(50, SEEK_CUR); // Skip over data file version
_numVariables = _fileHandle->readUint16LE();
_numBitVariables = _fileHandle->readUint16LE();
_fileHandle->readUint16LE();
Index: resource_v4.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v4.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- resource_v4.cpp 10 Apr 2005 12:58:57 -0000 1.23
+++ resource_v4.cpp 10 Apr 2005 13:16:49 -0000 1.24
@@ -87,9 +87,15 @@
switch (blocktype) {
case 0x4E52: // 'NR'
- // Names of rooms. Maybe we should read them and put them
- // into a table, for use by the debugger?
- _fileHandle->seek(itemsize - 6, SEEK_CUR);
+ // Names of rooms. Maybe we should put them into a table, for use by the debugger?
+ for (int room; (room = _fileHandle->readByte()); ) {
+ char buf[10];
+ _fileHandle->read(buf, 9);
+ buf[9] = 0;
+ for (int i = 0; i < 9; i++)
+ buf[i] ^= 0xFF;
+ debug(5, "Room %d: '%s'\n", room, buf);
+ }
break;
case 0x5230: // 'R0'
More information about the Scummvm-git-logs
mailing list