Commit Graph
715 Commits
Author SHA1 Message Date
Torbjörn Andersson 12738d8856 SCUMM: Create _macIndy3Gui earlier, not in resetScumm()
Since this is before the Mac font manager is created, load fonts when
requested rather than pre-loading them all.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 260b64db73 SCUMM: The Mac executables for Indy 3 and Loom are now required. 2023-10-16 17:40:29 +02:00
Torbjörn Andersson 6f8f3b4b13 SCUMM: Update Indy 3 Mac GUI less frequently
It's enough to do it after thigns have had a chance to change. Not every
iteration of waitForTimer(). This means we no longer have as precise
resolution for our animation timers, but I don't think that's any reason
not to cut down on the (admittedly small) amount of extra work the GUI
has to do.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 716cd6e0e5 SCUMM: Remove Indy 3 Mac GUI mock-up. Begin work on proper GUI.
The goal is to make the interface as simple as possible, and to put as
much of the knowledge of what's going on into MacIndy3Gui itself.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson c6d1a256ef SCUMM: Moved Mac Indy 3 GUI into its own class
This is still just a mock-up, and a bad one at that. It will all be for
nought unless I can figure out how to wire up these buttons to the SCUMM
verbs.
2023-10-16 17:40:29 +02:00
AndywinXp 772df43094 SCUMM: Fix post load fixes for v3 games
This prevents higher than 1 values for _userPut and
_cursor.state on reload.
2023-10-08 20:03:29 +02:00
AndywinXp da8be8c0db SCUMM: Don't pause sound engine for temporary saves
This get rids of a whole class of sound glitches across the
engine, where temporary saves paused sound for a fraction
of second, resulting in a hiccup.

Examples: reading the dialogue of Plato in INDY4, looking
at the recipe book in COMI.

Concept suggested by eriktorbjorn, and proved by the fact
that disasms do not pause audio at when saving.
2023-09-14 15:12:11 +02:00
athrxx 8a54e258a5 SCUMM: (SCUMM7/8) - fix actor turning animation
The turning interpolation was completely disabled for v7/8, since it
interfered with DIG walk scripts. The result was that DIG was the only
v7/8 game that still had (script controlled) turning animations. COMI
and FT don't use walk scripts. So the actors would just flip directly from
the current facing direction to the target facing.

I have now changed parts of the walking code (and some other parts)
to better match the original v7/8 code.
2023-08-27 15:06:57 +02:00
AndywinXp f32cad8c4e SCUMM: HE: Fix _sound object deletion 2023-08-22 13:44:57 +02:00
AndywinXp 815e280da4 SCUMM: HE (Sound): Implement software mixer for all the other games
Sound now appears to play correctly for all HE games.
2023-08-18 22:20:45 +02:00
AndywinXp f3c625437d SCUMM: HE (Sound): Implement some ADPCM stuff
Also, fix Backyard Baseball 2003 lipsync, and
a start-up crash
2023-08-18 22:20:45 +02:00
AndywinXp f733881360 SCUMM: HE (Sound): Implement Miles feedMixer() for Moonbase 2023-08-18 22:20:45 +02:00
AndywinXp e457f75908 SCUMM: HE (Sound): Fix crashes in HE versions without sound modifiers
Also, fix early callback stuff and clean some other stuff up
2023-08-18 22:20:45 +02:00
AndywinXp 44ae88f230 SCUMM: HE (Sound): Implement most audio engine functions
Also, added some mixer stub functions
2023-08-18 22:20:45 +02:00
AndywinXp f4455e773e SCUMM: Relabel part of the general sound code
Albeit not 100% necessary for rewriting the HE sound engine,
I decided to make this change in order to:
- Give proper meaning to magic numbers and variables
  which were given temporary names 20 years ago;
- Avoid going insane when making comparison with HE code
  and ours, when rewriting the sound code.
