Commit Graph
282 Commits
Author SHA1 Message Date
athrxx c5ef168572 SCUMM: (LOOM) - extend cursor postload fix to all versions
I have encountered the bug with the 0 width/height
cursor in the FM-Towns version, too.
2024-03-03 15:01:31 +01:00
athrxx aee2bf53bb SCUMM: (Loom/Mac) - add new sound player
This  should provide more accurate and feature complete
sound than the existing player (which is still there, just
disabled). I haven't implemented a proper quality selection
method yet.
2024-02-28 21:01:41 +01:00
athrxx 439b8dcbd2 SCUMM: (INDY3/MAC): save/load sound state 2024-01-31 19:34:43 +01:00
athrxx 938b703ba5 SCUMM: move VAR_SOUNDCARD reset to extra function
(also update it after loading a savegame)
2024-01-28 16:57:59 +01:00
Torbjörn Andersson fb2bd1166d SCUMM: Split up gfx_mac.cpp into new macgui directory
The Mac GUI code is getting unwieldy, and this is an attempt at breaking
it up into more manageable chunks.
2023-12-22 15:09:06 +01:00
Eugene Sandulenko 3d90caa894 SCUMM: Explain to HE games players that the save/loading is not supported from GMM 2023-12-08 12:21:16 +01:00
Eugene Sandulenko ec2dd2726b ENGINES: Added optional parameter to canSave/LoadGameStateCurrently() for indicating the reason 2023-12-08 12:21:16 +01:00
AndywinXp bd22763cdc SCUMM: MACGUI: Implement correct video size for Mac v3 games
This commit brings games to 640x480 (from 640x400).
All old savegames are compatible and are brought up to date in
real time.
2023-12-03 21:03:59 +01:00
AndywinXp d9d4c278e1 SCUMM: Attempt at fixing blocker #14614
We limit this piece of code to the one and only game having a
PC Engine port, which is Loom.
2023-11-30 23:09:35 +01:00
athrxx 165c8d14f2 SCUMM: add newly introduced var to saving/loading
(also do some minor cleanup to that new code)
2023-11-21 22:50:02 +01:00
Torbjörn Andersson ec1ab82283 SCUMM: Initial work on a common MacGui class that handles Mac menus etc.
This will be used for Last Crusade and Loom. Loom is currently the more
broken of the two, though.
2023-11-18 18:47:39 +01:00
Eugene Sandulenko 319dcd9a89 SCUMM: Fix crash on engine startup
If we show the "Audio files compressed with ScummVM Tools were detected"
message, we are in the middle of initialization. If a user tries to
launch the GMM while the message is still on, it will lead to a crash.
2023-11-12 01:33:39 +01:00
sluicebox c319791519 SCUMM: Fix memory leak in changeSavegameName. PVS-Studio V773 2023-10-30 13:11:17 -07:00
Torbjörn Andersson 175d53905c SCUMM: Increased savegame version
The new Mac GUI doesn't change the savegame format, but it removes a
couple of verbs. It can read old savegames just fine, but new ones will
not be usable by older versions.
2023-10-16 17:40:29 +02:00
Torbjörn Andersson 44b7558756 SCUMM: Remove Indy 3 Mac hacks that are no longer needed 2023-10-16 17:40:29 +02:00
Torbjörn Andersson ead11c29e7 SCUMM: Try to fix Indy 3 Mac GUI after loading 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 06052c78ea SCUMM: Use "compat" param when checking for heap saves in loadState()
Unfortunately _saveTemporaryState really is unrealiable.
2023-09-15 10:48:18 +02:00
AndywinXp eb44252d88 SCUMM: IMUSE: Fix quiet sound beginning after loading a heap save
E.g. when exiting the lost dialogue of Plato screen in INDY4,
sound would dip down for a fraction of second. This is a result
of a workaround of our own, which should be disabled during
heap/temporary saves handling.
2023-09-14 21:45:56 +02:00
AndywinXp 9c724a203c SCUMM: HE (Sound): Do not stop sounds for heap saves under version 80
This is explicitly what HE72 and below asks; it is implied that
whatever sound will be running at that point will be handled
via the scripts.
2023-09-14 21:43:24 +02:00
AndywinXp 44fc2ae2ee SCUMM: HE: Fix #14621
The issue, although minor, was there because of a workaround
which is incompatible with what the original HE code is trying to
do at that point; removing that workaround for HE games fixes it.
2023-09-14 21:41:40 +02:00
AndywinXp 127062cdbf SCUMM: IMUSE: Stop speech when loading temporary save state
This fixes an inaccuracy in situations where a talkie
continues after exiting from a temporary save state,
e.g. looking at the National Archeology journal in Indy4
and exiting the screen before speech is over.
2023-09-14 20:11:47 +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
Torbjörn Andersson c4b4dcf6c4 SCUMM: Fix crash when loading Mac Loom savegames
This is the same problem that has affected version 6 games and Mac Indy
3, so hopefully this fix is enough. I changed the _macScreen check to
check for platform, since that seemed more sensible to me. Some day, we
should probably get rid of the ability to play the Mac versions in low
resolution anyway.
2023-09-05 20:35:00 +02:00
Le Philousophe 5bdd9e6f50 ALL: Unify zlib and gzio API
zlib is used when available and falls back on gzio.
This allows performance improvements as our CRC32 and gzio
implementations are slower than base zlib.
As zlib is available when libpng is present, this is sensible to
benefit from it.
2023-08-28 21:49:03 +02:00
AndywinXp 438bdce454 SCUMM: Implement proper v4 palette cycling code
This commit properly takes care of #10854 and #1016;
the previous code was retrofitted from v5 and thus potentially
presented inaccuracies (e.g. room 1 in LOOM CD shouldn't
cycle colors).

