When the noop flag was set on a MIDI event by the AGOS Simon 1 Windows or GMF
parsers, it would not be cleared when parsing the next event, leading to all
subsequent MIDI events being ignored.
Fixed this by setting the noop flag to false when it is not applicable to a
MIDI event.
Guard agains bug where the path is stripped incorrectly for:
`openXLib("C:\fileio.dll")`
The `.dll` part isn't stripped correctly when trying to open the files.
This code attempted to skip calling the function that finds script 0's
export block, but this never happened because it tests the wrong offset.
Even if it tested the right offset, it would have just been duplicating
what the function does.
Parts of the code of Unp64 comes from Exomizer, a tool which uses
as modified Zlib license which is not compatible with GPL. The author of
Exomizer, Magnus Lind, has given permission to distribute this code under
unmodified Zlib license, so I have updated that here.
(The author of Unp64, iAN CooG, has agreed to let us distribute his code
under a GPL license. Or any license we want, to be precise.)
newText is an escaped filename, which escapes characters like
: and /, which are essential for URLs. Use unescaped version
like original OpenSLUDGE does, as otherwise URLs get mangled
and become unusable.
loadHSI calls reserveBackdrop, which resets camera values.
Apply camera position and zoom in loadBackdrop after calling
loadHSI, so the stored camera state gets preserved.
The engine is using -1 as an undefined direction, so keep it that
way after save & restore cycle. Otherwise persons will spin around
for a while trying to rotate themselves to 65535 degrees when
aligning to a region with undefined direction.
Only cursors drawn from scripts must be copied in _cursorSprites, not the ones loaded from executable.
This simplifies a lot of globals from the Draw object, that were needed only in the cursor-from-exec case.
Note: other GOB games are not impacted even if shared code from draw_v2.cpp, inter_v1.cpp is modified (_cursorHotspotsX and _doCursorPalettes are non-null only in Adibou 2).
There are some values that are read from stream and never changed by the calculations. Since they are used as parameter on expensive math functions like cos() and tan(), it would be worth to pre-calculate their values and use them when needed.
Currently we have bunch of else-if and only one of them triggered. When
e.g. aspect ratio correction and resolution changes only aspect ratio is
covered by restoration. If this fails the code retries the same mode endlessly