2023-08-18 22:20:45 +02:00
AndywinXp 454a1d1593 SCUMM: HE (Sound): Clean-up magic numbers and implement modifySound 2023-08-18 22:20:45 +02:00
AndywinXp 7540bfc822 SCUMM: HE: Begin audio engine rewrite 2023-08-18 22:20:45 +02:00
AndywinXp 329ffef42d SCUMM: AMIGA: Implement 50Hz mode
For now this is implemented via config file only.
It will be added to the GUI as soon as the enhancements
revamping PR is merged, which includes a generic SCUMM
engine widget.
The game speed changes in this commit were verified against
the latest WinUAE version. MI1 apparently has internal routines
which keep the speed of game and music constant between PAL
and NTSC; LOOM does that only for the music. Older games
have their video and sound speed based on the main VBlank rate.
iMUSE games do their own thing as usual and already work fine :-)
2023-06-29 14:09:27 +02:00
AndywinXp 6c23cbfe5d SCUMM: v0-1-2-3: Implement post-load fixes (from orig. menu to GMM)
This commit implements proper loading of savestates saved from
the original menu in v0-3 games and loaded either from launcher
or GMM. Why is all of this necessary? It is because these saves
are built under the assumption that they will be reloaded from the
main menu room, and that therefore there will be a graceful
termination of the global script handling the main menu.

Terminating said script gracefully implies cleaning up variables,
stopping menu related scripts, and reboot other scripts which had
previously been stopped.

This certainly doesn't happen when reloading said savestates from
the GMM/launcher, and what instead happens is, in order:
- The game loads from the menu room;
- The menu scripts continues from an inconsistent location,
effectively re-saving the game;
- This invalidates the thumbnail of the savestate, which will now
show a picture of the menu;
- Closing the menu gets the user back to the saved state,
with probably an inconsistent state of some variables and scripts.

This fixes all of this, by detecting if we are loading a savestate
saved from the original menu, and by manually running the correct
script operations for each game in order to correctly close the
menu and resume the game.

Please note that this commit works under different assumptions
from the ones pertaining the already available post-load fixes
(which assume that you are saving the game from GMM).
2023-06-06 00:55:50 +02:00
AndywinXp f484ad6545 SCUMM: SAMNMAX: Fix bug #14467
This was caused by the fact that the pre and post save screen scripts
were not being called, and this messed up the cursor state with savegames
created as quicksaves.

Also, renamed the variables containing said scripts numbers, so that
they are a little bit more meaningful now.
2023-05-21 21:17:36 +02:00
AndywinXp 1a23804e52 SCUMM: SAMNMAX: Don't run post-load script for non-available quicksaves
Fixes part of #14467
2023-05-21 20:16:14 +02:00
Vladimir Serbinenko b06893a692 SCUMM: Support extracting resources from macbinary 2023-05-10 22:44:04 +02:00
AndywinXp 03f550c7f2 SCUMM: GUI: Fix lag during main menu rooms
This enhancement affects those games who use an in-game
room for main menus.
2023-04-10 00:06:09 +02:00
Little Cat 9de54e524a SCUMM HE: Comments for translators. 2023-04-08 00:39:38 +02:00
Little Cat 6bcecf351c SCUMM HE: Add create network session dialog. 2023-04-08 00:39:38 +02:00
AndywinXp 84e23ee647 SCUMM: SAMNMAX: Fix cursor being invisible after load
This happened when creating savestates within the original menu
and then loading them from the GMM
2023-04-06 12:03:20 +02:00
AndywinXp 32a17b7db7 SCUMM: Remove very old RNG workaround
A bit of history: this piece of code was apparently put in place in a time
where ScummVM only ran the SCUMM engine, and there was no common
PRNG module (see e48fbc0). This meant that at the time the PRNG was
not seeded as it is today, hence the workaround, which aimed at making
the generated numbers less predictable. This piece of code is not found
in any of the original executables.

Nowadays we put a lot of attention and care into our speedrunner-friendly
features; for example, we have an option which lets the user choose their
own seed for random numbers, so that we can have a degree of replicability
for the various runs. And the piece of code that is being removed in this commit
was reported for causing issues in the runs in which random numbers played
a bigger role.
2023-04-02 22:21:02 +02:00
AndywinXp 289a9b37e9 SCUMM: Attempt at fixing #14337
Bug: "Subtitles are not shown anymore in some games".
To solve this we use the "subtitles" and "speech_mute" keys as masters
and "original_gui_text_status", used to sync the original GUI as slave.
2023-03-23 16:44:01 +01:00
Eugene Sandulenko 5476fb3e1e SCUMM: Fix crash when compressded files are detected
We call Dialog::runModal() which in turn, calls pauseEngine().

