Commit Graph
230 Commits
Author SHA1 Message Date
AndywinXp 8dd19ae10f SCUMM: DIG (demo): Fix voice mode behavior 2023-01-08 23:26:47 +01:00
AndywinXp c93d460ee2 SCUMM: FT: Fix mouth sync fetching and improve readability 2023-01-01 10:50:46 +01:00
Donovan Watteau 30a1b4867e SCUMM: Fix a couple of sound issues in Indy3 Macintosh (Trac#13887)
If you ring the boxing bell right at the start of the game, you'll see
Indy hit it 3 times, but the actual bell sound will only be heard twice.
This doesn't happen in the original interpreter or in the other releases
where it can be heard 3 times as expected.  Another example is the sound
effect for thunder when Indy is outside the windows of Castle Brunwald;
although it sounds a bit weird this way, the sound is really meant to
have some quick "false starts".

The byte at offset 26 might be responsible for this, in that if it's
unset, the current (identical?) sound is maybe meant to be interrupted.
This is just based on the Indy3 Amiga fixes brought by PR#3598, and
from some naive guesswork. But this change is only applied to Indy3 Mac
and appears to cause no regression (I've done a full gameplay).

Thus, until someone checks this against the original Indy3 Macintosh
interpreter (we have no disasm for it yet), doing this change probably
makes sense for now...

And Andy says I should be more confident about this change :p
2022-12-25 21:17:36 +01:00
athrxx 5704af70a0 SCUMM: fix bug no. 13901
(Monkey 1 EGA / CMS music and sound effects dissapear after loading saved game)

This is at least one obvious bug which I found. For CMS sound the sound resources get invalidated after one use which is only supposed to happen if the resource cannot be loaded.

MI1 also has other issues with CMS sound if the user changes the sound setting between savegames. The savegames are not compatible. But that is a more complex thing to fix and might not be related to the bug ticket.

Also, we might need to restore sounds that were currently playing at the time of saving (but I have to check if the original actually does that for CMS).
2022-10-24 01:17:49 +02:00
Le Philousophe 137b51d7ac SCUMM: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Donovan Watteau 80e134a912 SCUMM: Let it build again without ENABLE_SCUMM_7_8 2022-09-20 19:38:18 +02:00
AndywinXp 457bcb67db SCUMM: GUI: Implement the majority of the v7 Main Menu 2022-09-08 19:10:42 +02:00
athrxx 3d39d206ee SCUMM: replace strcpy calls with Common::strlcpy
This replaces every single strcpy call in the engine with
Common::strlcpy.

Some of these might cases seem a bit pointless, but it is
supposed to discourage future use of strcpy. If people don't
see a single occasion of it they might think twice before they
use it...
2022-08-27 13:08:38 +03:00
athrxx b8bc864abd SCUMM: (LOOM/FM-Towns) - fix regression
Target is partly dysfunctional. Savegames can still be loaded from GMM, but the game will abort at the difficulty select dialog when starting normally...
2022-08-14 01:40:49 +02:00
Donovan Watteau 4ec06a2bf6 SCUMM: Unify WORKAROUND usage and complete/tweak some of them 2022-08-07 17:24:27 +02:00
AndywinXp c9c4f8026b SCUMM: COMI: Improve handling of GUI during SMUSH videos
Also, remove prehistoric hack which is now apparently unneeded and
messed with the ability to pause audio during SMUSH cutscenes for the
demo.
2022-08-06 13:33:56 +02:00
AndywinXp 98b2f0a24b SCUMM: MI1 (CD DOS): Implement reloading CD Audio track when loading savegame 2022-07-02 12:39:26 +02:00
Torbjörn Andersson 6a040e3ea2 SCUMM: Add adjustment sliders for VGA Loom (CD) and MI1 (CD)
When ripping the audio tracks from CD, you may not get quite what the
game expects, e.g. my copy of Loom has less silence at the start of the
track than the CDDA.SOU file from the Steam version. And the MI1 intro
appears to be timed with the assumption that there is no silence at all
at the start of that track.

This makes it possible to compensate for that without having to edit the
audio file. It may also be of some help with fan soundtrack replacements
for MI1, though I have little experience with that.
2022-06-03 21:03:58 +02:00
Torbjörn Andersson fbb7459268 SCUMM: Clean up comment a tiny bit 2022-05-28 10:26:47 +02:00
Torbjörn Andersson 31f8db0b64 SCUMM: No longer rely on getMillis() when timing replacement tracks
Now that VAR_TIMER_TOTAL is reliable, use that for timing the Loom
replacement audio tracks instead. This saves us the bother of handling
pausing and things like that.

I think it should work even with older savegames, but at the moment
resuming the track from where it was saved isn't working for me. It
seems to be doing the right ting, but then the track gets restarted.
This may be because of recent changes to Loom save/restore?
2022-05-27 18:28:44 +02:00
AndywinXp 63e2c001bb SCUMM: LOOM: Add the Steam speech fix as an enhancement for the DOS version 2022-05-22 23:57:37 +02:00
AndywinXp 612f453f1b SCUMM: LOOM: Fix game and music timers for the Steam variant 2022-05-22 23:27:40 +02:00
Torbjörn Andersson 4a3e75ce27 SCUMM: Move replacement music timer macros into sound.cpp
They don't work outside of it anyway.
2022-05-22 12:07:21 +02:00
Andrea Boscarino 2d12acec5a SCUMM: Add v7 quirk to IsMouthSyncOff() 2022-05-21 22:44:01 +03:00
Andrea Boscarino f3eee39c9d SCUMM: Properly implement speech timer for v5-7 talkie games 2022-05-21 22:44:01 +03:00
Andrea Boscarino ecdbc25624 SCUMM: Properly reset CD Audio timers 2022-05-21 22:44:01 +03:00
Andrea Boscarino e42ad88690 SCUMM: Implement original CD Audio timing handling 2022-05-21 22:44:01 +03:00
Filippos Karapetis ffc80f1f14 SCUMM: Refactor the workaround for the broken sample in Indy4
This makes the workaround code more self-contained
2022-04-16 14:33:42 +03:00
Filippos Karapetis ec16ebbf96 Revert "SCUMM: Refactor the workaround for the broken sample in Indy4"
This reverts commit c59df76164.
2022-04-16 14:25:51 +03:00
Filippos Karapetis c59df76164 SCUMM: Refactor the workaround for the broken sample in Indy4
This makes the workaround code more self-contained
2022-04-16 14:23:02 +03:00
Donovan Watteau 99393f0bcc SCUMM: Don't restrict the Indy4 MONSTER.SOU workaround to English versions
LucasArts released (at least) an official Japanese version with Japanese
text and English voices; plus, there are some fan-made translations made
for the original English Talkie version.  They appear to use the same
MONSTER.SOU (or INDY4.SOU) file.

So, instead of only applying the Trac#10559 workaround to Common::EN_ANY
releases, accept any (talkie) version, as long as we can find the broken
VOC header at that offset.
2022-04-16 14:20:26 +03:00
Eugene Sandulenko 9a05b364d0 SCUMM: Fix warning when scumm-7-8 is not enabled 2022-04-07 11:12:06 +02:00
Andrea Boscarino fbc989d60f SCUMM: DIG/DiMUSE: Implement mouth sync times retrieval and handling 2022-04-06 21:31:05 +02:00
Torbjörn Andersson cb561f462e SCUMM: Read the "enable_enhancements" setting only once
I can't change during gameplay, it's shorter to type, and we won't
accidentally involve the config manater in some tight loop.
2022-03-23 15:23:10 +01:00
Torbjörn Andersson 4f8653e4f9 SCUMM: Make playing missing Mac MI2 music optional. 2022-03-23 15:23:10 +01:00
Torbjörn Andersson b5a93d9d67 SCUMM: Fix some more bugs with Loom replacement tracks
Don't try to update the _musicTimer in saveLoadWithSerializer(), because
we haven't yet loaded all of the savegame. Instead, do that in a new
restoreAfterLoad() method.

As an extra bonus, if an audio track was playing when the game was
saved, try to resume it from approximately that point.

Unfortunately, it turns out that _currentCDSound was not properly reset
when the song ended so loading a savegame made with an earlier version
of this feature may cause it to play music that it shouldn't. But that's
the kind of thing you should count on on the bleeding edge. Savegames
made after this change should be fine.
2022-03-08 11:19:39 +01:00
Torbjörn Andersson b36347c1e9 SCUMM: Improve Loom Overture timing with replacement music
Before, the music timer was based on the number of SCUMM ticks that had
passed since the track started. But this meant that the timing could
differ by several seconds depending on your hardware.

Now it's instead based on the amount of time that has passed since the
replacement track started playing. Time that passes while the game is
paused does not count. Of course, if the player suspends the process that
time still counts. But the player was clearly asking for it then!

Would it be better to tie it to the current position in the audio track?
Possibly, but the CD audio manager doesn't provide that information.
Even if it did, the timer has to run even if the track ends prematurely,
because we can't just assume that every available recording has the
expected length.

But at least, we now have a well defined unit of measurement: We
hard-code the point in time where the Overture transition should happen
with the Ozawa recording. Ten ticks on the settings slider moves this
point by one second, allowing the user to adjust it by 20 seconds in
each direction. Surely that should be enough?
2022-02-11 12:21:29 +01:00
Torbjörn Andersson c80adc3e8b SCUMM: Add setting for the Loom Overture tempo on the Engine tab
It's hard to make this appear only on EGA Loom, so the tooltip has to
document the fact that it's only useful there. The setting is made
relative to the default tempo, which I feel is a much more sensible way
of presenting it to the user than the raw ticks value.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson c63786022d SCUMM: Another attempt at fixing the Loom Overture timing
I can only conclude that SCUMM ticks aren't accurate enough to match the
original timer, but at least the transition now happens almost at the
same point as with the MT-32 version, when using the Ozawa version of
the music. Maybe this should be configurable, to accommodate for
different recordings?
2022-02-08 13:31:39 +01:00
Torbjörn Andersson 0f61ae7f7a SCUMM: Map Loom demo music to the appropriate replacement tracks. 2022-02-08 13:31:39 +01:00
Torbjörn Andersson 0bd13126b5 SCUMM: Don't loop the Loom replacement audio tracks
I mistakenly thought they should be looped, but after testing (both with
ScummVM and DOSBox) I have come to the conclusion that they should not.
The music ends whenever there is a sound effect anyway, so having the
music play to the end of the track is the exception, not the rule.

In the FM Towns version, music does play continuously. Personally I find
this makes the game much harder, since the music can drown out the sound
effects.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson f0c07b299b SCUMM: Add replacement track for unmaking the Loom
Also tweaked the expected length of the Overture so that it syncs up
nicely with Act II: No. 10 Scène (Moderato) from the Seiji Ozawa
recording. It was apparently used as tempo reference for the Loom
soundtrack, though I don't know if this was the actual track used for
the Overture since No. 14 is almost identical.

The way the code is written, it should still work fine even if the track
is longer or shorter than expected. And, let's face it, most players
will probably skip the Overture once they've heard it a few times.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson 2c5e771b85 SCUMM: Add replacement track for Loom's "opening the sky" scene
This track is a bit harder to isolate from the ballet recording, since
it's in the middle of a piece of music. But since all enhanced tracks
are optional, that's not really a problem.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson 7f6463f5c0 SCUMM: Ensure that the full Loom Overture plays 2022-02-08 13:31:39 +01:00
Torbjörn Andersson 5d9282ad7d SCUMM: Slightly more robust getReplacementAudioTrack()
Check that VAR_SOUNDCARD really is 4 before concluding that something is
a Roland track.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson 5d32eccf72 SCUMM: Fix Loom Overture stalling if replacement track ends
For the Loom Overture to end, the music timer has to reach at least 278.
Keep the music timer updated for as long as there is a current CD sound,
even if the track itself has ended. If the track ends very early during
the Overture, skip ahead to the scene change. There will be several
seconds of silence, but this seems unlikely to ever happen to begin
with.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson 48bebe680d SCUMM: Emulate the music timer for replacement audio tracks
This is currently hard-coded for the Loom Overture, and counts the
number of SCUMM ticks that have passed since the song started. Perhaps
it would make more sence to query the CD position, but our CD audio
manager doesn't support that at the time of writing.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson 8ad80a83c1 SCUMM: Initial work on replacement audio tracks for Loom
This allows EGA Loom and Mac Loom to use replacement audio tracks, e.g.
from the FM Towns or TurboGrafx-16 versions or, with a bit work, any
recording of the original ballet.

Currently the Ouverture doesn't work, since it relies on the music
timer being updated.
2022-02-08 13:31:39 +01:00
Orgad Shaneh 6be5b08c78 SCUMM: Show subtitles on talkie versions without sound file
If the game is a talkie version, on which the verbs reference sounds, but
it is missing the sound file, and the user chose Voice Only, a warning
appears for every playback attempt.

Force subtitles on this case, to avoid these warnings.

Fixes trac 13151
2022-01-30 13:30:27 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
athrxx 7ce98275a2 SCUMM: fix unused var warning 2021-11-17 20:07:01 +01:00
Andrea Boscarino f731cfd648 SCUMM: DiMUSE: New Digital iMUSE Engine (#3368)
SCUMM: DiMUSE: Add new implementation of the engine
2021-11-16 00:05:18 +01:00
Orgad Shaneh ed5489929c SCUMM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Paul Gilbert 005561d305 COMMON: Increase Stream pos, seek, size from int32 to int64 2021-07-08 18:24:28 -07:00
sluicebox 93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00