[Scummvm-git-logs] scummvm master -> f734be928539659e955d3ea97e4b4a8f13f649a1
rvanlaar
roland at rolandvanlaar.nl
Mon Aug 10 20:40:36 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f734be9285 DIRECTOR: Document free resources list
Commit: f734be928539659e955d3ea97e4b4a8f13f649a1
https://github.com/scummvm/scummvm/commit/f734be928539659e955d3ea97e4b4a8f13f649a1
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-08-10T22:39:53+02:00
Commit Message:
DIRECTOR: Document free resources list
The id of the first free resource is in the RIFX header.
Free resoures have a field that points to the next free resource.
The last free resource in the list is -1.
The nextFreeResourceId seems flag like to imap and mmap resources.
The field is 0 for other resources.
Changed paths:
engines/director/archive.cpp
diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index c5fb369449..1b1d9cbefc 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -481,7 +481,7 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
subStream.readUint32(); // resCount + empty entries
uint32 resCount = subStream.readUint32();
subStream.skip(8); // all 0xFF
- subStream.readUint32(); // unknown
+ subStream.readUint32(); // id of the first free resource, -1 if none.
Common::Array<Resource *> resources;
resources.reserve(resCount);
@@ -496,11 +496,10 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
uint32 offset = subStream.readUint32() + moreOffset;
uint16 flags = subStream.readUint16();
uint16 unk1 = subStream.readUint16();
- uint32 unk2 = subStream.readUint32();
-
- debug(3, "Found RIFX resource index %d: '%s', %d bytes @ 0x%08x (%d), flags: %x unk1: %x unk2: %x",
- i, tag2str(tag), size, offset, offset, flags, unk1, unk2);
+ uint32 nextFreeResourceId = subStream.readUint32(); // for free resources, the next id, flag like for imap and mmap resources
+ debug(3, "Found RIFX resource index %d: '%s', %d bytes @ 0x%08x (%d), flags: %x unk1: %x nextFreeResourceId: %d",
+ i, tag2str(tag), size, offset, offset, flags, unk1, nextFreeResourceId);
// APPL is a special case; it has an embedded "normal" archive
if (rifxType == MKTAG('A', 'P', 'P', 'L') && tag == MKTAG('F', 'i', 'l', 'e'))
return openStream(stream, offset);
More information about the Scummvm-git-logs
mailing list