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

AndywinXp noreply at scummvm.org
Sat Sep 23 13:43:44 UTC 2023


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:
a284eef876 SWORD1: Allow speech to be interrupted by both mouse buttons


Commit: a284eef8766f84aaabf3c72c5dd9e5ab6e38799f
    https://github.com/scummvm/scummvm/commit/a284eef8766f84aaabf3c72c5dd9e5ab6e38799f
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-09-23T15:43:37+02:00

Commit Message:
SWORD1: Allow speech to be interrupted by both mouse buttons

Changed paths:
    engines/sword1/logic.cpp


diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index d005adb2669..3741949d01b 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -343,8 +343,10 @@ int Logic::logicArAnimate(Object *compact, uint32 id) {
 }
 
 int Logic::speechDriver(Object *compact) {
-	if ((!_speechClickDelay) && (_mouse->testEvent() & BS1L_BUTTON_DOWN))
+	if ((!_speechClickDelay) &&
+		((_mouse->testEvent() & BS1L_BUTTON_DOWN) || (_mouse->testEvent() & BS1R_BUTTON_DOWN)))
 		_speechFinished = true;
+
 	if (_speechClickDelay)
 		_speechClickDelay--;
 
@@ -357,6 +359,7 @@ int Logic::speechDriver(Object *compact) {
 		else
 			compact->o_speech_time--;
 	}
+
 	if (_speechFinished) {
 		if (_speechRunning)
 			_sound->stopSpeech();
@@ -368,6 +371,7 @@ int Logic::speechDriver(Object *compact) {
 		_speechRunning = _textRunning = false;
 		_speechFinished = true;
 	}
+
 	if (compact->o_anim_resource) {
 		uint8 *animData = ((uint8 *)_resMan->openFetchRes(compact->o_anim_resource)) + sizeof(Header);
 		int32 numFrames = _resMan->readUint32(animData);
@@ -386,6 +390,7 @@ int Logic::speechDriver(Object *compact) {
 		compact->o_frame = _resMan->getUint32(animPtr->animFrame);
 		_resMan->resClose(compact->o_anim_resource);
 	}
+
 	return 0;
 }
 




More information about the Scummvm-git-logs mailing list