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

Max Horn max at quendi.de
Wed Sep 16 00:19:51 CEST 2009


Am 16.09.2009 um 00:10 schrieb Walter van Niftrik:

> I'd like to take a step back and take a look at the root of the  
> problem.
> This is my understanding of the issue at hand:
>
> We know that SSCI does array access on strings and string access on  
> arrays.
>
> This is ugly but if it works in SSCI, we should be able to make it  
> work
> by storing strings the same way as we store arrays. This means that if
> our segment is reg_t-based, any raw data should be stored only in  
> reg_t
> offset fields. If data is copied back and forth between raw and
> reg_t-based segments, it will need to be converted accordingly. such
> that we always have consistent data storage. (Our current  
> implementation
> does not do this).
>
> We could then create a set of helper functions for array and string
> access, that transparently handle both raw and reg_t segments. These
> helper functions could then be used in the kernel functions instead of
> the direct pointer dereferencing we do now.

Why again do we need to store and handle both raw and reg_t based  
data? (Considering that the original engine apparently didn't do  
that) ? As opposed to always storing data raw, or always storing it  
reg_t based?



Bye,
Max




More information about the Scummvm-devel mailing list