[Scummvm-git-logs] scummvm master -> 04026c0d091e39b46ff296e9813355176c0a7a2d

eriktorbjorn noreply at scummvm.org
Thu Feb 6 21:07:20 UTC 2025


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:
04026c0d09 SCUMM: Add more error handling to the Mac version of The Dig


Commit: 04026c0d091e39b46ff296e9813355176c0a7a2d
    https://github.com/scummvm/scummvm/commit/04026c0d091e39b46ff296e9813355176c0a7a2d
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2025-02-06T22:05:59+01:00

Commit Message:
SCUMM: Add more error handling to the Mac version of The Dig

Unlike the other Mac games (that I've seen), The Dig has a separate
launcher executable. This does not have the menu and dialog definitions
we need. While this is documented in the ScummVM wiki, I still think
it's a good idea to check for this, since ScummVM will crash if you have
the wrong one.

Changed paths:
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 9d354c6e39c..9b1d4701dc1 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1364,6 +1364,16 @@ Common::Error ScummEngine::init() {
 			if (!resource.hasResFork())
 				return Common::Error(Common::kReadingFailed, Common::U32String::format(_("Could not find resource fork in Macintosh resource file %s"), macResourceFile.toString().c_str()));
 
+			// The Dig is special, in that it has a smaller launcher
+			// executable that, I think, decides which one of the
+			// real executables to run. Check that the user didn't
+			// accidentally pick the launcher one.
+			if (_game.id == GID_DIG) {
+				if (resource.getResLength(MKTAG('M', 'B', 'A', 'R'), 128) == 0) {
+					return Common::Error(Common::kReadingFailed, Common::U32String::format(_("'%s' appears to be the wrong Dig executable. It may be the launcher one found in the CD root, which does not contain any of the necessary menu and dialog definitions. Look for a 'The Dig f' folder on your CD. Any one from its sub-folders should be what you need."), filename));
+				}
+			}
+
 			resource.close();
 		}
 




More information about the Scummvm-git-logs mailing list