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
SSCI used a sprintf to handle %c, appending the result to the output,
which is effectively a nop for a zero argument.
This is bug #3368821. Thanks to digitall for tracing it to KFormat
and testing this patch.
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
- Replaced the stub kWinDLL (unused), as well as the not fully implemented kPrintDebug
functions with empty function calls
- Marked several unused or debug kernel functions as stub
- Added some games where the rest of the unimplemented SCI2.1 kernel functions are used
svn-id: r55138
Fixed some endianness issues in Amiga versions, thanks to wjp. Amiga
versions expect a BE VM, thus we adjust accordingly in the places
where memory is accessed directly (i.e. kStrAt, kMemory and all places
that set/get characters from memory)
svn-id: r54521