[Scummvm-devel] String fragments and system strings in SCI

Filippos Karapetis philipk79 at hotmail.com
Wed Sep 16 08:54:31 CEST 2009

Ah that clears things up a bit, thanks :)

So we got two issues, concerning strings:
- Accessing these strings in a ubiquitous way from the code and from game scripts
- Storing some of these strings in savegames

Some games (KQ5 and KQ5CD come to mind) do "invalid" reads, especially in kMemory() and in other places too (I've put relevant comments in the code). Greg's engine doesn't have the full implementation of kMemory either (some of the cases are stubs).

What Max is proposing sounds like a neater solution to the first issue, as it's a bit unclear now regarding when we should use the stringfrag functions or the regular C string functions.

Now, regarding the second issue... it's a bit unrelated to the first one: we don't need to save system strings in savegames (the savegame directory is always the same for the engine, and the error codes shown when typing something wrong are generated on the fly each time), so I think it would be best to remove these from the savegames - and break older savegames too, since they are now filled with a lot of obsolete data


> Date: Wed, 16 Sep 2009 02:34:48 +0200
> From: walter at vanniftrik-it.nl
> To: max at quendi.de
> CC: scummvm-devel at lists.sourceforge.net
> Subject: Re: [Scummvm-devel] String fragments and system strings in SCI
> Max Horn wrote:
> > Maybe that's not necessary. After all, the advantage of using segments  
> > is that we can tell for all data were it comes from. The problem is  
> > that the four SegManager::deref*() methods "hide" this information.  
> > Since we are in C++, we could remove these "typeless" methods, and  
> > replace them by type aware ones. For example, derefString could return  
> > a proxy object which would automatically do the right thing depending  
> > on whether the dereferenced segment is reg_t or raw based...
> >   
> Yes, that's basically what I tried to suggest in my first mail on this 
> topic. :)
> As I pointed out in that email, we can only do that if we store data 
> consistently. Right now we have both raw and reg_t-based data living 
> inside reg_t segments, which complicates matters considerably.
> Regards,
> Walter
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel

Hotmail: Free, trusted and rich email service.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090916/b1b64609/attachment.html>

More information about the Scummvm-devel mailing list