diff options
author | Max Horn | 2005-04-10 13:16:49 +0000 |
---|---|---|
committer | Max Horn | 2005-04-10 13:16:49 +0000 |
commit | 0553720ca0cf56b5d755bd824a7f0afd79db3060 (patch) | |
tree | 8c202bb09027cc26e0a14c42c644b8460bc30cee /scumm/resource.cpp | |
parent | 232860bc44f6fc6706e554288992483ce0966918 (diff) | |
download | scummvm-rg350-0553720ca0cf56b5d755bd824a7f0afd79db3060.tar.gz scummvm-rg350-0553720ca0cf56b5d755bd824a7f0afd79db3060.tar.bz2 scummvm-rg350-0553720ca0cf56b5d755bd824a7f0afd79db3060.zip |
Read the RNAM data (might be useful for debugging)
svn-id: r17510
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r-- | scumm/resource.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 43199daeff..781195d43c 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -345,10 +345,15 @@ void ScummEngine::readIndexFile() { 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_v5::readMAXS(int blockSize) { 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_v8::readMAXS(int blockSize) { 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(); |