For example: 07 FF 07 21 00
The first 07 is the skull, then ff 07 21 appends the verb referenced in
variable 33. If this verb contains control characters, the result is
something like "07 FF 0A 0F 29 ... Some text".
Now, the bidi algorithm *doesn't* skip all the initial control characters
(they are skipped later in the loop), and it only reverses the text, but
the 07 remains in the beginning. The result is 07 FF 0A 0F 29 ... txet emoS
Use a similar technique like was done for INDY4 - Skip the initial 07
character, then append it in the end, and replace the original one with a
space. This gives 32 FF 0A 0F 29 ... txet emoS 07.
In some versions of Sam & Max, such as the French and German releases,
talking to Evelyn Morrison while wearing the bigfoot costume will
attach some lines to Max even though Sam's voice is used there.
installMenu loads a menu definition from a text cast member. In our
implementation, at load time we coerce the contents to Unicode based on
the platform encoding. Unfortunately for us, Macromedia decided to use
two non-ASCII codepoints for indicating checkmarks and code separators,
which are evaluated as the byte value instead of whatever physical
character they correspond to.
Amending this is slightly hacky, as the UTF-8 equivalent of these
codepoints is two bytes long. The text is first normalised to remove the
platform transformation. The checkmark UTF-8 sequence is replaced with
the single byte equivalent, to maintain compatibility with MacMenu.
Finally, the code separator UTF-8 sequence is used to split the line
between menu definition and script definition.
Fixes the menu system in Eastern Mind.
Several whitespace changes to the output in order to make the resulting
cpp file consistent with how cpp is formatted in the repo.
- Properly align the opening of the first comment block.
- Properly align the closing brace of the Sci namespace scope.
Methods in scifx_to_cpp.py refer to arrays outside of their scope.
Refactored them to take them as parameters instead to improve
readability.
Tested by calling on the .scifx files in the same directory as below.
Output is unchanged.
```
python .\scifx_to_cpp.py .\lsl2.scifx
```
The scifx_to_cpp.py script has methods intermingled with method calls
that execute when you call the script. Moving the method calls under
a "__main__" header to improve readability.
Tested by calling the script like shown below on the .scifx files in
the same directory. The output is the name.
```
python .\scifx_to_cpp.py .\lsl2.scifx
```
This generates a warning if GCC is passed -Wundef.
This will now allow debugging of the Spell behaviour at runtime via
the debug console when code to allow this is added.
Also include room palette fixes for games that were saved with a different video mode. Unfortunately the scripts make changes to the room palette based on VAR_VIDEOMODE. The original interpreter does not fix that.
In the end, once fully understood, the CGA rendering is very similar for all versions. So I did manage to clean out some code. Hercules mode for MI1EGA is broken here, I will have another commit for that, once I understand how it works.
These warnings were emitted by GCC when -Wcast-function-type was passed.
This fixes these by refactoring so the engine only uses a single function
pointer type with the "extra" parameters always present.
Commit 02bd4e46a3 changed AdvancedMetaEngineDetection::composeFileHashMap
to use the punycode-encoded file names, but the AGS engine fallback
detection was still looking for entries in the map using the non-encoded
file names.
This commit both adds punycode-encoding (in case we do have AGS games with
executable that contain non-standard character) and also adds a sanity
checks to avoid crashing if we do have a filename not in the map (which
should not happen, but better safe than sorry).