833 Commits

Author SHA1 Message Date
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
NMIError
991061ee1b LURE: Fix music/SFX distinction
Distinction between music and SFX was made based on the most significant bit in
the sound number byte. This does not accurately reflect which MIDI sequences
are music or a sound effect.

Instead, I've added a flag which can be passed to
SoundManager::musicInterface_Play to indicate whether the sound is music or a
sound effect. All music is started from hard-coded animation sequences, so this
flag can be passed from ScummVM code when appropriate.
2020-12-06 16:37:08 +00:00
NMIError
a994870fb3 LURE: Disable All Notes Off from parser
Lure uses multiple MIDI parsers simultaneously, so having a parser send All
Notes Off events on all channels does not work.
2020-12-06 16:37:08 +00:00
NMIError
945c6c1643 LURE: Remove default MIDI volume
Some music tracks (f.e. the 2nd introduction track) do not properly set the
volume on all channels and rely on the volume set by the previous track.
ScummVM would reset the volume on all channels between tracks, which caused
wrong volumes on some channels. I've removed this.
2020-12-06 16:37:08 +00:00
NMIError
3dd3776cfd LURE: Fix wrong MT-32 MIDI channels for music
The MIDI player remaps the channels in the MIDI data to the available channels
on the MIDI device. In case of MT-32 music, this does not work, because the
percussion channel gets remapped to an instrument channel. The original
interpreter does not remap the channels of the music at all.

I've turned off channel remapping for all MT-32 MIDI data marked as music.
2020-12-06 16:37:08 +00:00
NMIError
3d550b8535 LURE: Added MT-32 SysEx loading 2020-12-06 16:37:08 +00:00
Cameron Cawley
4ced49acd4 ENGINES: Changed AdvancedMetaEngine::createInstance to return a Common::Error 2020-12-04 20:57:14 +00:00
Eugene Sandulenko
7ff34bc9ec PLUGINS: MetaEngineStatic -> MetaEngineDetection 2020-10-11 23:14:39 +02:00
Eugene Sandulenko
7ea6781043 PLUGINS: PLUGIN_TYPE_METAENGINE -> PLUGIN_TYPE_ENGINE_DETECTION 2020-10-11 23:12:32 +02:00
aryanrawlani28
d26bbe521c ENGINES: ALL: Finish renaming ME & AME classes
- ME -> MetaEngineStatic (static parts)
- MEC -> MetaEngine (dynamic parts)
2020-10-03 14:56:36 +02:00
aryanrawlani28
a56dc094b9 ENGINES: ALL: Move detection_enums -> detection.h
- Cleans up headers quite a bit.
2020-10-03 14:56:36 +02:00
aryanrawlani28
29ceb07959 ENGINES: ALL: Revert detection submodule to be directly present in the engine directory
- DETECT_OBJS are present and added inside an engine's modules.mk file.
2020-10-03 14:56:36 +02:00
aryanrawlani28
f3b9477893 ENGINES: ALL: Add header guards for the new detection-header files. 2020-10-03 14:56:36 +02:00
aryanrawlani28
8189a05316 ENGINES: ALL: Adapt to changes for new plugins by defining a new detection module
For each engine:
- Make a new folder detection
- Move detection-related files inside the folder
- Add a new module "enginename/detection"
- Add DETECT_OBJS here
- Adjust the normal engine module to remove detect_objs
- Adjust every file for the new changes.
2020-10-03 14:56:36 +02:00
aryanrawlani28
141edd7eb8 LURE: Split detection code & adapt to new plugins.
- There is also some shifting around of code done, so metaengine.cpp & detection.cpp can only share what's needed.
2020-10-03 14:56:36 +02:00
Paul Gilbert
33fb0f235d LURE: Properly reset straw fire animation
Fix provided by whizse
2020-09-29 21:55:29 -07:00
Paul Gilbert
c882993256 LURE: Add missing if block brackets 2020-09-06 11:19:22 -07:00
aryanrawlani28
4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
185fb72783 GUI: U32: Improve U32 code
- Revert accidentally put translations in mt32.cpp
- Use U32::format in some places earlier missed
- Add %u and %i for u32::format
- Add support for GUIErrorMsgFormat to use u32::format internally
- Use the above whereever needed
- Improve linux tts by removing redundant code
- Some places I had changed nullptr -> "". Revert this
2020-08-30 14:43:41 +02:00
aryanrawlani28
d4d5b8906e GUI: U32: Begin making TTS take in U32Strings for saying
Only for strings without an explicit action. The first level takes in a u32 string, encodes it, and passes it along further with the default action

- For gui widgets, the strings are passed in as native u32 strings.
- For everything else, they are being converted to u32 by Common::convertToU32... and then being passed along
2020-08-30 14:43:41 +02:00
aryanrawlani28
bed05ea134 GUI: U32: Fix compilation errors across entire project
After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
2020-08-30 14:43:41 +02:00
Eugene Sandulenko
ac6932bd89 I18N: Added missing files to POTFILES 2020-08-27 20:26:45 +02:00
Cameron Cawley
cf068bcc08 ALL: Remove direct use of OSystem::createMutex() 2020-08-21 09:39:00 +02:00
Eugene Sandulenko
eaa86f9333 ALL: Remove WebOS port 2020-08-01 14:56:16 +02:00
Cameron Cawley
cc5abf5ebb TTS: Fix crash when TextToSpeechManager is unavailable, clean up formatting 2020-05-27 12:43:49 +02:00
mataniko
581a6ec7d6 JANITORIAL: Rename kSupportsRTL to kSupportsReturnToLauncher 2020-05-12 10:36:38 +02:00
mataniko
06242a712b JANITORIAL: Rename EVENT_RTL
Now that ScummVM is adding RTL support, the EVENT_RTL should be disambigious that it is for returning to launcher
2020-05-12 10:36:38 +02:00
D G Turner
89d87a9132 LURE: Fix GCC Compiler Warning of Unused Variable 2020-03-15 10:01:47 +00:00
Paul Gilbert
a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
Paul Gilbert
83d7030d84 LURE: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00