I noticed that in the Meeps scene there was green
sjis text color. It is always supposed to be black. The
original interpreter can't do anything else. Same
for SCI1, although for different reasons. I think I broke
that when I fixed the PQ2 colors.
The original interpreter supports that, although it is slightly
broken. It will show black boxes for the hires graphics, since
the mode isn't properly checked. I have fixed that here to
show the the lores graphics.
- The main purpose was to move more upscaling logic out of the engine
- This actually contains various precision fixes to the hires code. There
were some comments about being unsure what to. I think I managed to
fix all of these, although it shouldn't make a visible difference, since the
workarounds worked as intended.
- It does actually fix a very minor glitch: The portraits were vertically off
by one pixel. And the opening AVI video is probably also vertically fixed
by one pixel (although the video display in the original is not done very
well, anyway).
Currently the screen shakes will not be scaled to the driver's
screen resolution. This patch fixes that.
Now, this isn't exactly the original behaviour. The screen
shaking was a hardware feature that only EGA and VGA
adapters had. Therefore, the screen shake function is
only implemented in the drivers for these devices. For
all other graphics hardware the drivers have an empty
dummy function for the screen shake (at least from
what I have see). But we needn't be strict here, we can
shake everything...
I noticed that the original PQ2 interpreter can have other text
colors than blue. It can also draw text in yellow and white. I don't
think that it gets used, but I'd rather just fix it, before I try to find
that out...
I have noticed (while playing QFG1VGA) that the engine
makes use of OSystem::warpMouse() which will not work
like that with the drivers that upscale the image. I have
implemented the function for the drivers that need it.
It's basically just the reverse of getMousePos().
I also fixed some of my comments to make more sense.
(KQ1 SCI keeps crashing on recent dev builds)
This is about a missing bitmap buffer. It isn't always needed
for SCI0, but SCI_01 (= KQ1) requires it. For the PC-98 targets
(which are also SCI_01) this had already been fixed in this PR,
but not for other 01 targets.
Next step to get rid of upscaling code in the engine.
Tested with SQ4. Since all these fan-patched versions
seem to work the same way, I am optimistic that the
other games run fine, too. Unfortunately, it is difficult
to obtain these fan patches. I only found one for SQ4.
PQ2 seems to be the oldest of these PC-98 ports. It
uses text mode print, a vertically scaled mouse pointer,
etc. Also, it doesn't really have a 16 colors mode.
I make the necessary adjustments here to provide
both 16 and 8 colors modes, since there is no technical
limitation not to have the 16 colors...
16 colors and 8 colors modes for the SCI0 and SCI1
PC-98 games.
The 8 colors modes are new, the 16 colors mode is
basically the pre-existing mode, just with some
minor fixes (palette, font drawing, etc.).
The final goal is to get rid of the upscaling inside the
engine, but that will require more work on the other
game versions that depend on it.
The alignment can be done inside the drivers. We need it for CGA and early
version CGA b/w only, since we don't have the same (hardware based
requirements) as the original drivers. So we can really clean up the code
here.
This is inconsistent between the drivers, e. g. PQ VGA uses 256,
most of the others seem to have 16. So we just read it from the
driver.
For the games which have a Sierra logo with a palette cycle you
can see the difference right at start, since the EGA mode is
supposed to suppress the palette cycle.
(this commit also has some consistency fixes to initScreen(),
which are irrelevant to the actual performance)
This enables the rgb rendering for all video modes and cleans up the
engine a lot, since the engine can now be more or less agnostic of the
screen pixel format.
This is an idea that came up in the PR. It will remove the black border in
Hercules mode. Currently, there is no other way to enable it except in the
code. It could be added as a launcher option, but having a checkbox just
for the case where Hercules mode is enabled might be a bit too much.
I also turned the monochrome colors into an argument to make it more
flexible.
This is more or less a leftover from the beginnings of my work on the
CGA and Hercules modes. The EGA driver implementation does
nothing except forward the data, so it can just run on the default.
Also remove an unnecessary buffer.