That one was a bit heavy-handed: enums really shouldn't be passed as
const references.
Revert changes of:
- Common::CodePage
- Common::EventType
- Common::Keycode
- Common::Language
- Common::Platform
Additionally change ProjectDescription::setLanguage and
ProjectDescription::getLanguage in engines/mtropolis/runtime.{cpp,h} as
those used a Common::Language reference, too.
This change should not alter any game behavior, because no game scripts
are known to contain an instruction that alters an invalid property.
If such a script does exist, it is now handled correctly.
This is to avoid file name inclusion clashes with graphics/palette.h
placed in common code, as uncovered by PR #6471
After discussing with @sluicebox, this is a simpler solution, where
only the offending palette.* files are renamed, without affecting
palette32.*, or introducing a sci prefix in files
We already have remove_const which has the same name as the STL
construct.
Move the STL compliant versions to type-traits.h to match STL more and
lighten util.h.
Type 1 SMF files consist of multiple tracks that are to be played simultaneously
in parallel. Support for this was previously implemented by merging these tracks
into one single track, then treating the result as a regular type 0 SMF file.
This commit adds full support for type 1 files. The parallel tracks are loaded
as subtracks of the parent track and played simultaneously in real time. This
allows for support of MIDI formats with parallel subtracks that do not use the
SMF format (Dark Seed floppy version) or that jump to offsets within each
parallel subtrack (Origin MIDI).
Fixes bug #15660
Limits the workaround for KQ4 broken signals to just the introduction.
We now know that it's the only sound that requires this, and that the
Amiga version added signal 127 to almost every sound.
See: 08b9c26752
Thanks to @athrxx for locating behavior in Amiga driver disassembly
Thanks to @prietveld for reporting
Fixes comets not animating in the star field, bug #15622
Fixes speed and timing when exiting simulator, bug #15610
The introduction scenes are heavily dependent on both CPU speed and the
undefined lag that occurs in the original interpreter when animating
many actors at once. Now our speed throttler adjusts for this.
Thanks to @GermanTribun and @eriktorbjorn for reporting.
Big thanks to @PickledDog for testing and recording on a 386 and a 486.
Add it to engines that have MIDI playback.
This essentially compiles the emulator only when an engine that
can potentially use it (e.g. MIDI) is enabled
gfxdrivers.cpp has become quite large. So I've now made a
separate file for each driver. I also separated the mode
validation and driver init code from the enigine and put
it into an extra file.
SQ4/CD/Windows uses a simiar interpreter to the KQ6 one, minus the hires
graphics support. It has the same upscaling to 640x440 (or 320x220 for small
windows) and also support the same 16 colors mode.
Also removed some whitespace...
I have attached the SQ4 Windows variant to the gfx drivers I made for KQ6.
The 16 colors mode now requires the SCIWV.EXE executable, though. I had
hard coded the 512 bytes color pattern table for KQ6, since I thought it
would remain the only one necessary. But SQ4 has a different table. So I now
load them from the executable.
There might be more Windows games like that, I just currently don't know
about it (probably other SCI_VERSION_1_1 titles). Adding support would be
super easy. But it will not work right out of the box, since I explicitly check
the game IDs in customizeGuiOptions(), to avoid any nonsense to happen.
I made a mistake in that PR by assuming that the
handles for the hires graphics would be unique. So
when removing an object from the drawing chain
I really only removed the first object. But in reality
they often have the same handle and the original
interpreter continues to go over the loop until all
of the same handle have been removed.
Also, the original checks for already existent draw
objects with the same x/y-coordinates.
(items 1- 3 from bug ticket no. 15594)
I have added redrawing functionality for the hires GFX from the
original interpreter. I guess the original only needed that code
to handle WM_PAINT messages (= full window redraw). It also
does actually call a redraw in kDisposeWindow, the same way I
implemented it here, to refresh the inventory. But that is really
only needed for the speech+text mode which isn't supported
in the original. Maybe they ditched the mode only after they
had already implemented that, who knows...
I have also improved the workaround for the out-of-bounds
portraits to catch the case from the bug ticket.
I added a check in kDisposeWindow. It isn't strictly necessary,
but it it makes the code easier to understand.
I also renamed a var that I had previously renamed in a way
that makes no sense. I had renamed it from `upscaledHiresRect'
to 'portraitRect' since it is neither upscaled nor hires (it is just a
lowres rect). But it isn't a portrait rect either. The portraits get
drawn elsewhere. It's more likely to be a picture frame, a GUI
control or an inventory item.
I had issues to run any SCI1 game with MSVC ASan builds.They
always failed to start up with a 'DoSoundMasterVolume: no
previous signatures' error. When I recently had that issue (which
I quickly discussed with digitall on discord) I got it fixed by
simply doing a full rebuild. But not this time. So I looked into it
deeper. And I find it quite surprising that it usually works in 99,9%
of all cases, since it does a comparison of two pointers that are
meant to point to different strings. In the kDoSound_subops
table, each entry gets its own string. My only explanation is that
these string repetitions get optimized away (but apparently not
or not always for the MSVC ASan build). I have replaced it with
a strcmp which seems to work fine.