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

Helco noreply at scummvm.org
Sun Jun 7 13:19:23 UTC 2026


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

Summary:
4d110c28b8 ALCACHOFA: Fix assertion when cancelling video playback
45348a0626 ALCACHOFA: Fix instant fades not staying faded
b1b61e85e0 ALCACHOFA: V2:


Commit: 4d110c28b817b4c806745e855abdc189a9597aa7
    https://github.com/scummvm/scummvm/commit/4d110c28b817b4c806745e855abdc189a9597aa7
Author: Helco (hermann.noll at hotmail.com)
Date: 2026-06-07T15:16:59+02:00

Commit Message:
ALCACHOFA: Fix assertion when cancelling video playback

Changed paths:
    engines/alcachofa/alcachofa.cpp
    engines/alcachofa/alcachofa.h
    engines/alcachofa/player.cpp


diff --git a/engines/alcachofa/alcachofa.cpp b/engines/alcachofa/alcachofa.cpp
index 0fb648f95c7..081435ab463 100644
--- a/engines/alcachofa/alcachofa.cpp
+++ b/engines/alcachofa/alcachofa.cpp
@@ -226,6 +226,9 @@ void AlcachofaEngine::playVideo(int32 videoId) {
 		g_system->delayMillis(decoder->getTimeToNextFrame());
 	}
 	decoder->stop();
