[Scummvm-devel] Unifying data loading, saving and printing (SCUMM, Tinsel & Cine, maybe others?)

Max Horn max at quendi.de
Sun Jan 11 16:02:16 CET 2009


Hi folks,

as I just saw a discussion on savegame versioning in the IRC logs, I  
thought I'd bump this thread again....

Cheers,
Max


Am 03.08.2008 um 15:23 schrieb Johannes Schickel:

> On Sunday 03 August 2008 14:54:12 Max Horn wrote:
>>> Also I would propose instead of those BE/LE member functions to
>>> change the Serializer to accept an SeekableSubReadStreamEndian or
>>> similar. For example in Kyra I am using unlike the original
>>> savegames, which used LE, BE for saving. Thus to share as much as
>>> possible loading code (we leave out some unused data) I'm using
>>> SeekableSubReadStreamEndian to read the data.
>>
>> Could you elaborate a bit on this, i.e. explain what the advantage
>> would be?
>
> Well the KYRA engine is able to load both ScummVM savegames and  
> savegames
> from original interpreter (just some specific savegame versions  
> though). For
> reducing the code duplication overhead I'm using an
> SeekableSubReadStreamEndian to specifcy the endianness used by the  
> specific
> format. If I wouldn't do that I would have to write two sperate  
> functions:
> One for loading ScummVM savegames and one for loading original  
> savegames.
> Check out engines/kyra/saveload_hof.cpp for example.
>
> Short: The advantage is reduced code size when supporting different  
> endianess
> savegames. Might be of course a KYRA specific issue though, but I  
> wouldn't
> want to switch to another solution until it offers any  
> advantages :-). So
> that's only thing which I would like to see supported by such a  
> 'versioned'
> serializer apart proper versioning support.
>
> // Johannes
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>





More information about the Scummvm-devel mailing list