Commit Graph

1408 Commits

Author SHA1 Message Date
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 802caa4c39.
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
Coen Rampen
5e95bdcbda AGOS: Elvira 1 - add support for Casio devices
This adds support for the Casio MT-540, CT-460 and CSM-1 for Elvira 1.
2022-05-09 17:19:44 +02:00
Coen Rampen
5e1905f5f6 AGOS: Waxworks OPL3 mode instrument attack fix
This fixes the slow attack for several instruments, which causes some barely
audible notes in OPL3 mode.
2022-05-09 17:19:44 +02:00
Coen Rampen
66bb075f1c AGOS: Add E2/WW AdLib and MT-32 SFX and enhancements
This adds support for the AdLib and MT-32 sound effects in Elvira 2 and
Waxworks. It adds an option to the UI to toggle between sampled and
synthesized SFX. It also adds the following enhancements:
- AdLib OPL3 mode for Elvira 2, Waxworks and Simon 1 floppy demo. This can be
selected using a new UI option.
- Mixed AdLib/MIDI mode for Elvira 2 and Waxworks.
- Implemented "monophonic chords", a feature of the original MIDI code which
would play only the highest note of a chord on AdLib. Most noticable in the
Waxworks music.
- Added UI option to select Simon 1 DOS music tempos.
- Rewrite of the AdLib and MT-32 drivers to remove duplication and make use of
features of the standard multisource drivers.
- Refactored MidiPlayer to standardize interface and remove code moved to the
drivers and parsers.
2022-05-09 17:19:44 +02:00
Coen Rampen
97745050c2 AGOS: Add option for Simon 1 DOS tempos to parsers
The DOS version of Simon 1 has different music tempos compared to the Windows
version. This commit adds the option to both the DOS and Windows MIDI parsers
to use either the DOS or Windows tempos.
2022-05-09 17:19:43 +02:00
Coen Rampen
a0ffa1e005 AGOS: Fix PC-98 MIDI driver not using Native MT-32
The AGOS PC-98 MIDI driver did not check the native_mt32 flag when determining
the type of MIDI device. This would cause a hardware MT-32 or external
softsynth to be treated as a GM device.
This commit fixes this by adding the missing check.
2022-05-09 17:19:43 +02:00
Coen Rampen
a72704764b AGOS: Fix Simon 2 intro first scene MT-32 music
The first scene of the Simon The Sorcerer 2 intro uses 3 music tracks. The last
2 are missing from the MT-32 MIDI data set. The original interpreter just stops
playing music after the first track and does not restart until the next scene.

This commit fixes this problem by using the GM versions of these 2 tracks
instead and mapping the GM instruments to MT-32 ones.
2022-05-09 17:19:43 +02:00
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