[Scummvm-git-logs] scummvm master -> 45a7c33b9a345c912e335f19186ff079aabc5024

sluicebox 22204938+sluicebox at users.noreply.github.com
Tue Jun 9 08:43:43 UTC 2020


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:
45a7c33b9a SCI32: Sync SQ6 speech and subtitle button states


Commit: 45a7c33b9a345c912e335f19186ff079aabc5024
    https://github.com/scummvm/scummvm/commit/45a7c33b9a345c912e335f19186ff079aabc5024
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-06-09T01:40:47-07:00

Commit Message:
SCI32: Sync SQ6 speech and subtitle button states

Changed paths:
    engines/sci/engine/guest_additions.cpp


diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp
index 0e26ee0c3c..34d22b7d97 100644
--- a/engines/sci/engine/guest_additions.cpp
+++ b/engines/sci/engine/guest_additions.cpp
@@ -906,6 +906,21 @@ void GuestAdditions::syncMessageTypeFromScummVMUsingDefaultStrategy() const {
 			_state->variables[VAR_GLOBAL][globalNumber] &= (int16)~0x8000;
 		}
 	}
+
+	if (g_sci->getGameId() == GID_SQ6) {
+		// The SQ6 control panel buttons for speech and text only update
+		//  their states when clicked so they need synchronization.
+		const reg_t iconSpeech = _segMan->findObjectByName("iconSpeech");
+		if (!iconSpeech.isNull()) {
+			const reg_t iconCel = make_reg(0, (value & kMessageTypeSpeech) ? 2 : 0);
+			writeSelector(_segMan, iconSpeech, SELECTOR(mainCel), iconCel);
+		}
+		const reg_t iconText = _segMan->findObjectByName("iconText");
+		if (!iconText.isNull()) {
+			const reg_t iconCel = make_reg(0, (value & kMessageTypeSubtitles) ? 2 : 0);
+			writeSelector(_segMan, iconText, SELECTOR(mainCel), iconCel);
+		}
+	}
 #endif
 }
 




More information about the Scummvm-git-logs mailing list