[Scummvm-devel] SCI strings

Willem Jan Palenstijn wjp at usecode.org
Sun Sep 27 04:02:22 CEST 2009


Hi all,

I've just committed a large update to the SCI engine, converting all string
handling to work with both raw and reg_t-based segments.

It's not optimally clean yet, but I thought it would be better to get things
working first. For now, I've added a set of string utilities to segMan, such as

strcpy(reg_t dest, reg_t src)
strcpy(reg_t dest, const char* src)
getString(reg_t str)

and a couple of others. This allows the majority of kernel functions to work
quite cleanly. However, there is still a bunch that are a bit ugly with this
approach, such as kEditControl.

I copied a lot of the conversion logic from stringfrag.cpp into those utility
functions, but didn't delete it from stringfrag.cpp yet. It could be that some
of the functions in there can be used clean up things like kEditControl.


I've done some basic testing, and things generally seem to work, including for
example the password feature in LSL5.


Comments/improvements/tests would be very welcome :-)


-Willem Jan




More information about the Scummvm-devel mailing list