Commit graph

1463 commits

Author SHA1 Message Date
Coen Rampen
f1e3c12895 AGOS: Improve Simon 2 MIDI code
The DOS versions of Simon the Sorcerer 2 now use the Miles drivers. AdLib now
sounds like the original does. ScummVM would use the second set of XMIDI data,
written for the MT-32, for GM with instrument remapping. Now the first set is
used, which uses GM instruments and has extra instruments on several pieces.
For all versions music fade-outs have been added during screen fades.
2022-05-09 17:19:42 +02:00
Coen Rampen
1f19bf2d31 AGOS: Improve sound pausing and volume management
MIDI music is now paused by pausing the parser(s) instead of relying on the
mixer streams to stop providing callbacks. This gives more consistent behavior
as external MIDI devices or softsynths now also pause playback.

Muting sound now sets the volume to 0 instead of pausing playback.
2022-05-09 17:19:42 +02:00
Coen Rampen
7b3949aed6 AGOS: Improve Simon 1 MIDI code
The MIDI code now supports mixed MIDI mode for the DOS floppy version of
Simon 1. The code for loading the various MIDI formats has been simplified.
2022-05-09 17:19:42 +02:00
Coen Rampen
d37681a729 AGOS: Update Simon 1 AdLib drivers
This updates the Simon 1 DOS AdLib driver and adds an AdLib driver for Windows.

The DOS driver now has OPL3 support, which eliminates the note cut off that
frequently occurs on an OPL2. It also allows for some limited use of stereo.
The driver now plays the floppy SFX accurately compared to the original
interpreter. It also implements multisource functionality, allowing for
separate volume control for music and SFX for the floppy version.

The Windows driver just maps the MT-32 instruments of the Simon 1 MIDI data to
the equivalent GM instruments.
2022-05-09 17:19:42 +02:00
Coen Rampen
1f0e905160 AGOS: Add MIDI parsers for GMF and Windows
This commit adds MIDI parser subclasses for the Simon 1 GMF format and for the
SMF variant used by the Windows versions of Simon 1 and 2.

The GMF format was handled by the SMF parser, which can now be removed from
that class. It also fixes the tempos not matching the DOS interpreter.

