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

mgerhardy noreply at scummvm.org
Wed Jun 15 15:50:07 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:
f921f762c7 TWINE: credits are no longer playing on inactivity at the in-game options, too


Commit: f921f762c7f994032584b504287e0f79d9d9384d
    https://github.com/scummvm/scummvm/commit/f921f762c7f994032584b504287e0f79d9d9384d
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2022-06-15T17:50:00+02:00

Commit Message:
TWINE: credits are no longer playing on inactivity at the in-game options, too

see https://bugs.scummvm.org/ticket/13581

Changed paths:
    engines/twine/menu/menu.cpp
    engines/twine/menu/menu.h
    engines/twine/scene/gamestate.cpp


diff --git a/engines/twine/menu/menu.cpp b/engines/twine/menu/menu.cpp
index 08a431aff31..a82c39f6486 100644
--- a/engines/twine/menu/menu.cpp
+++ b/engines/twine/menu/menu.cpp
@@ -422,7 +422,7 @@ int16 Menu::drawButtons(MenuSettings *menuSettings, bool hover) {
 	return mouseActiveButton;
 }
 
-int32 Menu::processMenu(MenuSettings *menuSettings, bool showCredits) {
+int32 Menu::processMenu(MenuSettings *menuSettings) {
 	int16 currentButton = menuSettings->getActiveButton();
 	bool buttonsNeedRedraw = true;
 	const int32 numEntry = menuSettings->getButtonCount();
@@ -613,7 +613,7 @@ int32 Menu::processMenu(MenuSettings *menuSettings, bool showCredits) {
 			}
 			startMillis = loopMillis;
 		}
-		if (showCredits && loopMillis - startMillis > 11650) {
+		if (!_engine->_scene->isGameRunning() && loopMillis - startMillis > 11650) {
 			// TODO: lba2 only show the credits only in the main menu and you could force it by pressing shift+c
 			// TODO: lba2 has a cd audio track (2) for the credits
 			_engine->_menuOptions->showCredits();
diff --git a/engines/twine/menu/menu.h b/engines/twine/menu/menu.h
index da31ec3e02f..8e20945963d 100644
--- a/engines/twine/menu/menu.h
+++ b/engines/twine/menu/menu.h
@@ -223,7 +223,7 @@ public:
 	 * @param menuSettings menu settings array with the information to build the menu options
 	 * @return pressed menu button identification
 	 */
-	int32 processMenu(MenuSettings *menuSettings, bool showCredits = true);
+	int32 processMenu(MenuSettings *menuSettings);
 
 	bool init();
 
diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp
index 3cadf73e87c..3d667f191dd 100644
--- a/engines/twine/scene/gamestate.cpp
+++ b/engines/twine/scene/gamestate.cpp
@@ -459,7 +459,7 @@ void GameState::processGameChoices(TextId choiceIdx) {
 
 	_engine->_text->drawAskQuestion(choiceIdx);
 
-	_engine->_menu->processMenu(&_gameChoicesSettings, false);
+	_engine->_menu->processMenu(&_gameChoicesSettings);
 	const int16 activeButton = _gameChoicesSettings.getActiveButton();
 	_choiceAnswer = _gameChoices[activeButton];
 




More information about the Scummvm-git-logs mailing list