[Scummvm-git-logs] scummvm master -> c2b5a96f3cc40fc0465f689ce56770826fc034d4

eriktorbjorn noreply at scummvm.org
Mon Mar 14 14:08:47 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c2b5a96f3c SCUMM: Fix regression in saving/loading Mac music


Commit: c2b5a96f3cc40fc0465f689ce56770826fc034d4
    https://github.com/scummvm/scummvm/commit/c2b5a96f3cc40fc0465f689ce56770826fc034d4
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-03-14T15:08:42+01:00

Commit Message:
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.

Changed paths:
    engines/scumm/players/player_mac.cpp
    engines/scumm/saveload.cpp


diff --git a/engines/scumm/players/player_mac.cpp b/engines/scumm/players/player_mac.cpp
index 8224b1e8ddf..60864154e8d 100644
--- a/engines/scumm/players/player_mac.cpp
+++ b/engines/scumm/players/player_mac.cpp
@@ -130,7 +130,15 @@ void Player_Mac::saveLoadWithSerializer(Common::Serializer &s) {
 
 		s.syncArray(_channel, _numberOfChannels, syncWithSerializer);
 		for (i = 0; i < _numberOfChannels; i++) {
-			syncWithSerializer(s, _channel[i]);
+			if (s.getVersion() >= 94 && s.getVersion() <= 103) {
+				// It was always the intention to save the instrument entries
+				// here. Unfortunately there was a regression in late 2017 that
+				// caused the channel data to be saved a second time, instead
+				// of the instrument data.
+				syncWithSerializer(s, _channel[i]);
+			} else {
+				syncWithSerializer(s, _channel[i]._instrument);
+			}
 		}
 
 		if (s.isLoading()) {
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 335c4551078..690fc4f80e8 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -67,7 +67,7 @@ struct SaveInfoSection {
 
 #define SaveInfoSectionSize (4+4+4 + 4+4 + 4+2)
 
-#define CURRENT_VER 103
+#define CURRENT_VER 104
 #define INFOSECTION_VERSION 2
 
 #pragma mark -




More information about the Scummvm-git-logs mailing list