862 Commits

Author SHA1 Message Date
Coen Rampen
734817597b AUDIO: Add rhythm mode support to AdLib MS driver
This adds support for the OPL rhythm mode to the AdLib multisource MIDI driver.
Some games (f.e. Simon 1) use this to generate the rhythm sounds of their music.
2022-05-09 17:19:41 +02:00
athrxx
bd1dbecde9 TTS: (ENGINES) - add support for tts enable function
The new option only works as intended if the engine that have TTS support apply their own settings. It cannot be globally implemented before and after runGame(), since the engines don't all use the same config manager variables (sometimes "tts_enabled_speech", "tts_enabled" or "tts_narrator, sometimes more than one of these).
2022-04-26 21:08:41 +03:00
Torbjörn Andersson
e06f3c9a5a GUI: Allow game option checkboxes to be disabled
Depending on other game option checkboxes. This is used to
enable/disable the semi-smooth scrolling checkboxes for FM Towns Loom,
since it's only used when smooth scrolling is enabled.
2022-04-21 11:07:17 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
04eacfa7d3 LURE: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
78ef6203de ENGINES: Fix getSavegameFile for almost all engines
Use kSimpleSavesNames correctly, add where needed, remove where needed.

Trac #12977
2021-11-10 21:49:48 +00:00
eientei
b60692bb4c LURE: Add detection for later Konami version 2021-11-09 20:24:42 +02:00
Alexandre Detiste
6044504762 JANITORIAL: typos
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
Orgad Shaneh
fe104cc337 ENGINES: Use MetaEngine consistently for getting autosave slot
The autosave refactoring that was done in
7adad5aaf5831dc5adcee140f38aacc4a5db2518 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 7adad5aaf5831dc5adcee140f38aacc4a5db2518.
2021-10-24 16:46:06 +02:00
Eugene Sandulenko
93746e702f
LURE: Made game flags enum sequential 2021-10-14 13:58:58 +03: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
Coen Rampen
c234eb64a2 LURE: Fix struct init, member hiding warnings 2021-07-02 15:40:14 +02:00
Coen Rampen
e56542808b LURE: Fix invalid array and struct init 2021-07-02 14:51:51 +02:00
Coen Rampen
e2a1362bf9 LURE: Improve AdLib support
This improves the AdLib support for Lure of the Temptress, which was unfinished.
2021-07-02 14:16:50 +02:00
sluicebox
8e1d90f8e4 ALL: Remove clearAllDebugChannels() from Engine dtors 2021-06-14 12:42:38 -05:00
lolbot-iichan
198cef7837
LURE: Fix compilations on platforms without TTS (#3024) 2021-05-22 04:14:16 +03:00
ysj1173886760
acc86e6140 LURE: move debug channels to metaEngineDetection 2021-05-22 01:34:57 +02:00
Martin Gerhardy
9d82fa51df COMMON: removed USE_TTS check from engines
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
2021-05-03 14:13:41 +03:00
Paul Gilbert
8f3819ccfe LURE: Added support for Konami English VGA version 2021-04-27 20:30:01 -07:00
Eugene Sandulenko
74ce26fd75
LURE: Added additional English VGA version. Doesn't run yet. Bugreport #11441 2021-04-21 23:47:36 +02:00
Eugene Sandulenko
2f21908602
LURE: Added detection for the unsupported demo. Bugreport #11501 2021-04-21 12:35:08 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Orgad Shaneh
b2122f4eeb LURE: Fix misleading indentation
Detected by Clang.
2021-03-15 13:21:15 +02:00
Orgad Shaneh
f0554f148a LURE: Remove unused private member
Detected by Clang.
2021-03-15 13:20:52 +02:00
NMIError
7b97d285e8 LURE: Added termination entry to catch anim sound seq 2021-01-31 22:13:15 +01:00
NMIError
aef0ccab4d LURE: Fix castle cellar wine cask sound
In the castle cellar, when you pull the bung out of the wine cask, a sound is
played for the running wine. However, when the cask runs empty, the sound is
not stopped. Also, when the Skorl starts drinking the wine, the sound is not
restarted when you enter the room, and it is also not stopped when the wine
runs out. These issues exist with the original interpreter as well.

I fixed this by adding the running wine sound when the hotspot script for the
drinking Skorl is in the loop where the Skorl is drinking, and removing the
sound when the hotspot script for the running wine is unloaded and when the
running wine stops in the animation for the drinking Skorl.
2020-12-08 22:10:44 +01:00
NMIError
95dd627c9d LURE: Play town ambient sound when first entering
When outside in the town, the game plays an ambient sound of twittering birds.
When first entering town after falling through the chute, this sound does not
play; it first starts after you enter and exit a building. This issue is
present with the original interpreter as well.

This change fixes this by calling removeSounds after playing the chute
animation. This function calls the bellsBodge function, which manages the
ambient sounds in town. Because there are no other sounds playing when first
entering town, this has no unwanted side effects.
2020-12-08 21:27:58 +01:00
NMIError
5dfd6d0665 LURE: Fix bells sounding in town
When entering town after escaping from prison, after a little while bells start
chiming constantly. This does not happen in the original interpreter.

This is caused by a script that generates the ambient thunder sounds in the
prison. After the prison escape the clearSequenceDelayList function is called,
but this did not remove the script because it is not marked as "can be cleared".
Because this script is not running in town in the original interpreter, I think
the clearSequenceDelayList function is supposed to clear all scripts, even the
ones not marked as "can be cleared". The only other scripts that this affects
are two more ambient sound scripts that are now removed after entering the
castle towards the end of the game (the only other place where
clearSequenceDelayList is called). These scripts only play sounds while in town,
so removing them has no effect (but does remove some unnecessary processing).
2020-12-08 21:27:58 +01:00
NMIError
3b41b6a16b LURE: Fix water sound when opening or closing door
Some room exit data have the door opening or door closing sound defined as 0
(f.e. the cave doors). This means no sound should be played. ScummVM would play
sound 0 instead, which is the running water sound. This change fixes this by
checking for value 0 and not playing a sound in that case.
2020-12-08 21:27:57 +01:00
NMIError
f3848ea5be LURE: Fix town shop clock
The sound of the clock in the town shop was played much too frequently. Fixed
this to match the one tick per second of the original interpreter.
2020-12-08 21:27:57 +01:00
NMIError
7642698fd7 LURE: Fix door sounds
ScummVM did not seem to trigger door opening and closing sounds, f.e. the cell
door at the start of the game. The checks in the roomExitAnimHandler compared
hotspot IDs to room numbers, which are different sets of IDs AFAICT. Also, the
door opening part would decrease the frame counter first, then compare to the
set destination frame. The opening sound should often be triggered at the start
of the animation, but because the frame counter is decreased first, it does not
trigger at the first frame. I moved the frame counter decrease after the check
to fix this.
2020-12-08 21:27:56 +01:00
NMIError
6098b45776 LURE: Remove enum name prefixes 2020-12-08 18:50:31 +01:00
NMIError
fa4948eaa4 LURE: Fix endgame animation
This change fixes several issues with the endgame animation:
- The timing for the sounds for the animation was based on the number of frames
after which the sound should start playing. However, the animation code
interpreted it as the number of frames to wait after playing the sound. This
caused the timing of the sounds to be wrong. Fixed this by moving the number of
frames up to the next sound and adding a dummy sound for the initial pause.
- The pause and thunder sound effect at the end of the animation were missing.
- The AdLib endgame sound resource was not loaded, causing a sound effect to
play instead of the endgame music.
- Changed the timing of the first text screen to match the original interpreter.
- At the last text screen, the game now waits for a keypress before quitting
the game after the music has finished. This matches the behavior of the
original interpeter.
- Made animation more responsive to user quitting the game.
- Screen no longer fades in EGA version.
2020-12-08 17:00:28 +01:00
NMIError
5b01d5f09e LURE: Barrel animation fixes
This change fixes some small differences in the barrel animation between the
original interpreter and ScummVM:
- The animation should fade in at the start
- The music should continue until the animation has faded out
- The mouse cursor should appear after the animation has faded out
2020-12-08 17:00:28 +01:00
NMIError
17f4e65aff LURE: Improve MT-32 fade-out in intro
The first track in the LotT introduction fades out before the second track
starts. The fade-out is implemented by reducing the velocity of the new notes
that are being played. Because this does not affect notes that are already
playing, the fade-out effect is not very good. I've replaced this by a fade-out
using MIDI channel volume.
2020-12-08 17:00:28 +01:00
NMIError
6454b69026 LURE: Fix game over screen
The music playing at the game over screen would only play once and send MIDI
CC 18 messages, which are not defined in the MIDI standard. I added looping and
removed the non-standard MIDI messages to prevent possible compatibility
issues.

The music for cutscenes and for the game over screen had some strange volume
differences compared to the original interpreter which seem to be caused by a
bug in the original interpreter where volume adjustments from sound effects
would carry over into the music. I've added a note to explain this difference.
2020-12-08 17:00:28 +01:00
NMIError
432529b2bb LURE: Fix chute animation
The animation that plays when you fall through the sewage chute near the start
of the game had some issues. Fades were missing at several points, the middle
part of the animation was played only once and too slow, and when skipping the
animation it would only skip the currently playing part instead of the entire
animation.

To fix these issues, I've added an option to AnimationSequence to loop the
animation a number of times.
2020-12-08 17:00:28 +01:00
NMIError
447d38f6a7 LURE: Fix Skorl catch animation
When the player gets caught by a Skorl, an animation is shown where the player
is punched in the face. This had a few issues:
- The animation fades in and out on the original interpreter. I've added this.
- The animation plays faster on the original interpreter. Speed was updated to
match this.
- The sound effect for this animation would play right at the start instead of
at the moment of impact. I've added a delay to the sound effect using an
AnimSoundSequence.
2020-12-08 17:00:28 +01:00
NMIError
419453ce00 LURE: Fix introduction animation
This fixes several issues with the introduction animation:
- The timing of the various parts of the introduction did not match the timing
of the original interpreter. The music did not properly match the images and
the last section was completely missing. I've adjusted the timing to beter
match the original interpreter.
- The VGA palette of the first text screens was broken and would display them
as completely white. I've added a patch to add the colors of the palette of the
following text screens.
- The animation of the soldiers approaching each other would fade out on the
original interpreter. I've added this.
- The images of the battle sequence would fade out on the EGA version. This
does not match the original interpreter and has been removed.
2020-12-08 17:00:28 +01:00
NMIError
ae3c9777a9 LURE: Fix warnings for missing init and unsigned/signed 2020-12-06 16:37:08 +00:00
NMIError
f134e41b8c LURE: Don't send aftertouch to MT-32
Some tracks in LotT contain channel aftertouch events. These are not supported
by the MT-32 and the original interpreter does not send them to the MIDI
device. This change removes them from the MIDI output.
2020-12-06 16:37:08 +00:00
NMIError
20d5307bb9 LURE: Stop MIDI notes when pausing
When pausing the game by bringing up the ScummVM menu, the MIDI notes would
hang. I've added code to pause and resume the active MIDI parsers, which stops
the active notes.
2020-12-06 16:37:08 +00:00
NMIError
81c514ac8f LURE: Add MT-32 initialization icon blinking 2020-12-06 16:37:08 +00:00
NMIError
89e6ffc2e6 LURE: Use MT-32/GM MidiDriver
This change adds the MT-32/GM multisource MidiDriver to LotT. This adds the
following functionality:
- MT-32 initialization using the SysEx queue. ScummVM will remain responsive
while the SysExes are sent and the user can abort the process when skipping the
introduction or quitting the game.
- Use of Roland GS MT-32 instrument mapping.

It also allows for a proper implementation of music fade-outs. Some
functionality previously implemented in SoundManager is now done by the driver.
2020-12-06 16:37:08 +00:00
NMIError
887dcf8c13 LURE: Remove TrashReverb
The original interpreter sends out a SysEx to turn off the MT-32 reverb when
opening a door while outside. This does not seem to work properly in the
original interpreter, and it is unclear what the developer's intentions were
with this function, so I've added a comment and removed the functionality.
2020-12-06 16:37:08 +00:00
NMIError
f45a55d809 LURE: Add audio initialization icon
When sending SysEx data to the MT-32, the game blinks an icon in the lower left
corner of the screen. This change adds that icon. It is stored in the
executable, so I added code to create_lure_dat to extract the icon and add it
to the ScummVM data file. The new version of this file is now required to run
the game.
2020-12-06 16:37:08 +00:00
NMIError
ffcf4976b7 LURE: Fix looping sound effects
Some sound effects in LotT loop, like the thunderstorm in the beginning of the
game. This is indicated by the high bit of the sound number. This change adds
support for these looping sound effects.
2020-12-06 16:37:08 +00:00
NMIError
93abb89ec1 LURE: Remove Note Off velocity
The LotT MT-32 MIDI data specifies a velocity value for the Note Off events,
but this is not sent to the MT-32 by the original interpreter. This removes the
velocity from the Note Off events, so it matches the MIDI output of the
original interpreter.
2020-12-06 16:37:08 +00:00
NMIError
288ffbedf4 LURE: Fix MT-32 channel assignments
ScummVM would add one to the number of MIDI channels specified for a sound
resource, but this does not match the actual number of channels used in the
MIDI data. Additionally, it would not take into account the fact that the first
MIDI channel used in the MT-32 data is channel 1 instead of 0. This change
corrects this; the MIDI channels used now match those of the original
interpreter.
2020-12-06 16:37:08 +00:00
NMIError
c57ad9c1f5 LURE: Fix MT-32 sound volume
Lure of the Temptress defines a volume level for each sound resource. This is a
byte value which can increase or decrease the volume of the sound as specified
in the MIDI data (80h is the neutral value). The original interpreter applies
this as a scaling factor to the Note On velocity for the MT-32. ScummVM used it
to scale the MIDI volume control change values instead, causing incorrect
volume levels.

This change applies the sound resource volume to note velocity instead, which
results in the same volume as the original interpreter. I've left the old
method in place for AdLib, because I'm not sure how the original interpeter
handles sound resource volume in this case.
2020-12-06 16:37:08 +00:00