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

Max Horn max at quendi.de
Wed Sep 16 00:03:46 CEST 2009


Hi Willem,

thanks for the write-up. This seems to coincide with how I understood  
the situation, so I feel less confused now :).

Based on all this, I would agree that storing all string as reg_t  
arrays is the way to go. It should be rather easy and solve the  
fundamental issue for good.

So, we could turn the StringFrags object into a class like  
Common::String, which provides methods to modify the string it  
represent, but internally does all storage in a reg_t array. I.e. turn  
the imperative style code in stringfrag.cc into a C++ class. To be  
more explicit, this class would offer methods for...
* converting to/from Common::String
* accessing a char at a certain position
* concatenation, extracting substrings, etc. etc.

I think it should be possible to implement this cleanly and quickly :).


Cheers,
Max




More information about the Scummvm-devel mailing list