[Scummvm-devel] Resource problems

Jeroen Janssen japj at darius.demon.nl
Wed Nov 21 10:23:01 CET 2001


David Given wrote:

> Mmf. I'd managed to decipher most of that from the ScummVM source, but I 
> wasn't aware of all the different versions.


well, that's probably a thing we need to document to

 
> It currently looks like:
> 
> 	SArchive (deals with a complete SCUMM file or file set)
> 	  SRoom (deals with an individual room in an archive)
> 	    SResource (deals with a resource in a room)
> 
> ...and it's got to the stage of loading the resource and successfully 
> creating all the SRoom objects. I didn't know about the LFLF chunks, so I'll 
> have to add another layer there. Also, my terminology may need changing --- I 
> was thinking 'archive' for the entire file, and 'resource' for an entity in 
> that file. And I can't think of a good way of making it work on all format of 
> files --- parsing the chunk structure is easy enough, but I don't know enough 
> about the innards of each resource. (For example, is a V5 SOUN resource the 
> same format as a V, er, 3 SO resource? I doubt it.)


well, ideally you would want some kind of 'chunk' plugin mechanism:


* determine what interpreter version the archive is for

* determine what the 'archive' format is

* register chunk 'plugins' based upon the above information
* 'generic' parse through the archive (using the chunk plugins to extract needed information)

this would allow you to reuse chunk 'plugins' if they're the same for different interpreter versions and both allow to add new chunk plugins for chunk types added in a specific interpreter version.

-- 
Jeroen Janssen





More information about the Scummvm-devel mailing list