[Scummvm-devel] SCI file handling revamp

Lars Skovlund lskovlun at image.dk
Thu Feb 26 13:01:15 CET 2009


On Tue, Feb 24, 2009 at 11:52:09PM -0500, Max Horn wrote:
> Hi folks,
> 
> I had a first go at revamping the SCI file handling code to use our  
> portable file APIs, instead of the existing code which relied on stuff  
> like chdir, getcwd, being able to fwrite to arbitrary files etc.
> 
> It is not yet feature complete, mainly because I don't know how to  
> test all features, and in some cases it was not quite clear how to  
> implement those. E.g. it is likely that character im-/export in QfG is  
> broken with this patch. for starters, it is broken as the target name  
> is prepended to all files im-/exported; for the QfG series the string  
> should likely always be "qfg", but that's easy enough to change. Also,  
> maybe we should prepend the gameid and not the targetname.
> 
> Furthemore, file "mirroring" is not implemented, nor is opening files  
> for both reading and writing. 

You probably guessed this, but the main reason for "mirroring" is that
the game media may be write protected. Think about how a game might
handle settable global options. The best example of this would be the
Hoyle series, although other games may have them as well. These would
be stored across sessions in external files. Such options would have
to have default values, either assigned by a script, or, indeed, by
shipping a set of options files on the game media.

Lots of games use external files for storage; I can't think of any
others that need default versions. 

Lars




More information about the Scummvm-devel mailing list