[Scummvm-git-logs] scummvm master -> 62f2ffbbe57145dfe63a2e3a72419d3ed58d6923

elasota noreply at scummvm.org
Mon May 8 12:09:10 UTC 2023


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

Summary:
5824ba0e78 VCRUISE: Fix subtitles not respecting subtitles setting.
62f2ffbbe5 VCRUISE: Resume game on pressing the pause action while in the pause menu.


Commit: 5824ba0e7820d45b924cda72286685c0fb259b73
    https://github.com/scummvm/scummvm/commit/5824ba0e7820d45b924cda72286685c0fb259b73
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-08T08:08:31-04:00

Commit Message:
VCRUISE: Fix subtitles not respecting subtitles setting.

Changed paths:
    engines/vcruise/runtime.cpp


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index e187bb5ef92..f226180758b 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1794,7 +1794,7 @@ void Runtime::continuePlayingAnimation(bool loop, bool useStopFrame, bool &outAn
 			const FrameToSubtitleMap_t &frameMap = animSubtitlesIt->_value;
 
 			FrameToSubtitleMap_t::const_iterator frameIt = frameMap.find(_animDisplayingFrame);
-			if (frameIt != frameMap.end()) {
+			if (frameIt != frameMap.end() && ConfMan.getBool("subtitles")) {
 				if (!millis)
 					millis = g_system->getMillis();
 
@@ -3247,6 +3247,9 @@ void Runtime::triggerSoundRamp(SoundInstance &snd, uint durationMSec, int32 newV
 }
 
 void Runtime::triggerWaveSubtitles(const SoundInstance &snd, const Common::String &id) {
+	if (!ConfMan.getBool("subtitles"))
+		return;
+
 	char appendedCode[4] = {'_', '0', '0', '\0'};
 
 	char digit1 = '0';


Commit: 62f2ffbbe57145dfe63a2e3a72419d3ed58d6923
    https://github.com/scummvm/scummvm/commit/62f2ffbbe57145dfe63a2e3a72419d3ed58d6923
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-08T08:08:32-04:00

Commit Message:
VCRUISE: Resume game on pressing the pause action while in the pause menu.

Changed paths:
    engines/vcruise/menu.cpp


diff --git a/engines/vcruise/menu.cpp b/engines/vcruise/menu.cpp
index a029e692df8..2808fc1e5ba 100644
--- a/engines/vcruise/menu.cpp
+++ b/engines/vcruise/menu.cpp
@@ -42,6 +42,7 @@ protected:
 	virtual void onButtonClicked(uint button, bool &outChangedState);
 	virtual void onCheckboxClicked(uint button, bool &outChangedState);
 	virtual void onSliderMoved(uint slider);
+	virtual void onKeymappedEvent(VCruise::KeymappedEvent evt, bool &outChangedState);
 	virtual void eraseSlider(uint sliderIndex) const;
 
 protected:
@@ -206,6 +207,8 @@ public:
 	explicit ReahPauseMenuPage(bool isSchizm);
 
 	void addPageContents() override;
+
+	void onKeymappedEvent(VCruise::KeymappedEvent evt, bool &outChangedState) override;
 };
 
 class ReahSchizmMainMenuPage : public ReahSchizmMenuPage {
@@ -252,6 +255,11 @@ bool ReahSchizmMenuPage::run() {
 		case kOSEventTypeMouseMove:
 			handleMouseMove(evt.pos);
 			break;
+		case kOSEventTypeKeymappedEvent:
+			onKeymappedEvent(evt.keymappedEvent, changedState);
+			if (changedState)
+				return changedState;
+			break;
 		default:
 			break;
 		}
@@ -284,6 +292,9 @@ void ReahSchizmMenuPage::onCheckboxClicked(uint button, bool &outChangedState) {
 void ReahSchizmMenuPage::onSliderMoved(uint slider) {
 }
 
+void ReahSchizmMenuPage::onKeymappedEvent(VCruise::KeymappedEvent evt, bool &outChangedState) {
+}
+
 void ReahSchizmMenuPage::eraseSlider(uint sliderIndex) const {
 }
 
@@ -899,6 +910,14 @@ void ReahPauseMenuPage::addPageContents() {
 	_menuInterface->commitRect(Common::Rect(0, 44, 640, 392));
 }
 
+void ReahPauseMenuPage::onKeymappedEvent(VCruise::KeymappedEvent evt, bool &outChangedState) {
+	if (evt == VCruise::kKeymappedEventPause) {
+		if (_menuInterface->canSave())
+			outChangedState = _menuInterface->reloadFromCheckpoint();
+		return;
+	}
+}
+
 ReahSchizmMainMenuPage::ReahSchizmMainMenuPage(bool isSchizm) : ReahSchizmMenuPage(isSchizm) {
 }
 




More information about the Scummvm-git-logs mailing list