Even though strcpy in SegManager isn't a problem, our forbidden symbols
list being defined at preprocessor level, we won't be able to use this
name anymore.
Fixes reading settings from game.opt in HOYLE5, where most strings
begin with spaces. SSCI called atoi() which handles this, and so did
we, until it was changed during a large refactor in
3f91726765
We have lots and lots of -Wimplicit-fallthrough warnings, and I
don't know if it's worth fixing them or not. But if we want to,
this is how it can be done.
This change invalidates earlier SCI32 save games, which separated
arrays and strings in an incompatible manner. Old save games
contain invalid references to a string segment which no longer
exists, and contain incompatible array structures that lack
critical type information.
This entire kString code needs to be reviewed/refactored, but
at least this fix is more complete than the last one.
Thanks to @lordhoto and @wjp for their assistance.
This implementation is not 100% engine accurate, but it is
more accurate than what was there, and hopefully the differences
between this and the engine code are merely cosmetic.
The known (intentional) differences are:
1. Uses ScummVM rects inside the engine code, converting to/from
SCI rects on the kernel edges and when scaling
2. Fewer side effects when performing operations that *should*
have been pure from the start (like text dimension calculation).
Still not side-effect-free, but at least things like colours
and alignment do not need to be reset every time a measurement
is taken, unlike in the actual engine.
Editor controls and some other kBitmap code are temporarily
disabled as a result of changes to GfxText32 until they can be
updated to be engine-accurate.
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
This is to properly fix bug #3601090 without removing any functionality.
The additional check ensures that the look and hand icons work with the
jar. Many thanks to lskovlun for debugging this and providing a fix
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
The rawString variable is no longer pointing to invalidated data. This
fixes cases where strings are manipulated by game scripts, such as the
graveyard and rada drum puzzles in GK1