As an alternative to using the Screen class's functions, we can let
the VQA decoder draw directly to the backend. This won't work if the
game uses "hi-res mode", but I don't think that's ever the case for
Malcolm's Revenge. I believe the KyraEngine_MR::playVQA() function
ensures that the screen is properly updated after the movie has
finished.
This almost limits the VQA rewrite to vqa.cpp and vqa.h. Whether it's
better this way than changing the Screen functions to take a 'pitch'
parameter...? I don't know. But it's an alternative.
- fix some glitches in CGA rendering mode
- revert most of 66da4777d4 (instead of having lots of EGA dithering routines throughout the whole EOB code we're going to implement some post-processing code in updateScreen())
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.
This is a regression from 86a817beb5.
Formerly Kyra always queried the render_mode and initializes its Screen
functionality accordingly, even when the game actually only supported VGA.
While in the "Edit game..." options only VGA was selectable, the global options
still allowed for example EGA to be selected and thus messing up the internal
state. I only check the render_mode setting for EoB 1 and 2 now, which are
the only games which support the setting inside Screen.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
drawChar is overloaded in FontSJIS. One takes a "Surface &" as first
parameter another one "void *", they furthermore have the exact same
number of required parameters. The one "void *" just had a few extra
parameters with default values. This resulted in a bug in SCUMM, where
"VirtScreen *" (a subclass of Surface) was passed instead of "VirtScreen &"
and thus the method taking "void *" was incorrectly used.
To make it easier to spot such bugs in the future I just removed the default
values and thus disallow such calls.
- made use of LordHotos graphics/sjis code to reduce code duplication
- japanese mode for version 3 and 5 works fine now with few exceptions (some line spacing glitches in MI1 intro etc.)
svn-id: r53554
These functions are only used internally be Engine subclasses, and
by moving them to a separate header we can reduce indirect header
dependencies.
svn-id: r48934
The idea behind this is exactly the same as behind r48620,
but it affects all engines, thus engine authors can now use
CursorMan.replaceCursor without having to worry about possible
memory leaks or the like.
svn-id: r48626