[Scummvm-git-logs] scummvm master -> ba990c2653a77203c7767b360201c9f2438bec2a
ysj1173886760
42030331+ysj1173886760 at users.noreply.github.com
Mon Aug 2 11:35:23 UTC 2021
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:
ba990c2653 DIRECTOR: processEvent while playing transition
Commit: ba990c2653a77203c7767b360201c9f2438bec2a
https://github.com/scummvm/scummvm/commit/ba990c2653a77203c7767b360201c9f2438bec2a
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-02T19:34:47+08:00
Commit Message:
DIRECTOR: processEvent while playing transition
Changed paths:
engines/director/events.cpp
engines/director/transitions.cpp
engines/director/window.h
diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index 7b70c06522..9e6d7da679 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -54,6 +54,20 @@ bool processQuitEvent(bool click) {
return false;
}
+bool Window::processTransitionEvent(bool click) {
+ Common::Event event;
+
+ while (g_system->getEventManager()->pollEvent(event)) {
+ if (event.type == Common::EVENT_QUIT)
+ return true;
+ if (!processEvent(event)) {
+ if (click && event.type == Common::EVENT_LBUTTONDOWN)
+ return true;
+ }
+ }
+ return false;
+}
+
uint32 DirectorEngine::getMacTicks() { return g_system->getMillis() * 60 / 1000.; }
void DirectorEngine::processEvents() {
diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index 26ed005723..69ed0b421d 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -515,7 +515,7 @@ void Window::playTransition(uint16 transDuration, uint8 transArea, uint8 transCh
_composeSurface->blitFrom(*blitFrom, rfrom, Common::Point(rto.left, rto.top));
g_system->delayMillis(t.stepDuration);
- if (processQuitEvent(true)) {
+ if (processTransitionEvent(true)) {
exitTransition(&nextFrame, clipRect);
break;
}
@@ -714,7 +714,7 @@ void Window::dissolveTrans(TransParams &t, Common::Rect &clipRect, Graphics::Man
g_lingo->executePerFrameHook(t.frame, i + 1);
- if (processQuitEvent(true)) {
+ if (processTransitionEvent(true)) {
exitTransition(nextFrame, clipRect);
break;
}
@@ -817,7 +817,7 @@ void Window::dissolvePatternsTrans(TransParams &t, Common::Rect &clipRect, Graph
g_lingo->executePerFrameHook(t.frame, i + 1);
- if (processQuitEvent(true)) {
+ if (processTransitionEvent(true)) {
exitTransition(nextFrame, clipRect);
break;
}
@@ -992,7 +992,7 @@ void Window::transMultiPass(TransParams &t, Common::Rect &clipRect, Graphics::Ma
g_system->delayMillis(t.stepDuration);
- if (processQuitEvent(true)) {
+ if (processTransitionEvent(true)) {
exitTransition(nextFrame, clipRect);
break;
}
@@ -1039,7 +1039,7 @@ void Window::transZoom(TransParams &t, Common::Rect &clipRect, Graphics::Managed
g_system->delayMillis(t.stepDuration);
- if (processQuitEvent(true)) {
+ if (processTransitionEvent(true)) {
exitTransition(nextFrame, clipRect);
break;
}
diff --git a/engines/director/window.h b/engines/director/window.h
index 1a07f85ffa..42488c039f 100644
--- a/engines/director/window.h
+++ b/engines/director/window.h
@@ -134,6 +134,7 @@ public:
// events.cpp
virtual bool processEvent(Common::Event &event) override;
+ bool processTransitionEvent(bool click);
// tests.cpp
Common::HashMap<Common::String, Movie *> *scanMovies(const Common::String &folder);
More information about the Scummvm-git-logs
mailing list