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

Max Horn max at quendi.de
Sun Aug 3 14:54:12 CEST 2008

Am 03.08.2008 um 00:19 schrieb Johannes Schickel:

> On Saturday 02 August 2008 23:50:43 Max Horn wrote:
>> [...] in the approach we chose in Tinsel ...
> Just took a look at the Discworld Serializer code, looks really nice  
> especially the VersionedSerializer TODO entry. I personally think  
> that syncAsFoo should be renamed to serializeFoo though.

The old code in SCUMM and everything is called serializeFoo. But when  
I wrote the Tinsel code, I felt it was not the best choice of name,  
since the code is not just for serializing but also for  
*un*serializing. Hence the name change, though I am frankly not that  
happy with syncAsFoo either. But at least it is neutral when it comes  
to saving vs. loading...

If somebody has a great idea with regards to that, I'd be interested  
in hearing it :)

> 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.
> Just my two cents though :-)

Could you elaborate a bit on this, i.e. explain what the advantage  
would be?

On the other hand, what about loading formats which use mixed  
endianess (happens for IFF type formats, for example) ? Though I am  
not sure whether any of our engines actually needs that, just wanted  
to mention the possibility.


More information about the Scummvm-devel mailing list