Commit Graph
210 Commits
Author SHA1 Message Date
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
athrxx e0db30fb8f SCUMM: (SCUMM3) - add new walking code vars to save/load function
(also recalculate these vars when loading old savegames)
2021-07-16 01:07:13 +02: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
Torbjörn Andersson 93cbb988a6 SCUMM: Some fixes that I'm not sure exactly what they do
I don't know what these fixes do exactly, but judging by the old code
they should be there.
2021-05-17 18:44:29 +02:00
Filippos Karapetis cb6a107499 SCUMM: Limit x-range of selection workaround to Hebrew versions
Fixes bug #12552
2021-05-17 02:08:21 +03:00
Orgad Shaneh c8fc484c37 SCUMM: Fix X-range of selection for Hebrew on scumm<7
curRect.left is assigned in the script, and it is not modified. right is
assigned with the screen width - original left.

This results in bad highlighting of the verbs all over the line width,
instead of being limited to the actual string.

Due to that, sometimes the selection range of the up/down arrows overlaps
with some of the verbs, and then these verbs cannot be selected.

Solve by storing the original left value, and using it as initial x
position for the string (the actual right-to-left manipulation is done in
drawString()), and modify the value of curRect.left to match the string
that was actually drawn.

This bug is similar to the one that was fixed in 58e921eb87, but the
solution that was done there for v7 and v8 cannot work here, because the
string logic is much more complicated.
2021-04-26 21:26:41 +03:00
Zvika Haramaty a1f440c073 SCUMM: FM-TOWNS: Add optional trimming to 200 pixels height
Trimming the screen to 200 pixels allows using aspect ratio correction.
2021-04-20 23:56:39 +02:00
sluicebox 93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
athrxx 65f567d817 SCUMM: (FM-Towns) - array declaration cleanup
_cyclRects can have no more than 10 entries, but was declared as [16]. Someone put a TODO about it in saveload.cpp, so why not fix it...
2021-02-28 21:00:23 +01:00
Eugene Sandulenko aa563f0c81 ALL: Remove PS2 port 2020-08-01 15:15:49 +02:00
Henrik "Henke37" Andersson 802c0ece7f SCUMM: PauseToken for saving 2020-05-10 23:39:31 +02:00
Paul Gilbert a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
sluicebox b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Robert Crossfield 71172add9c SCUMM: Original V0-V2 flashlight shape and size for MM/Zak (#10947, #10951) 2019-05-05 15:41:20 +03:00
Adrian Frühwirth 00e59a3122 ALL: Load savegame thumbnail only when necessary
This commit introduces the following changes:

1. Graphics::loadThumbnail()

   Now returns a boolean and takes a new argument skipThumbnail which
   defaults to false. In case of true, loadThumbnail() reads past the
   thumbnail data in the input stream instead of actually loading the
   thumbnail. This simplifies savegame handling where, up until now,
   many engines always read the whole savegame metadata (including
   the thumbnail) and then threw away the thumbnail when not needed
   (which is in almost all cases, the most common exception being
   MetaEngine::querySaveMetaInfos() which is responsible for loading
   savegame metadata for displaying it in the GUI launcher.

2. readSavegameHeader()

   Engines which already implement such a method (name varies) now take
   a new argument skipThumbnail (default: true) which is passed
   through to loadThumbnail(). This means that the default case for
   readSavegameHeader() is now _not_ loading the thumbnail from a
   savegame and just reading past it. In those cases, e.g.
   querySaveMetaInfos(), where we actually are interested in loading
   the thumbnail readSavegameHeader() needs to explicitely be called
   with skipThumbnail == false.

   Engines whose readSavegameHeader() (name varies) already takes an
   argument loadThumbnail have been adapted to have a similar
   prototype and semantics.
   I.e. readSaveHeader(in, loadThumbnail, header) now is
   readSaveHeader(in, header, skipThumbnail).

3. Error handling

   Engines which previously did not check the return value of
   readSavegameHeader() (name varies) now do so ensuring that possibly
   broken savegames (be it a broken thumbnail or something else) don't
   make it into the GUI launcher list in the first place.
2018-04-07 09:26:20 +02:00
Colin Snover ffdb5a8ebc SCUMM: Fix compilation failure when DISABLE_TOWNS_DUAL_LAYER_MODE is defined 2018-01-31 21:24:09 -06:00
Colin Snover 08186aeec6 SCUMM: Rename iMUSE save/load function to avoid confusing function hiding 2018-01-31 21:24:09 -06:00
Colin Snover 4e6b60948d SCUMM: Remove variable shadowing 2018-01-31 12:24:32 -06:00
Colin Snover 2e061d95c5 COMMON: Move VER macro for serializer into common code 2018-01-31 17:58:01 +01:00
Colin Snover 9916b26383 SCUMM: Replace UB-triggering serialization code with Common::Serializer
Fixes Trac#10342.
2018-01-31 17:58:01 +01:00
Bastien Bouclet 3eb82462e7 ALL: Specify the DisposeAfterUse constructor argument for dynamic memory write streams 2017-09-22 07:06:21 +02:00
Ben Castricum 8957bf4d7f SCUMM: reset ShakePos on loading, fixes one part of bug #7141 2016-07-01 08:25:28 +02:00
Ori Avtalion 3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Eugene Sandulenko aa6ae7ac35 SCUMM: Fix warning 2016-02-14 17:51:30 +01:00
Torbjörn Andersson f74ba29753 SCUMM: Enable Day of the Tentacle easter egg
Instead of returning to the launcher, a game may now specify a list
of "chained" games and optional save slots. The first game is popped
from the list and started. Quitting still quits the entire ScummVM.
It seemed like the sensible thing to do.
2014-12-30 03:45:14 +01:00
Filippos Karapetis 40b224fc74 SCUMM: Disallow saving while a room 'prequel' is shown in v0-v3 games
These are cases where the screen is completely blank, showing text.
In such cases, no room is set, thus no room resources are available.
An example is the screen shown after the credits in the Zak FM-TOWNS
intro ("The next day..."). Thanks to segrax for finding this case.
This commit is based off pull request 522, but completely disallows
saving in such scenes, instead of adding explicit checks for them
2014-10-29 11:23:59 +02:00
Filippos Karapetis 53d3ee07df SCUMM: Add support for CD audio tracks in the Steam versions of Loom
Many Thanks to Ben Castricum for the original patch
2014-07-04 23:33:43 +03:00
Max Horn 8638b29b89 SCUMM: Avoid potential issues casting invalid values to enum
A compiler could in principle decide that a ResType enum can
never equal 0xFF or 0xFFFF, and thus incorrectly optimize
the ScummEngine::saveOrLoad code. So check the value
*before* casting it.
2014-03-30 19:48:08 +02:00
Max Horn 4d02f67bd1 ALL: Resolve multiple clang warnings 2014-03-30 14:38:02 +02:00
D G Turner f4e7b593dc SCUMM: Fix bug #6009 "DC: FT/Dig - Sound disappears when VMU save fails"
This was introduced by fd3970aa52:
Apply patch #2984508 - "GSoC: SCUMM stopped audio from playing while
saving"

This was not quite correct as if the save fails, the function exits
without unpausing the engine, which resulted in sound and music
remaining muted. This corrects the logic to unpause in all cases.
2014-03-18 22:49:36 +00:00
Johannes Schickel 3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
clone2727 9d9ced0734 Merge pull request #366 from clone2727/he-saves-target-name
RFC: Make HE games use the target name in all save files
2014-01-17 15:59:44 -08:00
Johannes Schickel 10def6a435 SCUMM: Small formatting fix. 2013-11-27 19:32:08 +01:00
Johannes Schickel fdcb6a6b1a SCUMM: Cleanup querySaveMetaInfos implementation.
This results in less code and also less I/O operations (including seeking).
2013-11-27 19:29:21 +01:00