Commit graph

243 commits

Author SHA1 Message Date
Donovan Watteau
16e2068aec JANITORIAL: Fix various single-character typos 2022-11-11 20:55:56 +01:00
AndywinXp
0a303f4910 SCUMM: COMI: Save camera freeze state
This fixes an issue in which saving a game in a situation in which the camera
is frozen (i.e. having the inventory open) and then reloading it, doesn't keep the
camera state, leading to slight graphical glitches. The original interpreter saves this
parameter, so we better do that too.
2022-11-04 21:09:12 +01:00
athrxx
b6f00bb049 SCUMM: (FM-TOWNS) - simplify mouse cursor color endian fix a bit 2022-10-27 00:36:34 +02:00
athrxx
fe24a937a2 SCUMM: (FM-TOWNS) - fix mouse cursor color endianness glitch
(which would occur when loading a savegame created on a machine
with a different endianness)
2022-10-26 21:44:27 +02:00
Le Philousophe
137b51d7ac SCUMM: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
AndywinXp
5ef621e27d SCUMM: GUI: Allow the user to open the GMM whilst on the original menu 2022-09-08 19:10:42 +02:00
athrxx
ce4ed0bbf1 SCUMM: (COMI) - rename _savegameThumbnail
The new GUI code has a variable of the exact same name in the base class scope. It does not cause issues for me, but I guess it would at least provoke a warning on some compiler. We really don't need to wait for that...

I also renamed the _savegameThumbnailPalette, just for consistency.
2022-09-08 19:10:42 +02:00
AndywinXp
b881a3f600 SCUMM: GUI: Create proper thumbnail for savegames created within the original menu 2022-09-08 19:10:42 +02:00
AndywinXp
2417448791 SCUMM: Change _defaultTalkDelay to _defaultTextSpeed
From now on we're reasoning in terms of text speed, just like the interpreter does,
which means: delay == 9 - speed.
This allows us to sync the internal GUI and the ScummVM GUI more easily, and
allows for a better correspondence to the original interpreters.
2022-09-08 19:10:42 +02:00
athrxx
2124de037e SCUMM: fix savename encodings
I used kISO8859_1 which works fine most of the
time, but it is still not correct. Now, we just call
getDialogCodePage(), so we get the code page
that matches the current game font...
2022-08-18 20:35:21 +02:00
athrxx
b369d9aba0 SCUMM: (COMI) - fix encodings for savegame names
(for now, only for kISO8859_1)
2022-08-06 18:46:53 +02:00
AndywinXp
2c9d7fd2ee SCUMM: COMI: Change how blastObject rects are restored for v8
This fixes the last remaining graphical glitches pertaining the original GUI
2022-08-06 13:33:56 +02:00
AndywinXp
3b2ccffbaa SCUMM: COMI: Add support for the ScummVM standard thumbnail in the savescreen 2022-08-06 13:33:56 +02:00
AndywinXp
559f055d37 SCUMM: Skip mousePosition resume on load for original GUI regardless of savegame version 2022-08-06 13:33:56 +02:00
AndywinXp
660fb3dbef SCUMM: COMI: Remove unnecessary sum in thumbnail handling 2022-08-06 13:33:56 +02:00
AndywinXp
f8defefe1e SCUMM: Don't restore mouse position when using the original GUI 2022-08-06 13:33:56 +02:00
AndywinXp
cb7e459264 SCUMM: Fix subtitles parameters not being saved 2022-08-06 13:33:56 +02:00
AndywinXp
1ac282c1e8 SCUMM: COMI: Add fallback thumbnail for original menu 2022-08-06 13:33:56 +02:00
AndywinXp
73586c04a3 SCUMM: COMI: Prevent saving from the GMM on the original main menu 2022-08-06 13:33:56 +02:00
AndywinXp
a0cbacf261 SCUMM: v7-8: Amend removing call to removeBlastTexts()
So... apparently we need this :-)
2022-08-06 13:33:56 +02:00
AndywinXp
6ee5f03ffa SCUMM: v7-8: Fix correct moment to call checkExecVerbs()
Also, remove 20 years old workarounds because of this
2022-08-06 13:33:56 +02:00
AndywinXp
f0d371d96e SCUMM: Fix warnings 2022-08-06 13:33:56 +02:00
AndywinXp
da69dec129 SCUMM: COMI: Fix original GUI savegames on ScummVM loading from launcher 2022-08-06 13:33:56 +02:00
AndywinXp
1e0a61d64c SCUMM: COMI: Use ARRAYSIZE macro in overflow check 2022-08-06 13:33:56 +02:00
AndywinXp
d04d8cc00c SCUMM: COMI: Disable autosaving if original GUI is in place 2022-08-06 13:33:56 +02:00
AndywinXp
fb2fcbf30e SCUMM: COMI: Implement savegame thumbnails 2022-08-06 13:33:56 +02:00
AndywinXp
759ae2e47e SCUMM: COMI: Set keyScript parameters in case they are missing at loading 2022-08-06 13:33:56 +02:00
AndywinXp
1e9d51c28a SCUMM: COMI: Implement the original main menu
Every functionality has been implemented (audio options, text options, saving and loading).
The only thing currently missing from the menu is the thumbnail handling.
2022-08-06 13:33:56 +02:00
athrxx
85a191de2b SCUMM: (v6/EGA) - improved mouse cursor handling and some other fixes
The mouse cursors get dithered correctly now and due to earlier fixes SAMNMAX seems to be in as good a state as DOTT regarding EGA dithering mode, so I enable it. Also added a post-load fix for the palette and the mouse cursors.
2022-07-31 23:57:15 +02:00
athrxx
4230a882b0 SCUMM: (V4/EGA/CGA) - improve post-load fixes
Also include room palette fixes for games that were saved with a different video mode. Unfortunately the scripts make changes to the room palette based on VAR_VIDEOMODE. The original interpreter does not fix that.
2022-07-23 23:17:46 +02:00
athrxx
2fd8bf67db SCUMM: fix videomode var handling (LOOM CGA actor palette glitch)
(original bug)

