[Scummvm-devel] String fragments and system strings in SCI
Walter van Niftrik
walter at vanniftrik-it.nl
Wed Sep 16 00:10:08 CEST 2009
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.
Regards,
Walter
More information about the Scummvm-devel
mailing list