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

sev- noreply at scummvm.org
Fri Jul 10 05:51:17 UTC 2026


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

Summary:
bd6e74a053 DIRECTOR: Improve accuracy of calling idle function
7614003f01 ENGINES: Make game match debug message a higher level
9a93a3d8b6 DIRECTOR: LINGO: Improve accuracy of func_mci
b2e27419db DIRECTOR: Add new variant of Popup Computer to detection table
d40e74834d DIRECTOR: Fix rendering RGB555 images in 16-bit display mode
ab3688ccaa DIRECTOR: Always redither image if high-colour mode + puppet palette


Commit: bd6e74a053a81ef5bd5553d76ca050cc4a461601
    https://github.com/scummvm/scummvm/commit/bd6e74a053a81ef5bd5553d76ca050cc4a461601
Author: Scott Percival (code at moral.net.au)
Date: 2026-07-10T07:51:10+02:00

Commit Message:
DIRECTOR: Improve accuracy of calling idle function

For some reason, D3 seems to work slightly differently than D4+; if "go"
is used inside an idle, it will switch frame + defrost the remaining
idle script, but not call idle again until after the next exitFrame
event.

Fixes director-tests/D4-unit/T_EVNT20.DIR
Fixes animation that plays when losing a battle in Yellow Brick Road.

