[Scummvm-devel] Savefiles
Marcus Comstedt
marcus at mc.pp.se
Sun Dec 15 09:36:02 CET 2002
Max Horn <max at quendi.de> writes:
> I am not happy at all with the idea of subclassing OSystem from a
> SaveFileManager class. That seems just plain wrong to me, it makes no
> sense from a logic point of view.
Well, it was mainly to have the prototypes and default implementations
in the same file as the SaveFile declaration. I can put them directly
in OSystem if you like it better.
> Rather, either add a SaveFileManager *getSaveFileManager(); method to
> OSystem, or find some other way to obtain a reference to the
> SaveFileManager. But changing OSystem to subclass that from it is an
> abuse of the design.
That is also a possibility of course. It does complicate memory
management a bit though, since the SaveFileManager object would have
to be constructed and destructed somewhere.
> Otherwise, I think this is a good idea. It'll clash a bit with the
> savegame compression patch I have here, but then we are still waiting
> for permission to use LZO under the LGPL.
A generic compressor would simply wrap the SaveFile object with an
outer layer I suppose, so the main question there is where the actual
wrapping takes place (should open_savefile do it, or the caller of
open_savefile?).
If the compression is added, could you make it compatible with the
compression that the Dreamcast port currently does? (It just puts the
whole save through zlib.)
// Marcus
More information about the Scummvm-devel
mailing list