This fixes some slowdowns in Kyra2 with the OpenGL backend for me. Most of the
updateScreen calls saved were introduced by us implementing the original
behavior of hiding the mouse before drawing onto the screen and showing it
again afterwards, since the mouse cursor is not drawn on the game screen in our
implementation (and unlike in the original) this is not necessary.
Formerly when an unsupported block was found the opening would fail. Instead
now all the valid blocks till that occasion will be played.
This fixes an missing sound in Full Throttle (thanks to clone2727 for
reporting), which is using a VOC file which fails to specify the proper block
length for its sound block.
This is a complete rewrite of the AdLib players for ADL and MDY/TBR
files in the Gob engine.
Major changes
1) The AdLib base class is now completely separated from all file
format code and can theoretically be used by any OPL2-based
format (within reason)
2) The new code is far better documented and more readable
3) The MDY player now actually works. The MDY/TBR format is
in reality the MUS/SND format created by AdLib as a simpler
alternative to the ROL format
4) Since the MAME emulator is quite buggy and leads to noticable
wrong percussion in the Gobliins 2 title music, the new AdLib
player will try to create a DOSBox OPL. If it's not compiled in,
or if the user configured opl_driver to "mame", it will print
out appropriate warnings.
Formerly the GMM, AGI and SCI duplicated the logic for USE_SAVEGAME_TIMESTAMP.
Now I added a method to SaveLoadChooser instead, which takes care of this. This
might not be the best placement of such a functionality, thus I added a TODO
which talks about moving it to a better place.
This reduces the code duplication in all client code, which formerly duplicated
the querying of the plugin, game id etc. and now simply calls the newly added
method runModalWithCurrentTarget() on a SaveLoadChooser object.
This is actually always called when a dialog closes, thus manual closing is
not required. It furthermore is actually *bad* to call this from outside the
dialog's code, since it will remove the top dialog from the dialog stack and
thus mess up the GUI in case multiple dialogs are opened.
We already pass the title and process button name to the constructor of
SaveLoadChooser and then do not offer any way of changing it, thus changing
the edit mode of the chooser is kind of pointless and was never actually used.
Instead we pass the mode on SaveLoadChooser construction now.
Geisha's Penetration minigame should be complete now.
This also means that Geisha is now basically complete.
The only thing missing is the MDYPlayer, but since the
music is only played once during the title screen, and it
has a PCM-based fallback (which is currently played), this
is low priority.