+
+	_input.nextFrame(); // otherwise the menu might open after just cancelling a video
+	_renderer->begin(); // we were within a frame, this resets the state
 }
 
 void AlcachofaEngine::fadeExit() {
@@ -317,7 +320,7 @@ void AlcachofaEngine::pauseEngineIntern(bool pause) {
 bool AlcachofaEngine::canLoadGameStateCurrently(U32String *msg) {
 	if (_menu == nullptr)
 		return false; // the autosave wants to trigger even during error() while starting the game
-	if (!_eventLoopSemaphore.isReleased())
+	if (!isInSpecialGameLoop())
 		return false;
 	return
 		(menu().isOpen() && menu().interactionSemaphore().isReleased()) ||
diff --git a/engines/alcachofa/alcachofa.h b/engines/alcachofa/alcachofa.h
index 96008e8fc69..53d5c6f723b 100644
--- a/engines/alcachofa/alcachofa.h
+++ b/engines/alcachofa/alcachofa.h
@@ -162,6 +162,7 @@ public:
 			(f == kSupportsReturnToLauncher);
 	};
 
+	bool isInSpecialGameLoop() const { return !_eventLoopSemaphore.isReleased(); }
 	bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
 	bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override {
 		return canLoadGameStateCurrently(msg);
diff --git a/engines/alcachofa/player.cpp b/engines/alcachofa/player.cpp
index a1dd96fe410..441e8933b28 100644
--- a/engines/alcachofa/player.cpp
+++ b/engines/alcachofa/player.cpp
@@ -354,9 +354,11 @@ void Player::setActiveCharacter(MainCharacterKind kind) {
 }
 
 bool Player::isAllowedToOpenMenu() {
-	return !g_engine->menu().isOpen() &&
-		   g_engine->game().isAllowedToOpenMenu() &&
-		   !_isInTemporaryRoom; // we cannot reliably store this state across multiple room changes
+	return
+		!g_engine->menu().isOpen() &&
+		!g_engine->isInSpecialGameLoop() &&
+		!_isInTemporaryRoom && // we cannot reliably store this state across multiple room changes
+		g_engine->game().isAllowedToOpenMenu();
 }
 
 Room *Player::lastGameRoom() const {


Commit: 45348a0626eb2769df8856b0de8cc0d4657f65ec
    https://github.com/scummvm/scummvm/commit/45348a0626eb2769df8856b0de8cc0d4657f65ec
Author: Helco (hermann.noll at hotmail.com)
Date: 2026-06-07T15:16:59+02:00

Commit Message:
ALCACHOFA: Fix instant fades not staying faded

Changed paths:
    engines/alcachofa/graphics.cpp


diff --git a/engines/alcachofa/graphics.cpp b/engines/alcachofa/graphics.cpp
index 913de0b1d40..b1e1cd48ad4 100644
--- a/engines/alcachofa/graphics.cpp
+++ b/engines/alcachofa/graphics.cpp
@@ -1196,10 +1196,12 @@ Task *fade(Process &process, FadeType fadeType,
 	int32 duration, EasingType easingType,
 	int8 order,
 	PermanentFadeAction permanentFadeAction) {
-	if (duration <= 0)
-		return new DelayTask(process, 0);
 	if (!process.isActiveForPlayer())
 		return new DelayTask(process, (uint32)duration);
+	if (duration <= 0) {
+		g_engine->globalUI().isPermanentFaded() = permanentFadeAction == PermanentFadeAction::SetFaded;
+		return new DelayTask(process, 0);
+	}
 	return new FadeTask(process, fadeType, from, to, duration, easingType, order, permanentFadeAction);
 }
 


Commit: b1b61e85e0d634a6103a09a50c9e951dfed263a0
    https://github.com/scummvm/scummvm/commit/b1b61e85e0d634a6103a09a50c9e951dfed263a0
Author: Helco (hermann.noll at hotmail.com)
Date: 2026-06-07T15:17:00+02:00

Commit Message:
ALCACHOFA: V2:

Changed paths:
    engines/alcachofa/game-v2.cpp
    engines/alcachofa/game.cpp
    engines/alcachofa/game.h
    engines/alcachofa/sounds.cpp


diff --git a/engines/alcachofa/game-v2.cpp b/engines/alcachofa/game-v2.cpp
index 0eb55d68fcf..0ad459dd50c 100644
--- a/engines/alcachofa/game-v2.cpp
+++ b/engines/alcachofa/game-v2.cpp
@@ -232,6 +232,12 @@ public:
 			return Game::unknownCamLerpTarget(action, name);
 		return nullptr;
 	}
+
+	bool shouldMusicLoop() override {
+		// The credits cutscene is slightly longer than the
+		// so we just disable looping and keep the last couple seconds quiet
+		return !g_engine->player().currentRoom()->name().equalsIgnoreCase("CREDITOS");
+	}
 };
 
 static constexpr const char *kMapFilesSecta[] = {
@@ -280,7 +286,7 @@ public:
 	String getMusicPath(int32 trackId) override {
 		const Room *room = g_engine->player().lastGameRoom();
 		const char *dirName = room != nullptr && room->mapIndex() == 1 ? "Music_Cleopatra" : "Music";
-		return String::format("%s/Track%02d", dirName, trackId);
+		return String::format("%s/Track%02d", dirName, trackId); // 1-based indexing
 	}
 
 private:
@@ -298,7 +304,7 @@ public:
 	}
 
 	String getMusicPath(int32 trackId) override {
-		return String::format("track%d", trackId);
+		return String::format("track%d", trackId - 1); // 0-based indexing
 	}
 
 	bool isKnownBadVideo(int32 videoId) override {
@@ -321,7 +327,7 @@ public:
 	}
 
 	String getMusicPath(int32 trackId) override {
-		return String::format("track%d", trackId);
+		return String::format("track%d", trackId - 1); // 0-based indexing
 	}
 
 	bool isKnownBadVideo(int32 videoId) override {
diff --git a/engines/alcachofa/game.cpp b/engines/alcachofa/game.cpp
index db0a7d79965..042b8b868b2 100644
--- a/engines/alcachofa/game.cpp
+++ b/engines/alcachofa/game.cpp
@@ -84,6 +84,10 @@ void Game::tooManyDrawRequests(int order) {
 	_message("Too many draw requests in order %d", order);
 }
 
+bool Game::shouldMusicLoop() {
+	return true;
+}
+
 bool Game::shouldCharacterTrigger(const Character *character, const char *action) {
 	return true;
 }
diff --git a/engines/alcachofa/game.h b/engines/alcachofa/game.h
index 41489eb72a3..fee703beb25 100644
--- a/engines/alcachofa/game.h
+++ b/engines/alcachofa/game.h
@@ -72,6 +72,7 @@ public:
 	virtual Common::String getSoundPath(const char *filename) = 0; ///< Without file-extension
 	virtual Common::String getMusicPath(int32 trackId) = 0; ///< Without file-extension
 	virtual int32 getCharacterJingle(MainCharacterKind kind) = 0;
+	virtual bool shouldMusicLoop();
 	virtual bool shouldFilterTexturesByDefault() = 0;
 	virtual bool shouldClipCamera() = 0;
 	virtual bool isAllowedToInteract() = 0;
diff --git a/engines/alcachofa/sounds.cpp b/engines/alcachofa/sounds.cpp
index d6789ab1289..7275759bc3d 100644
--- a/engines/alcachofa/sounds.cpp
+++ b/engines/alcachofa/sounds.cpp
@@ -368,7 +368,7 @@ void Sounds::startMusic(int musicId) {
 	auto path = g_engine->game().getMusicPath(musicId);
 	_musicSoundID = playSoundInternal(path, Mixer::kMaxChannelVolume, Mixer::kMusicSoundType);
 	_isMusicPlaying = true;
-	_nextMusicID = musicId;
+	_nextMusicID = g_engine->game().shouldMusicLoop() ? musicId : -1;
 }
 
 void Sounds::queueMusic(int musicId) {




More information about the Scummvm-git-logs mailing list