At this point, SMUSH player is not yet initialized, but our implementation
calls _splayer->pause() which leads to a crash on Android.
2023-03-19 12:27:17 +01:00
Vladimir Serbinenko b021957fb3 SCUMM: Support playing most RuSCUMM versions without patching manually 2023-03-13 20:17:33 +01:00
athrxx 7694db025e SCUMM: (IMS/MAC) - fix bug no. 14310
(manually set gs flag to false, just the same way we do for Amiga)
2023-03-13 19:24:16 +01:00
Eugene Sandulenko 34e2d342c5 SCUMM: Moved SessionSelector dialog to Scumm namespace 2023-03-06 16:49:27 +01:00
Eugene Sandulenko 13dbe49b44 GUI: Move SessionSelector dialog to SCUMM engine where it belongs 2023-03-06 16:49:27 +01:00
AndywinXp d3bd4f6bd0 SCUMM: COMI: Add option to enable "A Pirate I Was Meant To Be" for non-ENG versions 2023-03-06 10:59:14 +01:00
Little Cat d85c206714 SCUMM HE: Fix compiling without ENet. 2023-03-06 00:07:13 +01:00
Little Cat 893eb485f8 SCUMM HE: Use new online session dialog. 2023-03-06 00:07:13 +01:00
Little Cat 8a17fc4ebf SCUMM HE: Add Yes/No buttons to registration box. 2023-03-06 00:07:13 +01:00
Little Cat d06bac869c SCUMM HE: Initial Lobby (Boneyards) implementation 2023-03-06 00:07:13 +01:00
Little Cat ce45a4f4e6 SCUMM HE: Use new online networking code. 2023-03-06 00:07:13 +01:00
Miro Kropacek 72f6c4ef61 SCUMM: Increase {min,max}HeapThreshold for ATARI 2023-03-04 23:38:42 +01:00
AndywinXp da2dc011f8 SCUMM: MI1 (Ultimate Talkie): Fix #14269 2023-02-27 00:05:57 +01:00
AndywinXp 6f01cfd9a5 SCUMM: Remove very ancient commented code
If I'm not mistaken was used as a workaround back then when the MI2 difficulty
screen wouldn't show up; after some time it had been commented out, and it
remained like that ever since. Thanks to einstein95 for pointing that out!
2023-02-10 21:56:47 +01:00
Cameron Cawley f7785f463a SCUMM: Use the keymapper for bike fights in Full Throttle 2023-02-08 00:11:40 +01:00
AndywinXp 58185c5654 SCUMM: SMUSH: Extend dynamic video framerate changes to all games
This has been verified from disasm, and also removes the need for
another old workaround.
2023-01-15 22:20:01 +01:00
AndywinXp 9e7e6a08b2 SCUMM: INSANE/SMUSH: Implement video file dependent frame rate
In FT and DIG demo, video files have the correct frame rate encoded in the FLU header.
This fixes bug #14029.
2023-01-15 14:39:33 +01:00
AndywinXp a0a647c290 SCUMM: Properly sync voice mode flags between ScummVM and original GUI at startup
Fixes #14027.
2023-01-14 12:55:53 +01:00
AndywinXp a41b1174ed SCUMM: v7-8: Add GUI option for toggling low latency audio mode 2023-01-10 21:17:23 +01:00
AndywinXp 8d0e97af70 SCUMM: DIMUSE: Implement low latency mode
This fixes bug #13462
2023-01-10 21:17:23 +01:00
AndywinXp 61fa4b6253 SCUMM: v7-8: Fix FT camera bug and properly fix #1195 and #1579
There was a nasty bug in the fuel tower room, when the cops arrive at the
tower and the player regains control, in which the camera would be brought up
and then down again.

While I was there, since this is the same domain, I rechecked the v7-8 camera
code from the disasm, made some corrections, and properly fixed #1195 and
#1579. Another workaround bites the dust :)
2023-01-08 17:42:50 +01:00
AndywinXp 5b18d1aa6b SCUMM: DIMUSE: Implement support for higher internal sample rates
This lays the ground for:
* Supporting fan dubbings and self-made high quality music replacement;
* Reintroduction of support for compressed audio.
2023-01-02 23:30:57 +01:00