[Scummvm-devel] SCI: Some more TODOs

Max Horn max at quendi.de
Sat Feb 21 21:17:34 CET 2009


Hi Willem, all,

thank you for clarifying some bits, esp. how the character import/ 
export in QfG 2 feature works, roughly.

First a general remark: We should not expose the full filesystem to  
the games. I think that they should only be allowed (and need) to see  
files in their game dir (and subdirs), and savefiles. Everything below  
should be read and implemented with that in mind.

Based on what you wrote, I propose this:

1) Change the implementation of K_FILEIO_FIND_FIRST /  
K_FILEIO_FIND_NEXT to only iterate over files in the savegame manager.  
Users can still import characters from external sources by copying  
(and possibly renaming) those files to their savedir.

2) In order to avoid name classes, and incompatibilities between game  
variants, we need to mangle the file names. How we do that would  
depend on various factors that I don't know yet, so more input is  
required: Are QfG2 character files compatible for all versions of  
QfG2? Are they used to export a char from QfG1 and then import it into  
QfG2 ? Is the character name supposed to be part of the filename?
One simple approach would be to prefix the file names with qfg_  
automatically.

3) All the other file code in kFileIO may have to be extended to work  
with both savefiles and files in the game's resource directory. That  
is, when writing a file, a savefile would always be used. When reading  
a file, we would first check whether a savefile with the right name  
(after mangling) exists. If not, we'd look in the gamedir. (We do  
something similar in SCUMM HE.)

4) The SCI code doesn't seem to clearly distinguish between opening a  
file for reading and for writing. We may have to hack around that.


Does that make sense? Any questions left? :-)

Cheers,
Max




More information about the Scummvm-devel mailing list