A post-load fix was also necessary for older savegames,
otherwise color cycling would not occur at all until the room
was exited and then re-entered. Being that the cycling data
was being mangled by the previous implementation, there was
no choice but to introduce a new save version to detect this.
2023-06-12 00:26:02 +02:00
AndywinXp 81ce20b4df SCUMM: INDY3 (Mac): Fix #14498
Cursor is handled differently in this Mac port, i.e. without
setting values in the _cursor object. The CursorManager
doesn't exactly like that, so in this commit I've provided a
post-load fix and a fix for the cursor initialization itself.
2023-06-06 23:52:55 +02:00
AndywinXp 5626994c14 SCUMM: ZAK (FM-Towns): Fix bug #14387
This fixes a crash when loading from the GMM save states which had
been created from the original menu. This also fixes the auto-close of the
menu when a game is loaded from the original menu.
2023-06-03 12:34:36 +02:00
AndywinXp 9926908983 SCUMM: SAMNMAX: Fix bug #14468
I really have no idea why I wrote the code in such a way that
it attempted to load stuff that was never saved in the first place,
and I guess we'll never know. Findings by athrxx!
2023-05-21 20:16:14 +02:00
Little Cat d30af5e995 SCUMM HE: Disable save compression for Moonbase. 2023-01-29 18:59:25 +01:00
AndywinXp 655a9774c0 SCUMM: LOOM (CD/Steam): Implement CD Audio music/speech reloading
We were already saving the relevant info for doing that, we simply never used it :-)
2023-01-02 20:21:46 +01:00
AndywinXp b568a71659 SCUMM: v3: Deny quick save/load whenever the script opening the save menu is running 2022-12-03 20:20:21 +01:00
Eugene Sandulenko fb7095f5a4 COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
D G Turner d1c227f3f2 SCUMM: Fix Signed vs. Unsigned GCC Compiler Warning 2022-12-01 03:33:31 +00:00
AndywinXp ba24698225 SCUMM: v3: Implement ability to rename savestate before loading on the original menu
As much as this seems bad design, it's a real possibility in the original interpreters, furthermore
confirmed by the menu messages which are shown when the user tries to do that, so here we are...
2022-12-01 00:04:46 +01:00
AndywinXp 939a9bba39 SCUMM: LOOM (Towns): Implement original save menu quirk with slot 0 2022-11-28 23:21:45 +01:00
AndywinXp 1d206fbc53 SCUMM: v0-1-2-3: Implement actual saving\loading system
This commit implements saving and loading in the same way the original interpreters
for MANIAC v0-1-2, ZAK v1-2-3, LOOM v3 and INDY v3 do. This makes it possible to
use the original save menus without glitches or crashes.

Saves done from GMM can also be loaded from the original menu.
2022-11-28 23:21:45 +01:00
AndywinXp e016419624 SCUMM: FT/DIG: Fix dialog fonts when loading very old savegames
Thanks dwatteau for finding this!
2022-11-14 23:59:53 +01:00
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