[Scummvm-git-logs] scummvm master -> b19b88b90add0ac63ebd446c89efbbeb7d7755f3
elasota
noreply at scummvm.org
Fri Jun 24 02:44:03 UTC 2022
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
bfd56cedaa MTROPOLIS: Ignore media streaming events that we don't use.
5eb369c83f MTROPOLIS: Properly restart movies on play commands.
b19b88b90a MTROPOLIS: Implement movie stop command
Commit: bfd56cedaa8e47fdd9c5ed8d6035e03071c7c7f0
https://github.com/scummvm/scummvm/commit/bfd56cedaa8e47fdd9c5ed8d6035e03071c7c7f0
Author: elasota (ejlasota at gmail.com)
Date: 2022-06-23T22:26:37-04:00
Commit Message:
MTROPOLIS: Ignore media streaming events that we don't use.
Changed paths:
engines/mtropolis/runtime.cpp
diff --git a/engines/mtropolis/runtime.cpp b/engines/mtropolis/runtime.cpp
index c4bc55bb58a..82aa4a5f7ae 100644
--- a/engines/mtropolis/runtime.cpp
+++ b/engines/mtropolis/runtime.cpp
@@ -2930,6 +2930,11 @@ VThreadState Structural::consumeCommand(Runtime *runtime, const Common::SharedPt
return kVThreadReturn;
}
+ if (Event::create(EventIDs::kPreloadMedia, 0).respondsTo(msg->getEvent()) || Event::create(EventIDs::kFlushMedia, 0).respondsTo(msg->getEvent()) || Event::create(EventIDs::kPrerollMedia, 0).respondsTo(msg->getEvent())) {
+ // Just ignore these
+ return kVThreadReturn;
+ }
+
warning("Command type %i was ignored", msg->getEvent().eventType);
return kVThreadReturn;
}
Commit: 5eb369c83fa793162d330058da26746956103678
https://github.com/scummvm/scummvm/commit/5eb369c83fa793162d330058da26746956103678
Author: elasota (ejlasota at gmail.com)
Date: 2022-06-23T22:27:18-04:00
Commit Message:
MTROPOLIS: Properly restart movies on play commands.
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 77db9383233..0c9163b6125 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -983,6 +983,7 @@ VThreadState MovieElement::startPlayingTask(const StartPlayingTaskData &taskData
_currentPlayState = kMediaStateStopped;
_needsReset = true;
_contentsDirty = true;
+ _currentTimestamp = _reversed ? _playRange.max : _playRange.min;
_shouldPlayIfNotPaused = true;
_paused = false;
Commit: b19b88b90add0ac63ebd446c89efbbeb7d7755f3
https://github.com/scummvm/scummvm/commit/b19b88b90add0ac63ebd446c89efbbeb7d7755f3
Author: elasota (ejlasota at gmail.com)
Date: 2022-06-23T22:34:48-04:00
Commit Message:
MTROPOLIS: Implement movie stop command
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 0c9163b6125..8a3444e93ed 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -630,6 +630,26 @@ VThreadState MovieElement::consumeCommand(Runtime *runtime, const Common::Shared
return kVThreadReturn;
}
+ if (Event::create(EventIDs::kStop, 0).respondsTo(msg->getEvent())) {
+ if (!_paused) {
+ _paused = true;
+ Common::SharedPtr<MessageProperties> msgProps(new MessageProperties(Event::create(EventIDs::kPause, 0), DynamicValue(), getSelfReference()));
+ Common::SharedPtr<MessageDispatch> dispatch(new MessageDispatch(msgProps, this, false, true, false));
+ runtime->sendMessageOnVThread(dispatch);
+ }
+
+ {
+ Common::SharedPtr<MessageProperties> msgProps(new MessageProperties(Event::create(EventIDs::kStop, 0), DynamicValue(), getSelfReference()));
+ Common::SharedPtr<MessageDispatch> dispatch(new MessageDispatch(msgProps, this, false, true, false));
+ runtime->sendMessageOnVThread(dispatch);
+ }
+
+ ChangeFlagTaskData *becomeVisibleTaskData = runtime->getVThread().pushTask("MovieElement::changeVisibilityTask", static_cast<VisualElement *>(this), &MovieElement::changeVisibilityTask);
+ becomeVisibleTaskData->desiredFlag = false;
+ becomeVisibleTaskData->runtime = runtime;
+
+ return kVThreadReturn;
+ }
return Structural::consumeCommand(runtime, msg);
}
@@ -1199,6 +1219,10 @@ VThreadState MToonElement::consumeCommand(Runtime *runtime, const Common::Shared
}
if (Event::create(EventIDs::kStop, 0).respondsTo(msg->getEvent())) {
// Works differently from movies: Needs to hide the element and pause
+#ifdef MTROPOLIS_DEBUG_ENABLE
+ if (Debugger *debugger = runtime->debugGetDebugger())
+ debugger->notify(kDebugSeverityError, "mToon element was commanded to stop, but that's not implemented yet");
+#endif
warning("mToon element stops are not implemented");
return kVThreadReturn;
}
More information about the Scummvm-git-logs
mailing list