There was an unhandled case in chapter 2 when the character is at
the exact Y location and close to the X location to where we asked
him to walk. The code started the walk but without properly setting
the curDirection and trackProtagonist variables. This resulted in the
walk never stopping.
I checked what the original source code is doing for this case and
implemented it in the same way: the character does not start walking.
This fixes bug #7112: DRASCULA: protagonist walking off the screen
As far as I can tell, the lines I removed to draw the search box
are already handled by the call to makeField() above. Also, they
were drawing to the wrong surface, and one of them was in the
wrong direction, which is what triggered an assertion.
The changes in this commit should provide an identical text
placement to the original. In addition to using the original source
code as reference I have checked that is the case by comparing
with DosBox for the intro of the Spanish and English versions as
well as for parts of the game with the English version. I added
comments for the obscure parts (such as the original adding a
space at the end of the last line of text when splitting a string
into several lines, thus impacting how that last line is aligned).
This in particular fixes bug #7111: Incorrect position in texts, not as the
original. However this codes centers the text better than what we see in
DosBox, so the result is not identical.
This change is based on the code before the commit 7cf7f4b
"Rewrote the very confusing centerText() function into something that
makes more sense". The changes in that commit do not all make
sense to me so I reverted the line spacing (to add back 2 pixels between
text lines) and part of the logic to center text. The result looks a lot
closer to the original engine in DosBox, but not identical.
The previous code was reading data of the system's endianness as little endian.
Now the data is converted to little endian before it is read.
Attempt to fix#7100.
Myst previously used the user provided description as the save filename.
This was not working when the user entered chacacters forbidden by the
filesystem.
The actual save format has not changed. Old saves are still compatible,
but must be renamed to 'myst-###.mys' and 'myst-###.mym'.
Fixes 7106.