Changed paths:
    engines/director/score.cpp
    engines/director/score.h


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 80c77dcf717..cb42be0caf0 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -90,6 +90,7 @@ Score::Score(Movie *movie, bool haveInteractivity) {
 
 	_numChannelsDisplayed = 0;
 	_skipTransition = false;
+	_skipIdle = false;
 
 	_curFrameNumber = 1;
 	_framesStream = nullptr;
@@ -326,13 +327,15 @@ void Score::step() {
 
 	if (_playState == kPlayStopped)
 		return;
+	bool hasJump = (_nextFrame != 0) || !_window->_nextMovie.movie.empty();
 
-	if (_haveInteractivity) {
+	if (_haveInteractivity && !hasJump) {
 		if (!_movie->_inputEventQueue.empty() && !_window->frozenLingoStateCount()) {
 			_lingo->processEvents(_movie->_inputEventQueue, true);
 		}
 		if (_version >= kFileVer300 && !_window->_newMovieStarted && _playState != kPlayStopped) {
-			_movie->processEvent(kEventIdle);
+			if (!_skipIdle)
+				_movie->processEvent(kEventIdle);
 
 			if (_version >= kFileVer600) {
 				if (_movie->_currentHoveredSpriteId) {
@@ -633,6 +636,12 @@ void Score::update() {
 		}
 	}
 
+	// Don't process frozen script if we use jump instructions
+	// like "go to frame", or open a new movie.
+	bool hasJump = (_nextFrame != 0) || !_window->_nextMovie.movie.empty();
+	if ((g_director->getVersion() < 400) && hasJump)
+		_skipIdle = true;
+
 	if (!debugChannelSet(-1, kDebugFast)) {
 		// end update cycle if we're still waiting for the next frame
 		if (isWaitingForNextFrame()) {
@@ -641,9 +650,7 @@ void Score::update() {
 				_window->render();
 			}
 
-			// Don't process frozen script if we use jump instructions
-			// like "go to frame", or open a new movie.
-			if (!_nextFrame && _window->_nextMovie.movie.empty()) {
+			if (!hasJump) {
 				processFrozenScripts();
 			}
 			return;
@@ -659,6 +666,7 @@ void Score::update() {
 			// Exit the current frame. This can include scopeless ScoreScripts.
 			_movie->processEvent(kEventExitFrame);
 			_exitFrameCalled = true;
+			_skipIdle = false;
 		}
 	}
 
@@ -669,9 +677,7 @@ void Score::update() {
 			_window->render();
 		}
 
-		// Don't process frozen script if we use jump instructions
-		// like "go to frame", or open a new movie.
-		if ((!_nextFrame && _window->_nextMovie.movie.empty()) || _nextFrame == _curFrameNumber) {
+		if (!hasJump || _nextFrame == _curFrameNumber) {
 			processFrozenScripts();
 		}
 
diff --git a/engines/director/score.h b/engines/director/score.h
index 24b5503424e..edc1b710949 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -230,6 +230,7 @@ public:
 	Cursor _defaultCursor;
 	CursorRef _currentCursor;
 	bool _skipTransition;
+	bool _skipIdle;
 
 	Common::Array<uint32> _spriteDetailOffsets;
 	Common::Array<bool> _spriteDetailAccessed;


Commit: 7614003f01992be163ebd154f92f5a80aa73417e
    https://github.com/scummvm/scummvm/commit/7614003f01992be163ebd154f92f5a80aa73417e
Author: Scott Percival (code at moral.net.au)
Date: 2026-07-10T07:51:10+02:00

Commit Message:
ENGINES: Make game match debug message a higher level

Changed paths:
    engines/advancedDetector.cpp


diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 4ec7282a6bc..0032e24e67b 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -843,7 +843,7 @@ ADDetectedGames AdvancedMetaEngineDetectionBase::detectGame(const Common::FSNode
 			curFilesMatched++;
 		}
 
-		debugC(3, kDebugGlobalDetection, "Game '%s' matched %d files all files present: %d has unknown files: %d, total files: %d",
+		debugC(5, kDebugGlobalDetection, "Game '%s' matched %d files all files present: %d has unknown files: %d, total files: %d",
 				g->gameId, curFilesMatched, allFilesPresent, game.hasUnknownFiles, numFilesInEntry);
 
 		// We found at least one entry with all required files present.


Commit: 9a93a3d8b613afca8ab8f13a61b6e5f5fbd34afc
    https://github.com/scummvm/scummvm/commit/9a93a3d8b613afca8ab8f13a61b6e5f5fbd34afc
Author: Scott Percival (code at moral.net.au)
Date: 2026-07-10T07:51:10+02:00

Commit Message:
DIRECTOR: LINGO: Improve accuracy of func_mci

Changed paths:
    engines/director/lingo/lingo-mci.cpp


diff --git a/engines/director/lingo/lingo-mci.cpp b/engines/director/lingo/lingo-mci.cpp
index c845f4de8c4..1fca5488909 100644
--- a/engines/director/lingo/lingo-mci.cpp
+++ b/engines/director/lingo/lingo-mci.cpp
@@ -435,12 +435,20 @@ void Lingo::func_mci(const Common::String &name) {
 	MCICommand parsedCmd;
 	parseMCICommand(name, parsedCmd);
 
+	// b_mci() is a command that doesn't return anything, but it does set the value of
+	// "the result" to any output string from the MCI driver.
+	// this will be set to the empty string for anything that doesn't return a value,
+	// a string representation of an integer for integer return types,
+	// a string for string return types, or an error message starting with "MCI Error: "
+	g_lingo->_theResult = Datum("");
+
 	switch (parsedCmd.id) {
 	case MCI_OPEN: {
 		Common::File *file = new Common::File();
 
 		if (!file->open(Common::Path(parsedCmd.device, g_director->_dirSeparator))) {
 			warning("func_mci(): Failed to open %s", parsedCmd.device.c_str());
+			g_lingo->_theResult = Datum(Common::String::format("MCI Error: Failed to open %s", parsedCmd.device.c_str()));
 			delete file;
 			return;
 		}
@@ -457,6 +465,8 @@ void Lingo::func_mci(const Common::String &name) {
 		} else {
 			warning("func_mci(): Unhandled audio type %s", parsedCmd.parameters["type"].string.c_str());
 			delete file;
+			g_lingo->_theResult = Datum(Common::String::format("MCI Error: Unhandle audio type %s", parsedCmd.parameters["type"].string.c_str()));
+			return;
 		}
 		}
 		break;
@@ -466,6 +476,7 @@ void Lingo::func_mci(const Common::String &name) {
 
 		if (!_audioAliases.contains(parsedCmd.device)) {
 			warning("func_mci(): Unknown alias %s", parsedCmd.device.c_str());
+			g_lingo->_theResult = Datum(Common::String::format("MCI Error: Unknown alias %s", parsedCmd.device.c_str()));
 			return;
 		}
 
@@ -476,8 +487,17 @@ void Lingo::func_mci(const Common::String &name) {
 		}
 		break;
 
+	case MCI_STATUS: {
+		warning("func_mci(): MCI get status: %s", parsedCmd.device.c_str());
+
+		if (!_audioAliases.contains(parsedCmd.device)) {
+			warning("func_mci(): Unknown alias %s", parsedCmd.device.c_str());
+			g_lingo->_theResult = Datum(Common::String::format("MCI Error: Unknown alias %s", parsedCmd.device.c_str()));
+			return;
+		}
+		}
 	default:
-		warning("func_mci: Unhandled MCI command: %d (%s)", parsedCmd.id, name.c_str()); /* TODO: Convert MCITokenType into string */
+		warning("func_mci: Unhandled MCI command: %d", parsedCmd.id); /* TODO: Convert MCITokenType into string */
 	}
 }
 


Commit: b2e27419dbc4299a82d42a968148af41aecfa8f5
    https://github.com/scummvm/scummvm/commit/b2e27419dbc4299a82d42a968148af41aecfa8f5
Author: Scott Percival (code at moral.net.au)
Date: 2026-07-10T07:51:10+02:00

Commit Message:
DIRECTOR: Add new variant of Popup Computer to detection table

Changed paths:
    engines/director/detection_tables.h


diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index 96e329d832f..c8e197a33be 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -5819,8 +5819,13 @@ static const DirectorGameDescription gameDescriptions[] = {
 
 	MACGAME1("popapenguin", "", "pwrmacp", "ccf864a8dc6e9d0d26eb73b4683e634b", 61012, 404),
 
-	MACGAME1_l("popup", "", "POP UP COMPUTER", "c1c73a286e7fdb439c8d49c79a2d9997", 318305, Common::JA_JPN, 400),
-	WINGAME1_l("popup", "", "POPUP/POPUP.EXE", "f47f7663a75120eca6c9e91025d51786", 65216494, Common::JA_JPN, 400),
+	// 1994 Macintosh release
+	MACGAME1_l("popup", "v1.0", "POP UP COMPUTER", "r:5170dd7b3e88a6adabace4b03fe38dc1", 310777, Common::JA_JPN, 400),
+	// 1995 Windows 3.1 release
+	WINGAME1_l("popup", "v1.0", "POPUP/POPUP.EXE", "t:a180affc42b02fc310d1bd5f8a53967c", 65216494, Common::JA_JPN, 404),
+	// 1996 hybrid Macintosh/Windows 3.1/Windows 95 release
+	MACGAME1_l("popup", "v1.1", "PopupComputer PPC", "r:9d10bbbf1b8d527e203c6be2eac3518c", 58379, Common::JA_JPN, 404),
+	WINGAME1_l("popup", "v1.1", "POPUP/POP.EXE", "t:3564441dfc497340bc917e325887c9ba", 745589, Common::JA_JPN, 404),
 	MACDEMO1_l("popup", "Demo",		 "POP UP COMPUTER DEMO", "r:8272aef35bd90e06bac5d622707d9459", 304941, Common::JA_JPN, 400),
 	MACDEMO1_l("popup", "Auto Demo", "Pop up auto demo",	 "r:bcd3c718db258701496b3c5bcb827ef2", 484067, Common::JA_JPN, 404),
 
@@ -7225,11 +7230,11 @@ static const DirectorGameDescription gameDescriptions[] = {
 	WINGAME1_l("guignols2", "", "CPPD.EXE", "1a7acbba10a7246ba58c1d53fc7203f5", 1465338, Common::FR_FRA, 501),
 	WINDEMO1_l("guignols2", "Demo", "GUIGNOLS.EXE", "2e62abdad839e42068afdcd0644d7dcf", 971988, Common::FR_FRA, 501),
 
-	MACGAME2("gundam0079", "",   "Gundam0079",	   "4c38a51a21a1ad231f218c4786ff771d", 106955,
-								 "MENU.CST",	   "d4de2296fc46f76cc249b0a1d01e7003", 3580645, 501),
-	MACGAME2_l("gundam0079", "", "GUNDAM0079",	   "4c38a51a21a1ad231f218c4786ff771d", 106955,
-								 "MENU.Cxt",	   "730d60b0f5fbc925a01b04319c50e59d", 2862062, Common::JA_JPN, 501),
-	WINGAME1t("gundam0079", "",  "Gundam0079.exe", "ad9789b126467a250480581b671a4385", 1411761, 501),
+	MACGAME2f("gundam0079", "",   "Gundam0079",	   "4c38a51a21a1ad231f218c4786ff771d", 106955,
+								 "MENU.CST",	   "d4de2296fc46f76cc249b0a1d01e7003", 3580645, 501, GF_TRUECOLOR),
+	MACGAME2f_l("gundam0079", "", "GUNDAM0079",	   "4c38a51a21a1ad231f218c4786ff771d", 106955,
+								 "MENU.Cxt",	   "730d60b0f5fbc925a01b04319c50e59d", 2862062, Common::JA_JPN, 501, GF_TRUECOLOR),
+	WINGAME1tf("gundam0079", "",  "Gundam0079.exe", "t:ad9789b126467a250480581b671a4385", 1411761, 501, GF_TRUECOLOR),
 
 	MACGAME1("gussshc", "", "Write On", 	"r:9e9309ff1b58f6b56a440893e9723bd6",  705329, 500),
 	WINGAME2("gussshc", "", "SCHOOL.EXE", 	"t:d5c04c463f3d329e56722f9f3ef95a4f",  917645,


Commit: d40e74834d0eb88bf3b1c3e1725f4c0b8647c308
    https://github.com/scummvm/scummvm/commit/d40e74834d0eb88bf3b1c3e1725f4c0b8647c308
Author: Scott Percival (code at moral.net.au)
Date: 2026-07-10T07:51:10+02:00

Commit Message:
DIRECTOR: Fix rendering RGB555 images in 16-bit display mode

Changed paths:
    engines/director/castmember/bitmap.cpp


diff --git a/engines/director/castmember/bitmap.cpp b/engines/director/castmember/bitmap.cpp
index 96bca3284e1..e919b5e8618 100644
--- a/engines/director/castmember/bitmap.cpp
+++ b/engines/director/castmember/bitmap.cpp
@@ -344,8 +344,8 @@ Graphics::MacWidget *BitmapCastMember::createWidget(Common::Rect &bbox, Channel
 
 	// _ditheredImg should contain a cached copy of the bitmap after any expensive
 	// colourspace transformations (e.g. palette remapping or dithering).
-	// We also want to make sure that
-	if (isModified() || (((srcBpp == 1) || (srcBpp > 1 && dstBpp == 1)) && !previouslyDithered)) {
+
+	if (isModified() || !previouslyDithered) {
 		if (_ditheredImg) {
 			_ditheredImg->free();
 			delete _ditheredImg;
@@ -356,14 +356,7 @@ Graphics::MacWidget *BitmapCastMember::createWidget(Common::Rect &bbox, Channel
 		if (dstBpp == 1) {
 			// ScummVM using 8-bit video
 
-			if (srcBpp > 1
-			// At least early directors were not remapping 8bpp images. But in case it is
-			// needed, here is the code
-#if 0
-			|| (srcBpp == 1 &&
-				memcmp(g_director->_wm->getPalette(), _img->_palette, _img->_paletteSize))
-#endif
-				) {
+			if (srcBpp > 1) {
 
 				_ditheredImg = _picture->_surface.convertTo(g_director->_wm->_pixelformat, nullptr, 0, g_director->_wm->getPalette(), g_director->_wm->getPaletteSize());
 
@@ -373,12 +366,13 @@ Graphics::MacWidget *BitmapCastMember::createWidget(Common::Rect &bbox, Channel
 			}
 		} else {
 			// ScummVM using RGB video
-			//if (srcBpp > 1 && srcFmt != dstFmt) {
-				// non-indexed surface, convert to 32-bit
-			//	_ditheredImg = _picture->_surface.convertTo(g_director->_wm->_pixelformat, nullptr, 0, g_director->_wm->getPalette(), g_director->_wm->getPaletteSize());
+			if (srcBpp > 1 && srcFmt != dstFmt) {
+				// non-indexed surface, convert to destination format.
+				// it's important that we check the formats instead of the Bpp;
+				// 16-bit can have 565 and 555 formatted images
+				_ditheredImg = _picture->_surface.convertTo(g_director->_wm->_pixelformat, nullptr, 0, g_director->_wm->getPalette(), g_director->_wm->getPaletteSize());
 
-			//} else
-			if (srcBpp == 1) {
+			} else if (srcBpp == 1) {
 				_ditheredImg = getDitherImg();
 			}
 		}


Commit: ab3688ccaa405e7f0376dbe8070f055308054f7d
    https://github.com/scummvm/scummvm/commit/ab3688ccaa405e7f0376dbe8070f055308054f7d
Author: Scott Percival (code at moral.net.au)
Date: 2026-07-10T07:51:10+02:00

Commit Message:
DIRECTOR: Always redither image if high-colour mode + puppet palette

Fixes dreamscape colour changes in The Dark Eye.
Confirmed to work with:
- AMBER: Journeys Beyond
- Professor Finkle's Times Table Factory
- Cracking the Conspiracy

Changed paths:
    engines/director/castmember/bitmap.cpp
    engines/director/director.h
    engines/director/graphics.cpp
    engines/director/lingo/lingo-builtins.cpp
    engines/director/score.cpp


diff --git a/engines/director/castmember/bitmap.cpp b/engines/director/castmember/bitmap.cpp
index e919b5e8618..9361b980590 100644
--- a/engines/director/castmember/bitmap.cpp
+++ b/engines/director/castmember/bitmap.cpp
@@ -471,9 +471,14 @@ Graphics::Surface *BitmapCastMember::getDitherImg() {
 		// Only redither 8-bit images in 8-bit mode if we have the remap palette flag set, or it is external
 		if (targetBpp == 1 && !movie->_remapPalettesWhenNeeded && !_external)
 			break;
-		// If we're in RGB mode, and not in puppet palette mode, then "redither" as well.
-		if (targetBpp != 1 && score->_puppetPalette && !_external)
+		if (targetBpp != 1 && score->_puppetPalette && !_external) {
+			// we're in true colour mode, rendering a paletted image, and the puppet palette has been set
+			// use the score palette
+			const byte *palPtr = currentPalette->palette;
+			int palCount = currentPalette->length;
+			dither = _picture->_surface.convertTo(g_director->_wm->_pixelformat, palPtr, palCount, dstPalette, dstPaletteCount, Graphics::kDitherNaive);
 			break;
+		}
 		if (_external || (targetBpp != 1) || (castPaletteId != currentPaletteId && !isColorCycling)) {
 			const auto pals = g_director->getLoadedPalettes();
 			CastMemberID palIndex = pals.contains(castPaletteId) ? castPaletteId : CastMemberID(kClutSystemMac, -1);
diff --git a/engines/director/director.h b/engines/director/director.h
index decb6185477..e0f2aae7e8f 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -298,6 +298,7 @@ public:
 	uint16 _wmWidth;
 	uint16 _wmHeight;
 	CastMemberID _lastPalette;
+	CastMemberID _lastPuppetPalette;
 
 	// used for quirks
 	byte _fpsLimit;
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 8a26bf2d909..21d6d1b468c 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -247,9 +247,10 @@ void DirectorEngine::syncPalette() {
 		memcpy(paletteBuf, _currentPalette, _currentPaletteLength*3);
 	}
 
-	// Pass the palette to OSystem only for 8bpp mode
-	if (_pixelformat.bytesPerPixel == 1)
+	if (_pixelformat.bytesPerPixel == 1) {
+		// Pass the palette to OSystem only for 8bpp mode
 		_system->getPaletteManager()->setPalette(paletteBuf, 0, _currentPaletteLength);
+	}
 
 	_wm->passPalette(paletteBuf, _currentPaletteLength);
 }
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index c5936651696..29d2d633e7f 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -3213,12 +3213,13 @@ void LB::b_puppetPalette(int nargs) {
 	Score *score = movie->getScore();
 	if (!palette.isNull()) {
 		g_director->setPalette(palette);
+		g_director->_lastPuppetPalette = palette;
 		score->_puppetPalette = true;
 	} else {
 		// Setting puppetPalette to 0 disables it (Lingo Dictionary, 226)
 
 		score->_puppetPalette = false;
-
+		g_director->_lastPuppetPalette = CastMemberID();
 		// FIXME: set system palette decided by platform, should be fixed after windows palette is working.
 		// try to set mac system palette if lastPalette is 0.
 		if (g_director->_lastPalette.isNull())
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index cb42be0caf0..758a60de77e 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -125,7 +125,7 @@ void Score::setPuppetTempo(int16 puppetTempo) {
 }
 
 CastMemberID Score::getCurrentPalette() {
-	return _vm->_lastPalette;
+	return _puppetPalette ? _vm->_lastPuppetPalette : _vm->_lastPalette;
 }
 
 bool Score::processImmediateFrameScript(Common::String s, int id) {




More information about the Scummvm-git-logs mailing list