Commit Graph
672 Commits
Author SHA1 Message Date
athrxx f66aad48d9 SCUMM: (LOOM) - fix/improve comments 2022-05-12 19:00:03 +02:00
athrxx 5522beae53 SCUMM: (LOOM) - fix bugs #6011 and #13369
(try to emulate the behavior of the save script without actually calling it)
2022-05-12 19:00:03 +02:00
Torbjörn Andersson 7586876887 SCUMM: Make skipping Sam & Max sound pre-loading an enhancement
The original commit message says "Skip sound caching in Sam & Max
(Talkie)", with no mention of copy protection being involved. I guess
the _copyProtection flag was re-used as a convenient but rather
unintuitive way of preserving the original behavior.
2022-05-06 19:51:11 +02:00
Andrea Boscarino 024aa1f22b SCUMM: SMUSH: Implement audio sub-engine 2022-04-16 23:25:31 +02:00
athrxx 997e2c4b05 SCUMM: (SCUMM7/8) - cleanup
- remove outdated code
- move things from V6 to V7
2022-04-08 19:53:44 +02:00
athrxx f5f49d1b3f SCUMM: (SCUMM7/8) - improve ingame text wrapping and positioning for DIG and COMI
This fixes a couple of regressions (mostly camera related). For DIG it seems that the older version of the interpreter uses CharsetRenderClassic type text display while the newer version uses COMI style. I stick with the COMI style, but with the necessary tweeks to make it pixel perfect for all versions.

