Hello,
I've been experimenting with writing a managed (C#) resource loader, and I'm able to read the resource.map file and parse out the types, offsets, and resource files where all of the resources live.
Unfortunately, once I read the data in the requisite resource file, I'm a bit lost how to proceed. According to the specifications here (http://wiki.scummvm.org/index.php/SCI/S ... w_resource), the SCI0 format starts straight off with the bytes for image groups, et al.
In SCI1, from what I can gather, the first byte at the offset is 128 (if it's a VGA game), followed by the resource number (which we already parsed from resource.map), followed by... I don't know what.
I'm assuming this is the compressed resource data and that there is a header buried in there somewhere that tells me the compression algorithm, packed and unpacked size, but the specs don't cover this.
Any hints on what do once you've got the right place to extract the data?
Reading SCI1 view resources
Moderator: ScummVM Team
-
- Posts: 3
- Joined: Tue May 25, 2010 10:38 pm
I wish that were true. I already combed that file and there's some excellent info in it re: VOLs, patches, etc., but the only bits that concern loading views are to check the resource type.
After checking the VGA bit as I mentioned, there's not a lot of detail, at least none that I can read from the source.
After checking the VGA bit as I mentioned, there's not a lot of detail, at least none that I can read from the source.
-
- Posts: 3
- Joined: Tue May 25, 2010 10:38 pm
Nevermind, it looks you were right (naturally). What I was confused with was that the relevant method name was detectVolVersion, and from that code it seemed like VOLs were their own entity, not "resource volumes" in this case. But a more careful read around line 1126 and I can see that after the resource number, it's packed, unpacked, and compression like how I suspected.sev wrote:engines/sci/resource.cpp file is your friend. From there you will know what exactly to do.
Eugene
If I get it working I'll update your specifications page on the wiki.
Cheers!