Fixes LSL2 non-early versions being misidentified and all message boxes
being drawn 10 pixels too low. For example: the copy protection screen.
Thanks to @eriktorbjorn for noticing this inaccuracy
Consolidated kSetShowStyle version/argument checks and updated them to
handle SCI2.1 Mac games and PC demos. (The demos where the wrong
arguments were being applied happened to work anyway.)
Fixes LSL7 Mac pixel dissolve at the start of the game between the
postcard and the boat (rooms 120 and 130)
Now that we correctly pass direction key events to QFG4,
we need to patch the script bugs that they trigger.
These crashes also occur in the original game.
See: 1b4660a508
LB2 floppy is one of the few full version games that was shipped
without a selector vocabulary. Add the necessary selectors for it,
so that saving via the GMM is correctly enabled
Saving from the GMM should now work for the following games as well:
GK2, Lighthouse, LSL7, Phant2, Shivers and Torin
Many thanks to @sluicebox for his help checking the game scripts of
these games
The direction event type changed from 64 in SCI16 to 16 in SCI32.
Fixes direction events not appearing when pressing arrow keys in SCI32
games, such as on the QFG4 character creation screen: bug #13223
In this screen, the UI is refreshed with many short sentences (e.g.
"Strength"), which are drawn very quickly. Since this causes TTS to
constantly start and stop, it introduces an unwanted lag, thus we
skip TTS in that screen
We now remove all color codes from strings, and only handle texts in
TTS if they contain at least one vowel. This allows us to skip texts
such as the one shown when talking to the alien in SQ5 room 500, where
a series of symbols is shown, as part of a joke
kDisplay is used to redraw parts of the UI, so it's not ideal to hook
TTS there, as it keeps spamming sentences that get redrawn in the UI
frequently, such as the intro text and the points in SQ5
This is based on the work done for GSoC by @taylorzhancher in PR #3256
Highlights:
- TTS has been hooked globally onto places where text is shown
- TTS is currently performed for textboxes and button texts
- TTS stops when text windows are disposed (which enhances the in-game
experience)
- No game-specific logic has been added
- This hasn't been extensively tested with all SCI16 games yet
- There will be cases that are not handled properly yet
- The TTS functions have been grouped under a SciTTS class
`SavegameDesc::name` is now easier to understand and safer to use.
Fixes Phant2 regression from 913d943a09
Fixes Phant2 out-of-bounds read in `Console::cmdListSaves`
This was originally always a null terminated string but when SCI32
was added the terminator became optional, leading to a confusing
situation. `name` is now always terminated internally. SCI16 interfaces
continue to terminate the 36th element and SCI32 interfaces continue
to use the first 36 elements as-is.
See: 4357809ce8
Fixes QFG1 Japanese message display when messages are set to
Japanese and subtitles are enabled
Huge thanks to DarkSoul for verifying original PC-98 behavior
Many PQ2 Japanese strings contain escaped newlines ("\n") which we have
not been handling. We have been handling these in getSciLanguageString()
when returning Japanese text but that's not where SSCI does this work.
PQ2's Print procedure in script 255 parses Japanese text itself and our
getSciLanguageString() is never involved.
Now Japanese newline handling is done in the core text measuring and
drawing functions, which is closer to where SSCI did it, but without the
hack of having GetLongest() patch out Japanese newlines like in SSCI.
Fixes bug #13154