COMI (I've tested English and Chinese) seemed to be pixel perfect without having to do much, same for DIG Chinese (new interpreter version). Even the verbs seem to be fine, although I haven't changed anything there yet (applies to COMI only afaik, I think DIG doesn't have text verbs).

DIG English (old interpreter version) is another matter. That one wraps text quite differently. Our version looked quite different from the original. But now it also seems to be fine. I even fixed a weirdo problem with the character width (It seems that the fonts have some kerning data; if we use that like we did the 'a' character gets displayed too narrow by 1 pixel. So all lines containing 'a' characters were slightly off). I have examined several strings in several camera settings for pixel perfect drawing in DIG and all seems good now...

FT: I'll do that separately. I haven't even checked if it needs any fixing. Maybe it is fine already. But it sure would be nice to get rid of any redundancies...
2022-04-08 19:53:44 +02:00
athrxx 0256e92c25 SCUMM: (SCUMM7/8) - reorganize font rendering - second part
- Attach actor talk texts to the appropriate text renderer and get rid of redundant code.
- Cleanup subtitle text handling.
- Fix handling of ^codes.
- Fix more regressions from last commit.
- Correct some x/y positioning.
2022-04-08 19:53:44 +02:00
athrxx 1f56132725 SCUMM: (SCUMM7/8) - reorganize font rendering - first part
(inspired by PR 3276 - this here has the desired effect, but actually allows the removal of hacks, workarounds and redundancy code instead of adding more of that sort)

The purpose is to have the same accurate font rendering that we already have in the Smush code also for the ingame texts. The original interpreters draw the text like that, so this is not a weirdo invention of mine.

This is still broken. The main purpose was to get as much code done as necessary to have it at least compile again and correctly run the Smush texts.

The rest still needs quite some work...
2022-04-08 19:53:44 +02:00
Torbjörn Andersson b66e84d57a SCUMM: Change "Use correct font spacing" to a game-specific enhancement
It doesn't make much sense to keep this as a separate option, when
fixing the font spacing is an enhancement specifically for the Mac
version of Indiana Jones and the Last Crusade.
2022-03-23 15:23:10 +01: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 4ed1777b00 SCUMM: Fix regression when pausing games
If for any reason waitForTimer() lags behind by "a lot", return the real
time instead of the expected time. One such case if is the game was
paused (which we could detect and set a flag for), but there are other
possible cases (e.g. the process being suspended) which I don't think we
have any good way of detecting.

This keeps the game from rushing to catch up after pausing.
2022-03-18 10:38:00 +01:00
Torbjörn Andersson 619619fe9c SCUMM: Fix engine stalling in fast mode
This was a regression from the recent timing fixes. In fast mode, the
main loop would still assume waitForTimer() took the normal amount of
time to finish. Now waitForTimer() returns the expected end time,
adjusted for fast mode.
2022-03-17 16:35:32 +01:00
athrxx e2da112934 SCUMM: (INDYZAK/FM-TOWNS) - fix scrolling for the demo
The demo scrolling is not yet as refined as in the final products. An adjustment to the timing that was made for the final products is not present in the demo. This adjustment will actually make the scrolling more sloppy in the demo (due to different scumm timer parameters set by the scripts) , so I disable it here.

Please note that the scrolling still won't be as smooth as it is in the final products. This is the same when viewing the demo in an emulator, though (I actually think it is slightly better in ScummVM). It is probably the reason why they made the change for the final products.
2022-03-16 19:50:20 +01:00
Torbjörn Andersson 638bad3bed SCUMM: Make WaitForTimer() a bit more precise
It doesn't matter for the main loop, since any overshoot is still
accounted for and they're just fewer and smaller now. But the function
is called from some other places as well.
2022-03-16 12:10:11 +01:00
Torbjörn Andersson f4c14d9b38 SCUMM: Attempt to improve timing
The waitForTimer() function is almost guaranteed to overshoot its
target. Keep assuming that it's exact, but factor in the difference when
timing how long scummLoop() takes.
2022-03-16 12:10:11 +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 fc1c686909 SCUMM: Don't require the Roland update for the Loom demos
The Roland update is only required to get MT-32 music from the full EGA
version of Loom. The demos include the Roland music already.
2022-02-08 13:31:39 +01:00
Torbjörn Andersson 3899a50503 SCUMM: Fix bugs when initializing default Loom Overture tempo
We now store the difference compared to the default value, rather than
the actual SCUMM ticks. Therefore, the default value for the setting is
0, not DEFAULT_LOOM_OVERTURE_TICKS.
2022-02-08 13:31:39 +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 13faad39a3 SCUMM: Enable Loom replacement tracks for more versions
Thanks to eientei and GandalfTheWhite for confirming that the Atari ST
and Amiga versions use the same track numbering as the EGA (AdLib) and
Macintosh versions. That should mean that only the versions that already
use CD audio track need to be excluded.
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
Thunderforge fd129ebc0c JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).

Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
2022-01-29 14:15:05 +01:00
Andrea Boscarino c20a92b3ac SCUMM: Remove DiMUSE specific code from main engine 2021-12-29 14:26:53 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Torbjörn Andersson 513fffe950 SCUMM: Check for the appropriate audio tracks for indyzak and zakloom
The FM Towns demos use audio tracks, but neither have a track 1. This
caused ScummVM to warn that the audio tracks had not been properly
ripped from the CD.
2021-11-22 19:38:40 +02:00
Eugene Sandulenko c505b27662 SCUMM: Improved wording of the BUN/SOU compressed warning 2021-11-18 23:49:10 +01:00
athrxx 32837a858f SCUMM: tweak screen shakes some more
- fix Japanes FM-Towns: the shake positions have to be multiplied with the _textSurfaceMultiplier

- slightly reduce shake speed for SCUMM <=3
2021-11-18 00:37:30 +01:00
athrxx 33d1804b4e SCUMM: fix bug no. 13065 ("Incorrect screen shaking") 2021-11-16 20:35:32 +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
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
Torbjörn Andersson 11bf8833df SCUMM: Add setting for correct font spacing in Indy 3 Mac
For all the purists out there (I know there is at least one), the
default behavior is to try and emulate the original's slightly broken
font spacing. Even though I prefer correct spacing myself.
2021-10-19 19:24:31 +02:00
athrxx 4d5b490695 SCUMM: (SCUMM8) - fix restart (F8) dialog glitch
During smush movie playback the engine simply wouldn't react to a restart attempt (except causing a palette glitch). Now it apparently works...

I'd still strongly discourage anyone from using this, since it might make the engine unstable (see the old comments in ScummEngine::restart()).
2021-08-29 18:06:57 +02:00
djsrv 2aa7e3e558 COMMON: Replace matchString pathMode with general wildcard exclusions
Different characters may need to be excluded for different path styles.
2021-08-09 17:43:12 -04:00
Le Philousophe 2c0f4cf5e0 SCUMM: Fix build when FMTowns is disabled 2021-08-01 21:25:22 +02:00
athrxx 7afd105562 SCUMM: (FM-TOWNS) - add menu option to disable smooth scrolling 2021-08-01 16:10:42 +02:00
Torbjörn Andersson a4fa54550a SCUMM: Add support for Mac Loom low quality music
This is guesswork, but it seems like the first channel always contains a
complete rendition of the music. I think that's intended for low-end
Macs, while the other voices (four, but the last one never seems to be
used) is the standard version of the music.

It doesn't sound particularly good, and also not quite as with Mini vMac
(I'm not fully prepared to rule out emulation problems), but it seems
reasonably close.
2021-07-28 13:37:40 +02:00
antoniou79 04642eef8a ENGINES: Replace checkCD with isolated partial methods
This is PR #3018 "rebased" on the current HEAD, after the conflicts with PR #3003 and me botching the rebase in that PR

Old PR is here: https://github.com/scummvm/scummvm/pull/3018
2021-07-27 20:51:57 +02:00
Torbjörn Andersson 31d18f357c SCUMM: Always play ROL music if MAC music is missing in Mac MI2 / FoA
Before, ScummVM would only play ROL music if a MIDI-capable driver had
been selected. I have AdLib as default, which made it pick ADL music
instead and the Mac music player doesn't support that. So this is not a
new feature, it's just an old feature that's now applied consistently.

This fixes some missing music that might otherwise be missing in MI2,
most noticeably near the very end of the game. The ROL music is an
acceptable substitute, because the Mac instruments are close enough to
a subset of MT-32. I haven't seen any resources with both MAC and ROL
versions, so MAC should still be used when available.

Note that this doesn't seem to have been a ScummVM bug. The music was
missing when I tried the game in a Mac emulator too!
2021-07-20 09:38:48 +02:00
Torbjörn Andersson 4fe3889861 SCUMM: Handle failure to patch MI2 Mac boot script more gracefully
If another Mac version of MI2 is ever discovered, and its boot script
doesn't match any of the known ones, we can't know what the "skip copy
protection" boot param will do. Safer, then, to use the default boot
param. ScummVM may still skip the copy protection, but if so it will do
it the old-fashioned way.
2021-07-15 13:58:31 +02:00
Torbjörn Andersson d2758e913a SCUMM: Use the MI2 Mac specific boot param to bypass the copy protection
ScummVM already disables the copy protection by not checking that you
enter the correct values, so we may as well skip it completely.
2021-07-15 13:58:31 +02:00
Torbjörn Andersson 4ff0994124 SCUMM: Only allow Macintosh b/w render mode for Loom and Indy3
And even then only when running them in hi-res mode.
2021-07-14 07:32:43 +02:00
Torbjörn Andersson cfe270c8af SCUMM: Render the Indy 3 Mac text box to a separate surface.
There's still the matter of exactly when the text box should be created
(sometimes text is drawn to it in several steps, and we don't want to
erase the old text), and when/how to remove the box.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson 0ffe2ada11 SCUMM: Allow more than one Mac font
Indiana Jones and the Last Crusade uses two fonts, thoug at the moment
it uses the wrong font during the intro. I'm not sure why.
2021-06-30 14:59:55 +02:00
Torbjörn Andersson 0c3872d515 SCUMM: Use the mixer's mutex in Player_AD
This is one of the players that has had problems with deadlocks
recently. I'm not very well versed in threaded programming, but arthxx
has promised to fix up some more players later. This one was used as
proof of concept because it deadlocks a lot.
2021-06-24 20:38:38 +02:00
sluicebox 8e1d90f8e4 ALL: Remove clearAllDebugChannels() from Engine dtors 2021-06-14 12:42:38 -05:00
sluicebox 674ed112aa JANITORIAL: Update more old bug tracker numbers
I missed the six digit ones and a few others in:
93eeffc84d
2021-06-09 14:28:52 -06:00