The Simon Windows SMF variant was handled in the AGOS midi class. Moving it to
a separate parser allows for some cleaner code in that class. It now also
corrects the tempos to match those of the DOS interpreter.
2022-05-09 17:19:41 +02:00
trembyle
b9e7b1dfcd COMMON: ENGINES: Correct Czech language ISO code
1. Correct constant in common files
2. Add the old code to obsolete language codes
3. Replace all occurences in engine code
2022-03-04 18:29:02 +01:00
Max Raskin
5b25843ebb Revert "AGOS: Adding support for Simon The Sorcerer Hebrew dub - the Gal Shemesh patch"
This reverts commit 7516504b70.
2022-02-20 21:35:10 +01:00
Max Raskin
7516504b70 AGOS: Adding support for Simon The Sorcerer Hebrew dub - the Gal Shemesh patch
applied over the "Mahshevet" version.
2022-02-20 17:19:41 +02:00
D G Turner
14eb237a6d AGOS: Fix GCC Compiler Warnings 2022-02-18 19:56:20 +00:00
Die4Ever
c6ad6ca7fc
AGOS: simon1 subtitle fixes (#3712) 2022-02-18 03:55:34 -06:00
Die4Ever
653199a3b0
AGOS: add Simon1 Hebrew fan dub 2022-02-13 13:58:43 -06:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
ccfaf478ab
AD: Make sure that we initialize hashmaps. Unfortunately, this leads to less const'ness 2021-11-29 01:50:03 +01:00
Orgad Shaneh
8c81b5026a AGOS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
ee57380de7 ENGINES: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:32:04 +02:00
Orgad Shaneh
3919f53326 ENGINES: Replace new[]/memset with new[]() 2021-11-10 19:53:15 +01:00
Torbjörn Andersson
09433c1c1d AGOS: Use the music volume setting for Accolade AdLib driver
At this point, the driver still tries to play notes at the maximum
allowed volume or louder, but ScummVM's music volume setting can bring
them back down to the expected range. That may have to be good enough
for now.

Also, since the master volume is only used internally there's no need to
keep converting back and forth. Just use the interval 0-255 throughout.
2021-11-02 07:08:13 +01:00
Torbjörn Andersson
f25e74b697 AGOS: Further work on Waxworks AdLib volume
After feedback from NMIError, and some more guesswork. The master volume
isn't applied until noteOnSetVolume(), so that the correct adjusted
volume can be stored in the channel data structure.

Now the volume seems too low to me, but of course that could be fixed by
having some other default value than 15 for _masterVolume.
2021-11-02 07:08:13 +01:00
Torbjörn Andersson
f59e060763 AGOS: Fix Waxworks AdLib music (bug #13048)
Because only the unused channelVolueAdjust value was clipped, the actual
velocity of the note would often overflow, causing the note to be almost
muted instead of played at full volume.

I assume it was an oversight that chanelVolumeAdjust wasn't used, so
I've fixed that and moved the clipping to after all adjustments have
been made. Also eliminated some unneeded floating-point math.

Is it correct now? I honestly don't know. It seems that, at least in
Waxworks, almost all notes end up being played at max volume. But maybe
that's how it should be?
2021-11-02 07:08:13 +01:00
Orgad Shaneh
fe104cc337 ENGINES: Use MetaEngine consistently for getting autosave slot
The autosave refactoring that was done in
7adad5aaf5 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.

Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.

Amends 7adad5aaf5.
2021-10-24 16:46:06 +02:00
Eugene Sandulenko
b07f300b68
AGOS: Added detection for Czech elvira1/elvira2. Bugreport #12017 2021-08-30 00:09:50 +02:00
Eugene Sandulenko
ed2345fad6
AGOS: Use different save name for Simon1 demo. Bugreport #12787 2021-08-14 15:33:22 +02:00
Max Horn
2f1f8f502e DEVTOOLS: move credits from devtools/credits.pl to engines
This employs a "lazy" approach: the "format" for the credits stays
exactly as it was, i.e., perl code. Of course one may want to change
this to another format (e.g. YAML, JSON, XML; or also shell script or
AWK, like `configure.engine` uses). But I deliberately kept it simple,
to get a minimal change that is easy to verify. Any further changes to
e.g. the format can be layered atop this.
2021-08-05 00:01:46 +02:00
athrxx
4a6dbc73db AGOS: attempt to fix bug no. 12617 ("AGOS: Deadlock when shutting down game")
I have also made the necessary changes to the PC-98 audio drivers which were written to work around the current situation, but now also need a different order in the destructors.
2021-06-11 17:49:33 +02:00
Torbjörn Andersson
f6bac7b6c6 AGOS: Fix restoreBlock() regression
The whole restoreBlock() function looked strange. It said it took x, y,
w and h, but it seems pretty clear that what it expects is left, top,
right and bottom.

Except in one case, where the order of the parameters had been swapped.

The most visible result of all this was that The Feeble Files crashed
when you pressed the "Off" button in the Oracle interface.

I've changed the names of the parameters, and that one strange call, and
changed how the function calculates the dirty rect. Hopefully that
should be correct.
2021-06-01 22:22:47 +01:00
ysj1173886760
7dcf259006 AGOS: move debug channels to metaEngineDetection 2021-05-22 01:34:57 +02:00
Kaloyan Chehlarski
a8103e2eb5 COMMON: Add support for multi-file InstallShield cabinets
Added support for InstallShield v6 cabinets, which can be made up of
multiple files. The interface for creating an Archive instance now takes
the base filename (e.g. the "data" in "data1.cab") for all cabinets,
including single-file ones.

Co-Authored-By: clone2727 <236052+clone2727@users.noreply.github.com>
Co-Authored-By: Walter van Niftrik <615114+waltervn@users.noreply.github.com>
2021-05-15 23:03:19 +03:00
Eugene Sandulenko
0d50189563
AGOS: Added detection for unextracted 4CD Polish feeble. Bugreport #12496 2021-04-29 13:12:16 +02:00
Eugene Sandulenko
2f912109f5
AGOS: Added detection for unextracted Italian 4CD feeble. Bugreport #12495 2021-04-29 13:12:16 +02:00
Mathias Parnaudeau
8b816cf0ea AGOS: Fix format-overflow warnings
Slightly increase the destination buffer to satisfy the theorical
copy of 5 characters for a 16-bit value.
2021-04-27 04:00:01 +01:00
Eugene Sandulenko
c7cec081d1
AGOS: Do not use sole data1.cab for detection 2021-04-26 15:17:49 +02:00
Eugene Sandulenko
85931b85c5
AGOS: Added support for German 4CD Feeble unpacked. Bugreport #11541 2021-04-26 14:51:10 +02:00
Eugene Sandulenko
10406d3673
AGOS: Added another Polish simon2. Bugreport #11770 2021-04-23 15:56:48 +02:00
Eugene Sandulenko
085069babe
AGOS: Added detection for French Amiga waxworks. Bugreport #11597 2021-04-22 15:36:31 +02:00
Eugene Sandulenko
49c5d54644
AGOS: Added detection for simon2 GOG edition. Bugreport #11394 2021-04-21 12:35:08 +02:00
Eugene Sandulenko
570f1bcbc3
AGOS: Added another simon1 demo detection. Bugreport #11200 2021-04-21 00:57:31 +02:00
Eugene Sandulenko
7924568a89
AGOS: Added detection for Italian 9-floppy Simon1. Bugreport #10963 2021-04-20 13:24:28 +02:00
athrxx
cac259ba26 AGOS: (ELVIRA2) - fix mouse wheel handling
- Fix messed up inventory (bug no. 11998) caused by the asynchronous (outsize of the normal engine) handling of the mouse wheel. This often lead to wrong inventory item icons.

- Also prevent crash due to nullptr deref. This can happen when using the mouse wheel while the inventory items are not visible (e. g. during the copy protection, when the symbol and words for the code wheel are displayed in the inventory window).
2021-04-17 04:23:27 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
athrxx
1e9b46e367 AGOS: fix regression from 8d175842
(assert triggered in PN due to invalid rect. The dirty rects are only used in Elvira/PC-98)
2021-02-07 03:40:33 +01:00
athrxx
4c0ff2b023 AGOS: (ELVIRA/PC98/Jp) - add paranoia checks to sound driver 2021-01-22 02:16:49 +01:00
athrxx
8969fa9c09 AGOS: (ELVIRA/PC98/Jp) - fix game restart
Like most of the other data in the PC-98 version the restart save file also requires decompression.
2021-01-22 00:47:59 +01:00
athrxx
77b316ef58 AGOS: (ELVIRA) - block mouse wheel during save/load/pause dialog
I assume that this happens accidently, since the mouse wheel was never supported by the original. Currently, you can still scroll the inventory using the mouse wheel when a save/load/pause dialog is open. It causes a text glitch in the PC-98 version. Instead of just fixing that glitch I've decided to fix the underlying bug (limited to Elvira 1 though; no idea what the behavior is in the other games).
2021-01-22 00:47:59 +01:00
athrxx
a3fd19265f AGOS: (ELVIRA/PC98/Jp) - add sound driver
Added support for PC9801-26, Roland MT-32 and General Midi. I have left out the PC speaker part for now.
2021-01-22 00:47:59 +01:00
athrxx
56d897a100 AGOS: (ELVIRA/PC98/Jp) - more fixes
Just walking around the castle fixing bugs as I find them, e. g.:
- make decompression routine safer (this could write a couple of invalid byte in at least one case)
- also support compressed data header without actual data (required in the kitchen scene when killing the evil cook)
- fix some graphics/palette related glitches
2021-01-22 00:47:59 +01:00
athrxx
512ae9cfe3 AGOS: (ELVIRA/PC98/Jp) - add static msg strings + some fixes
(this concerns mostly the save/load/pause texts)
2021-01-22 00:47:58 +01:00
athrxx
8d17584247 AGOS: (ELVIRA/PC98/Jp) - more dirty rect handling
Make more use of dirty rect handling (applies to the PC-98 version only, the other versions don't need that).
2021-01-22 00:47:58 +01:00
athrxx
574133086d AGOS: (ELVIRA/PC98/Jp) - add Japanese font drawing
- Add dual layer graphics display to display the Japanese characters in their proper (double) resolution on top of the graphics. The original actually uses text mode.
- Adapt mouse handling to dual layer code.
- For consistency I got rid of all direct calls to _system->lockScreen() and _system->unlockScreen(), even in the sub engines that aren't affected. I find it easier to debug and to maintain this way.
2021-01-22 00:47:58 +01:00
athrxx
bb8c70f865 AGOS: (ELVIRA/PC98/Jp) - fix startup
Add necessary file name and file format modifications so that the game at least loads up and runs up to the start scene without glitches.
2021-01-22 00:47:58 +01:00