1419 Commits

Author SHA1 Message Date
sluicebox
b1f466fb8e AGOS: Fix memory leaks. PVS-Studio V773 2023-10-30 11:28:14 -07:00
Le Philousophe
5bdd9e6f50 ALL: Unify zlib and gzio API
zlib is used when available and falls back on gzio.
This allows performance improvements as our CRC32 and gzio
implementations are slower than base zlib.
As zlib is available when libpng is present, this is sensible to
benefit from it.
2023-08-28 21:49:03 +02:00
Donovan Watteau
500a54a559 Revert "AGOS: SIMON2: Fix pirate dialogue freeze"
This change introduced several character animation regressions in the
game, which may seem as a worse experience than the original issue with
the pirate dialogue, for most end users (Trac#13997).

This reverts commit eb851041edcef20d85f74c95d53e8c280fe8a0ef.
2023-08-08 12:30:17 +02:00
Coen Rampen
00d273fc55 AGOS: Fix support for Simon 2 25th Anniversary
This adds detection entries for the German and French versions. All language
versions except Russian use WAV sound effects and GM SMF MIDI data, so the
platform is changed to Windows. These versions also contain the MT-32 MIDI data
in XMIDI format, so support for this is added as well. Finally, the MT-32 track
10 workaround has been updated to deal with these versions.
2023-07-03 21:57:39 +02:00
Coen Rampen
7eba6e9eb5 AGOS: Add Simon 1 AdLib SFX fallback 2023-06-27 21:33:39 +02:00
Coen Rampen
7fdb1fe012 AGOS: Add Simon 1 25th Anniversary detection
Adds detection entries for the new versions in the 25th Anniversary editions.
The remaining language versions are already detected.
To use the 25th Anniversary versions you have to copy the files from the
subdirectory of the language you want to use to the main directory, then detect
the main directory; or just detect without copying for English CD.
2023-06-27 21:33:39 +02:00
Coen Rampen
74329a9073 AGOS: Disable MT-32 on GM warning for PC-98xx 2023-06-24 21:50:13 +02:00
Coen Rampen
2e54d6ca9f AGOS: Add fallback for Simon 1 AdLib instruments
GOG has not included the AdLib instruments file with their release of Simon the
Sorcerer 1 DOS version. The game would not start in ScummVM when this file was
missing and AdLib was selected. Added a fallback to the generic AdLib driver
with built-in instruments.
2023-06-22 21:51:45 +02:00
Coen Rampen
cb4c1bdd46 AGOS: Add fallback for Simon 2 AdLib instruments
GOG has not included the AdLib instruments file with their release of Simon the
Sorcerer 2 DOS version. The game would not start in ScummVM when this file was
missing and AdLib was selected. Added a fallback to the generic AdLib driver
with built-in instruments.
Also made the Windows version start with AdLib if an OPL2-only emulator is used.
2023-06-21 22:03:55 +02:00
Eugene Sandulenko
15925e7035
AGOS: Add missing override keyword 2023-04-29 14:24:02 +02:00
BLooperZ
b27d30dd21 AGOS: Add fallback detection for some titles 2023-04-29 13:41:45 +02:00
Donovan Watteau
18ab6803d6 JANITORIAL: Fix various "an" typos in comments 2023-03-16 14:47:28 +01:00
Coen Rampen
f41cc33dff AGOS: Fix MIDI event noop flag not cleared
When the noop flag was set on a MIDI event by the AGOS Simon 1 Windows or GMF
parsers, it would not be cleared when parsing the next event, leading to all
subsequent MIDI events being ignored.
Fixed this by setting the noop flag to false when it is not applicable to a
MIDI event.
2023-01-14 17:14:51 +01:00
Walter Agazzi
ca77f5db92 AGOS: Complete StS Puzzle Pack titles 2023-01-02 13:46:39 +02:00
Cameron Cawley
fcf604a1f6 AGOS: Add detection for the Acorn Floppy Demo of Simon 1 2022-12-11 22:41:14 +01:00
Cameron Cawley
d6d098394c AGOS: Use proper filenames for the Acorn Floppy version of Simon 1 2022-12-11 22:41:14 +01:00
Eugene Sandulenko
fb7095f5a4
COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
Donovan Watteau
95c755e8a3 AGOS: Use MSVC_PRINTF when GCC_PRINTF is used 2022-11-29 01:37:16 +01:00
Le Philousophe
08b91ceb08 AGOS: Adapt to subtitles changes and optimize
Overlay is not shown when there are no subtitles to show.
Subtitles are drawn at the correct frame and without forcing rendering.
2022-11-20 17:18:38 +01:00
Cameron Cawley
4090edcdb0
AGOS: Replace the custom LoopingAudioStream with RewindableAudioStream 2022-11-19 20:56:56 +02:00
Cameron Cawley
69a7c386a9 AGOS: Move the engine options into the MetaEngine subclass 2022-11-16 23:58:54 +01:00
Le Philousophe
60b7c4b95e AGOS: Show overlay as in-game 2022-11-12 19:12:05 +01:00
Ray
e5cf965f6d AGOS: Fixed game titles to match box title 2022-11-06 20:52:04 +02:00
Donovan Watteau
759e3f3138 AGOS: JANITORIAL: Less warning noise when ENABLE_AGOS2 is not enabled 2022-10-26 19:56:55 +02:00
Le Philousophe
429afa3a34 AGOS: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Le Philousophe
1d23fc0240 AGOS: Don't use unsafe strcat and strcpy 2022-10-23 22:46:19 +02:00
BLooperZ
eb851041ed AGOS: SIMON2: Fix pirate dialogue freeze 2022-10-01 11:28:11 +03:00
BLooperZ
c98001f68e AGOS: FEEBLE: Add subtitles support for SMK videos 2022-09-28 17:10:58 +02:00
Donovan Watteau
8d44cb0581 AGOS: Keep clearing the surface when using disable_fade_effects
When using this option with Simon 1, Simon wouldn't be cleared from the
bottom of the screen, if pressing Esc when Simon starts walking through
the screen right after the "Simon the Sorcerer" title is printed, at the
very beginning of the game.

Triggering the clearSurfaces() code even when _neverFade is enabled
solves this problem.

Fixes a mistake of mine in commit 802caa4c397266cc3a1f178b688f36ede91f7d2e.
2022-09-24 18:19:06 +02:00
Donovan Watteau
b305feb4d3 AGOS: Save a warning and some bytes when ENABLE_AGOS2 is not enabled 2022-09-22 10:23:28 +02:00
athrxx
d5331c3c2c AGOS: fix some warnings
(only the obvious ones, where nothing can be broken by the fix)
2022-09-02 15:36:48 +02:00
Le Philousophe
4dc3436cac JANITORIAL: Don't include ScummVM files using brackets 2022-08-22 12:17:58 +02:00
Coen Rampen
0fafb0ee19 AGOS: Fix Waxworks crash when playing digital SFX
Waxworks DOS has both digital and limited MIDI SFX. The game scripts use two
different opcodes for trigging digital and MIDI SFX; if a sound effect has both
a digital and a MIDI version, both opcodes are triggered. When digital SFX are
active, ScummVM would try to handle both the digital and the MIDI opcode by
playing a digital SFX. This would crash the game if the MIDI SFX ID was invalid
as a digital SFX ID. Strangely enough, this bug also seems to affect the Amiga
version. Apparently both opcodes are still in the scripts of this version, even
though it does not support MIDI at all AFAIK.

This commit fixes the issue by only playing the MIDI SFX if digital SFX are
turned off and ignoring them otherwise.
2022-08-05 22:16:43 +02:00
Coen Rampen
03de0244ed AGOS: Fix DOS PN and FF demo crash
The engine would try to initialize the MidiPlayer for all DOS games, even the
ones that don't use MIDI (Personal Nightmare and Feeble Files demos). This
caused a problem with the new MIDI code, which does not set up the necessary
objects for these games and crashed on a null pointer.
This is fixed by adding PN and FF as exceptions to the if condition guarding
initialization of the MidiPlayer.
2022-08-04 21:50:46 +02:00
Cameron Cawley
f3b094e53f ENGINES: Change the MetaEngineDetection interface to match MetaEngine 2022-07-23 23:31:58 +02:00
BLooperZ
5cf1ff7d57 AGOS: FF: Enable subtitles configuration 2022-07-15 22:36:29 +02:00
Cameron Cawley
98d5b6a003 AGOS: Use ADExtraGuiOptionsMap for the options 2022-07-07 23:46:04 +03:00
Donovan Watteau
802caa4c39 AGOS: Add an option to disable the fade-out effects in Simon1/Simon2
Simon1 and Simon2 fade the screen to black whenever leaving a room,
but this can be slow to render on some devices, and for some people
nowadays it can really make the pace of the game quite slow.
2022-06-23 20:28:34 +02:00
Coen Rampen
b12feb2ae9 AGOS: Add Simon 1 invalid AdLib errors
This adds error messages in case the Simon 1 AdLib instrument bank file is
missing or invalid.
2022-06-05 14:31:48 +02:00
Coen Rampen
8536fd9794 AGOS: Fix AdLib instrument remapping check
_instrumentRemapping is always set in readDriverData, so this check is unnecessary.
2022-06-02 20:06:04 +02:00
Eugene Sandulenko
5e05f93f36
ALL: Remove Symbian port 2022-05-28 12:32:29 +02:00
Coen Rampen
38eff6c7c3 AGOS: Add OPL3 mode for Elvira 1
This commit enables the Accolade AdLib driver's OPL3 mode for Elvira 1. It adds
some extra notes, most notable in the intro track. A small fix is applied to
one of the instruments in the intro track to make it work properly with this
mode.
2022-05-16 12:18:11 +02:00
Coen Rampen
287490fe0b AGOS: Fix some Elvira 1 tracks not looping
Some Elvira 1 music tracks would not loop properly. These tracks make use of
the loop event, which stores the position in the MIDI stream where the parser
will later loop to. An event is optionally preceded by a delta, as indicated by
the _noDelta property of the parser. However, when looping, this flag was not
set to the state matching the event after the loop point. This would sometimes
cause the parser to interpret a MIDI event as a delta, which would break the
parsing.
This is fixed by storing the _noDelta flag with the loop data and setting it
to the stored value when looping.
2022-05-16 12:18:11 +02:00
Coen Rampen
07a6b54f54 AGOS: Add CMS support for Elvira 1
This adds support for the Creative Music System / Gameblaster to Elvira 1.
2022-05-16 12:18:11 +02:00
Coen Rampen
6ec2329fc9 AGOS: Fix compiler warnings
Add missing override, fix bad memset, remove unused variable.
2022-05-09 20:21:00 +02:00
D G Turner
26b029ceb9 AGOS: Correct Array Initialization for Correct Size Removing Magic Number
MAXIMUM_TRACKS is defined as 120 in the MidiParser superclass, but this
was also lacking a sizeof(byte *) multiplication. This should be neater.
2022-05-09 19:09:18 +01:00
D G Turner
14cb42c6d6 AGOS: Correct Header Guard Define Naming in GMF Midi Parser 2022-05-09 19:08:34 +01:00
Coen Rampen
e9f8bc7106 AGOS: Fix multiline I18N strings 2022-05-09 19:55:12 +02:00
D G Turner
ee4908d398 AGOS: Fix Missing Field Initializers for Group ID of Extra GUI Options 2022-05-09 18:36:42 +01:00
Coen Rampen
3dd5568cab AGOS: Improve E2/WW AdLib SFX timing
This change improves the accuracy of the timing of the AdLib SFX of Elvira 2
and Waxworks. The frequency of the SFX script timer is now synchronized with
the callback timer of the AdLib driver, which makes the timing of the OPL
register writes match that of the original interpreter.
2022-05-09 17:19:45 +02:00