In LOOM, the scripts actually read the videomode var and make actor palette adjustments based on that. Which means for games saved in EGA mode, with the wrong videomode var value,  there will be glitches.

This concerns not only Bobbin, but the script does things for various actors and costumes in various situations.

We just set the videomode var to the actual config after loading.

For Bobbin in normal costume, I also include a post-load fix for savegames that will not have the actor palettes fixed by the scripts (savegames that we allow in situations where the original would prevent them).
2022-07-16 14:51:11 +02:00
athrxx
21042c073f SCUMM: (v1) - fix minor glitch introduced in 97fbe86
(old savegames should only be upgraded for DOS)
2022-07-10 02:56:49 +02:00
athrxx
97fbe867cb SCUMM: (MMv1/ZAKv1) - add support for CGA, CGA Composite and Hercules modes
This does not improve anything about these modes for v2 and v3, except:
- brighter CGA colors
- v2 will also get the more accurate Hercules mouse cursor

I will do improve v2/v3 as separate tasks. v3 seems to be mostly fine, anyway, except for the actors (we dither them just like the backgrounds, but that looks different in DOSBox).
2022-07-10 01:04:38 +02:00
Torbjörn Andersson
6226efcf56 SCUMM: Fix mouse position after load for all rendering modes
Since the saved mouse position uses game coordinates, any rendering mode
that causes the graphics to be rescaled will have to convert them to
screen coordinates before warping the mouse there. (The rendering mode
scalers are separate from the backend scalers.)
2022-06-06 12:15:36 +02:00
athrxx
45cdc8ab07 SCUMM: (v1-3) - move load post processing to extra function 2022-06-05 23:17:28 +02:00
athrxx
dfe6082a12 SCUMM: (v1-3) - fix sound recovery when loading savegames
Prevent "stuttering" from starting the music multiple times (which may now happen due to the improved savegame loading for v1-3).

Also add some more tweaks to minimize stuttering, like setting volume to 0 during loading.

The result now seems to match what I get when using an emulator.
2022-06-05 23:17:28 +02:00
Andrea Boscarino
75b50b99b4 SCUMM: v7-8: Remove all blast texts before loading a savestate
This fixes an issue in COMI, in which bringing up the recipe book and then pulling it down
left the recipe texts on screen on the new room for several frames.
2022-06-03 17:51:56 +02:00
athrxx
2adc35e261 SCUMM: fix minor (and rare) costume rendering glitch
(DOTT bug mentioned here: https://github.com/scummvm/scummvm/pull/3795/)

I found this in all versions from 1 to 6, so I applied the fix to all non-AKOS and non-v0 costumes.
2022-04-20 19:48:22 +02:00
athrxx
acb665c109 SCUMM: (SCUMM7/8) - cleanup (text) verb drawing and Hebrew right-to-left drawing
(SCUMM7/8 only)
2022-04-08 19:53:44 +02:00
Torbjörn Andersson
c2b5a96f3c SCUMM: Fix regression in saving/loading Mac music
This applies to the Mac versions of Loom and The Secret of Monkey
Island. There was a regression some years ago that caused the channel
data to be saved twice, and the instrument data never.

Unfortunately, this does nothing to fix the savegames that were broken
by the regression.
2022-03-14 15:08:42 +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
db1fd7ddbb SCUMM: Fix missing cursor in Mac Indy 3 and Loom after loading
This was a regression that was apparently introduced when the animation
flag was cleared for the Mac cursor. The animation made the cursor show
up when loading older save games, but not new ones. That's why it went
unnoticed until now.
2022-01-24 16:08:48 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +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
athrxx
f8c9ae004a SCUMM: fix regression from 743343be
(thanks to criezy)
2021-09-09 01:39:05 +02:00
athrxx
743343be69 SCUMM: (FT) - fix bug no. 12903 ("Sometimes skipping videos occur")
Prevent autosave during smush playback. Thanks to AndywinXp for the tip.
2021-09-09 00:30:28 +02:00
Torbjörn Andersson
8b10066bda SCUMM: Fix compiling without SCUMM v7/8 2021-08-10 19:13:50 +02:00
Andrea Boscarino
886e6d83e6
SCUMM: COMI: Disable saving/loading during SMUSH videos (#3241) 2021-08-06 14:58:04 +03:00
athrxx
9bcfc91ce2 SCUMM: (v1/2) - fix walking steps calculations
After my recent effort to do this for SCUMM3 I now try to achieve the same thing for v1/2. (Unsurprisingly) the step calculations actually have more in common with SCUMM3 than with the later versions upon which the code was based. However, I find the  v1/2 code somewhat more difficult to fix than v3, since it is quite heavily twisted and refactored to fit into our common code. So all testing and bug reporting is welcome...
2021-08-06 00:58:40 +02:00