[Scummvm-git-logs] scummvm master -> c3ba0ce32e82fa775ec228f1c742db5723b2547c
sev-
sev at scummvm.org
Tue Mar 31 17:13:55 UTC 2020
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
72bea549b6 DIRECTOR: Implement kTransAlgoWipe algo transitions
00d1569031 DIRECTOR: Implement kTransAlgoEdgesIn algo transitions
78dd8aa778 DIRECTOR: Implement kTransAlgoPush transitions
c3ba0ce32e DIRECTOR: Tidy up transitions code
Commit: 72bea549b6b4c143ba84b7fe0d851acf4bb47b32
https://github.com/scummvm/scummvm/commit/72bea549b6b4c143ba84b7fe0d851acf4bb47b32
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-03-31T19:13:37+02:00
Commit Message:
DIRECTOR: Implement kTransAlgoWipe algo transitions
Changed paths:
engines/director/transitions.cpp
diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index d4cd467393..aa42b6876a 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -187,6 +187,7 @@ void Frame::playTransition(Score *score) {
case kTransAlgoCenterOut:
case kTransAlgoCover:
+ case kTransAlgoWipe:
blitFrom = score->_surface;
break;
@@ -212,6 +213,28 @@ void Frame::playTransition(Score *score) {
}
switch (t.type) {
+ case kTransWipeRight: // 1
+ rto.setWidth(t.xStepSize * i);
+ rfrom = rto;
+ break;
+
+ case kTransWipeLeft: // 2
+ rto.setWidth(t.xStepSize * i);
+ rto.moveTo(clipRect.width() - t.xStepSize * i, 0);
+ rfrom = rto;
+ break;
+
+ case kTransWipeDown: // 3
+ rto.setHeight(t.yStepSize * i);
+ rfrom = rto;
+ break;
+
+ case kTransWipeUp: // 4
+ rto.setHeight(t.yStepSize * i);
+ rto.moveTo(0, clipRect.height() - t.yStepSize * i);
+ rfrom = rto;
+ break;
+
case kTransCenterOutHorizontal: // 5
t.xpos += t.xStepSize;
rto.setWidth(t.xpos * 2);
Commit: 00d15690310648a669e01dbd86b40bbe7c7e013e
https://github.com/scummvm/scummvm/commit/00d15690310648a669e01dbd86b40bbe7c7e013e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-03-31T19:13:37+02:00
Commit Message:
DIRECTOR: Implement kTransAlgoEdgesIn algo transitions
Changed paths:
engines/director/transitions.cpp
diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index aa42b6876a..13aa986b7a 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -191,6 +191,7 @@ void Frame::playTransition(Score *score) {
blitFrom = score->_surface;
break;
+ case kTransAlgoEdgesIn:
case kTransAlgoReveal:
blitFrom = score->_backSurface2;
fullredraw = true;
@@ -208,7 +209,8 @@ void Frame::playTransition(Score *score) {
bool stop = false;
rto = clipRect;
- if (transProps[t.type].algo == kTransAlgoReveal) {
+ if (transProps[t.type].algo == kTransAlgoReveal ||
+ transProps[t.type].algo == kTransAlgoEdgesIn) {
score->_backSurface->copyFrom(*score->_surface);
}
@@ -242,6 +244,12 @@ void Frame::playTransition(Score *score) {
rfrom = rto;
break;
+ case kTransEdgesInHorizontal: // 6
+ rto.setWidth(clipRect.width() - t.xStepSize * i * 2);
+ rto.moveTo(t.xStepSize * i, 0);
+ rfrom = rto;
+ break;
+
case kTransCenterOutVertical: // 7
t.ypos += t.yStepSize;
rto.setHeight(t.ypos * 2);
@@ -249,6 +257,12 @@ void Frame::playTransition(Score *score) {
rfrom = rto;
break;
+ case kTransEdgesInVertical: // 8
+ rto.setHeight(clipRect.height() - t.yStepSize * i * 2);
+ rto.moveTo(0, t.yStepSize * i);
+ rfrom = rto;
+ break;
+
case kTransCenterOutSquare: // 9
t.ypos += t.yStepSize;
rto.setHeight(t.ypos * 2);
@@ -258,6 +272,13 @@ void Frame::playTransition(Score *score) {
rfrom = rto;
break;
+ case kTransEdgesInSquare: // 10
+ rto.setHeight(clipRect.height() - t.yStepSize * i * 2);
+ rto.setWidth(clipRect.width() - t.xStepSize * i * 2);
+ rto.moveTo(t.xStepSize * i, t.yStepSize * i);
+ rfrom = rto;
+ break;
+
case kTransRevealUp: // 15
rto.moveTo(0, -t.yStepSize * i);
break;
Commit: 78dd8aa778de54f49abbf749e0b170d22ffb9ac1
https://github.com/scummvm/scummvm/commit/78dd8aa778de54f49abbf749e0b170d22ffb9ac1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-03-31T19:13:37+02:00
Commit Message:
DIRECTOR: Implement kTransAlgoPush transitions
Changed paths:
engines/director/transitions.cpp
diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index 13aa986b7a..c285a0f821 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -193,6 +193,7 @@ void Frame::playTransition(Score *score) {
case kTransAlgoEdgesIn:
case kTransAlgoReveal:
+ case kTransAlgoPush:
blitFrom = score->_backSurface2;
fullredraw = true;
break;
@@ -208,6 +209,7 @@ void Frame::playTransition(Score *score) {
for (uint16 i = 1; i < t.steps; i++) {
bool stop = false;
rto = clipRect;
+ rfrom = clipRect;
if (transProps[t.type].algo == kTransAlgoReveal ||
transProps[t.type].algo == kTransAlgoEdgesIn) {
@@ -279,6 +281,46 @@ void Frame::playTransition(Score *score) {
rfrom = rto;
break;
+ case kTransPushLeft: // 11
+ rto.moveTo(clipRect.width() - t.xStepSize * i, 0);
+ score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
+
+ rfrom.moveTo(t.xStepSize * i, 0);
+ rfrom.setWidth(clipRect.width() - t.xStepSize * i);
+ rto.moveTo(0, 0);
+ break;
+
+ case kTransPushRight: // 12
+ rfrom.moveTo(clipRect.width() - t.xStepSize * i, 0);
+ rfrom.setWidth(t.xStepSize * i);
+ score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
+
+ rto.setWidth(clipRect.width() - t.xStepSize * i);
+ rto.moveTo(t.xStepSize * i, 0);
+ rfrom.moveTo(0, 0);
+ rfrom.setWidth(clipRect.width() - t.xStepSize * i);
+ break;
+
+ case kTransPushDown: // 13
+ rfrom.moveTo(0, clipRect.height() - t.yStepSize * i);
+ rfrom.setHeight(t.yStepSize * i);
+ score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
+
+ rto.setHeight(clipRect.height() - t.yStepSize * i);
+ rto.moveTo(0, t.yStepSize * i);
+ rfrom.moveTo(0, 0);
+ rfrom.setHeight(clipRect.height() - t.yStepSize * i);
+ break;
+
+ case kTransPushUp: // 14
+ rto.moveTo(0, clipRect.height() - t.yStepSize * i);
+ score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
+
+ rfrom.moveTo(0, t.yStepSize * i);
+ rfrom.setHeight(clipRect.height() - t.yStepSize * i);
+ rto.moveTo(0, 0);
+ break;
+
case kTransRevealUp: // 15
rto.moveTo(0, -t.yStepSize * i);
break;
@@ -375,16 +417,18 @@ void Frame::playTransition(Score *score) {
score->_backSurface->blitFrom(*blitFrom, rfrom, Common::Point(rto.left, rto.top));
- rto.clip(clipRect);
-
g_system->delayMillis(t.stepDuration);
if (processQuitEvent(true))
break;
if (fullredraw) {
g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, 0, 0, clipRect.width(), clipRect.height());
- } else if (rto.height() > 0 && rto.width() > 0) {
- g_system->copyRectToScreen(score->_backSurface->getBasePtr(rto.left, rto.top), score->_backSurface->pitch, rto.left, rto.top, rto.width(), rto.height()); // transition
+ } else {
+ rto.clip(clipRect);
+
+ if (rto.height() > 0 && rto.width() > 0) {
+ g_system->copyRectToScreen(score->_backSurface->getBasePtr(rto.left, rto.top), score->_backSurface->pitch, rto.left, rto.top, rto.width(), rto.height());
+ }
}
g_system->updateScreen();
Commit: c3ba0ce32e82fa775ec228f1c742db5723b2547c
https://github.com/scummvm/scummvm/commit/c3ba0ce32e82fa775ec228f1c742db5723b2547c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-03-31T19:13:37+02:00
Commit Message:
DIRECTOR: Tidy up transitions code
Changed paths:
engines/director/transitions.cpp
diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index c285a0f821..6a59e9d489 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -206,6 +206,9 @@ void Frame::playTransition(Score *score) {
rfrom = clipRect;
rto = clipRect;
+ uint w = clipRect.width();
+ uint h = clipRect.height();
+
for (uint16 i = 1; i < t.steps; i++) {
bool stop = false;
rto = clipRect;
@@ -224,7 +227,7 @@ void Frame::playTransition(Score *score) {
case kTransWipeLeft: // 2
rto.setWidth(t.xStepSize * i);
- rto.moveTo(clipRect.width() - t.xStepSize * i, 0);
+ rto.moveTo(w - t.xStepSize * i, 0);
rfrom = rto;
break;
@@ -235,19 +238,19 @@ void Frame::playTransition(Score *score) {
case kTransWipeUp: // 4
rto.setHeight(t.yStepSize * i);
- rto.moveTo(0, clipRect.height() - t.yStepSize * i);
+ rto.moveTo(0, h - t.yStepSize * i);
rfrom = rto;
break;
case kTransCenterOutHorizontal: // 5
t.xpos += t.xStepSize;
rto.setWidth(t.xpos * 2);
- rto.moveTo(clipRect.width() / 2 - t.xpos, 0);
+ rto.moveTo(w / 2 - t.xpos, 0);
rfrom = rto;
break;
case kTransEdgesInHorizontal: // 6
- rto.setWidth(clipRect.width() - t.xStepSize * i * 2);
+ rto.setWidth(w - t.xStepSize * i * 2);
rto.moveTo(t.xStepSize * i, 0);
rfrom = rto;
break;
@@ -255,12 +258,12 @@ void Frame::playTransition(Score *score) {
case kTransCenterOutVertical: // 7
t.ypos += t.yStepSize;
rto.setHeight(t.ypos * 2);
- rto.moveTo(0, clipRect.height() / 2 - t.ypos);
+ rto.moveTo(0, h / 2 - t.ypos);
rfrom = rto;
break;
case kTransEdgesInVertical: // 8
- rto.setHeight(clipRect.height() - t.yStepSize * i * 2);
+ rto.setHeight(h - t.yStepSize * i * 2);
rto.moveTo(0, t.yStepSize * i);
rfrom = rto;
break;
@@ -270,54 +273,54 @@ void Frame::playTransition(Score *score) {
rto.setHeight(t.ypos * 2);
t.xpos += t.xStepSize;
rto.setWidth(t.xpos * 2);
- rto.moveTo(clipRect.width() / 2 - t.xpos, clipRect.height() / 2 - t.ypos);
+ rto.moveTo(w / 2 - t.xpos, h / 2 - t.ypos);
rfrom = rto;
break;
case kTransEdgesInSquare: // 10
- rto.setHeight(clipRect.height() - t.yStepSize * i * 2);
- rto.setWidth(clipRect.width() - t.xStepSize * i * 2);
+ rto.setHeight(h - t.yStepSize * i * 2);
+ rto.setWidth(w - t.xStepSize * i * 2);
rto.moveTo(t.xStepSize * i, t.yStepSize * i);
rfrom = rto;
break;
case kTransPushLeft: // 11
- rto.moveTo(clipRect.width() - t.xStepSize * i, 0);
+ rto.moveTo(w - t.xStepSize * i, 0);
score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
rfrom.moveTo(t.xStepSize * i, 0);
- rfrom.setWidth(clipRect.width() - t.xStepSize * i);
+ rfrom.setWidth(w - t.xStepSize * i);
rto.moveTo(0, 0);
break;
case kTransPushRight: // 12
- rfrom.moveTo(clipRect.width() - t.xStepSize * i, 0);
+ rfrom.moveTo(w - t.xStepSize * i, 0);
rfrom.setWidth(t.xStepSize * i);
score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
- rto.setWidth(clipRect.width() - t.xStepSize * i);
+ rto.setWidth(w - t.xStepSize * i);
rto.moveTo(t.xStepSize * i, 0);
rfrom.moveTo(0, 0);
- rfrom.setWidth(clipRect.width() - t.xStepSize * i);
+ rfrom.setWidth(w - t.xStepSize * i);
break;
case kTransPushDown: // 13
- rfrom.moveTo(0, clipRect.height() - t.yStepSize * i);
+ rfrom.moveTo(0, h - t.yStepSize * i);
rfrom.setHeight(t.yStepSize * i);
score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
- rto.setHeight(clipRect.height() - t.yStepSize * i);
+ rto.setHeight(h - t.yStepSize * i);
rto.moveTo(0, t.yStepSize * i);
rfrom.moveTo(0, 0);
- rfrom.setHeight(clipRect.height() - t.yStepSize * i);
+ rfrom.setHeight(h - t.yStepSize * i);
break;
case kTransPushUp: // 14
- rto.moveTo(0, clipRect.height() - t.yStepSize * i);
+ rto.moveTo(0, h - t.yStepSize * i);
score->_backSurface->blitFrom(*score->_surface, rfrom, Common::Point(rto.left, rto.top));
rfrom.moveTo(0, t.yStepSize * i);
- rfrom.setHeight(clipRect.height() - t.yStepSize * i);
+ rfrom.setHeight(h - t.yStepSize * i);
rto.moveTo(0, 0);
break;
@@ -362,36 +365,36 @@ void Frame::playTransition(Score *score) {
break;
case kTransCoverDown: // 29
- rto.setHeight(clipRect.height());
- rto.moveTo(0, -clipRect.height() + t.yStepSize * i);
+ rto.setHeight(h);
+ rto.moveTo(0, -h + t.yStepSize * i);
break;
case kTransCoverDownLeft: // 30
- rto.moveTo(clipRect.width() - t.xStepSize * i, -clipRect.height() + t.yStepSize * i);
+ rto.moveTo(w - t.xStepSize * i, -h + t.yStepSize * i);
break;
case kTransCoverDownRight: // 31
- rto.moveTo(-clipRect.width() + t.xStepSize * i, -clipRect.height() + t.yStepSize * i);
+ rto.moveTo(-w + t.xStepSize * i, -h + t.yStepSize * i);
break;
case kTransCoverLeft: // 32
- rto.moveTo(clipRect.width() - t.xStepSize * i, 0);
+ rto.moveTo(w - t.xStepSize * i, 0);
break;
case kTransCoverRight: // 33
- rto.moveTo(-clipRect.width() + t.xStepSize * i, 0);
+ rto.moveTo(-w + t.xStepSize * i, 0);
break;
case kTransCoverUp: // 34
- rto.moveTo(0, clipRect.height() - t.yStepSize * i);
+ rto.moveTo(0, h - t.yStepSize * i);
break;
case kTransCoverUpLeft: // 35
- rto.moveTo(clipRect.width() - t.xStepSize * i, clipRect.height() - t.yStepSize * i);
+ rto.moveTo(w - t.xStepSize * i, h - t.yStepSize * i);
break;
case kTransCoverUpRight: // 36
- rto.moveTo(-clipRect.width() + t.xStepSize * i, clipRect.height() - t.yStepSize * i);
+ rto.moveTo(-w + t.xStepSize * i, h - t.yStepSize * i);
break;
case kTransDissolveBitsFast: // 50
@@ -422,7 +425,7 @@ void Frame::playTransition(Score *score) {
break;
if (fullredraw) {
- g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, 0, 0, clipRect.width(), clipRect.height());
+ g_system->copyRectToScreen(score->_backSurface->getPixels(), score->_backSurface->pitch, 0, 0, w, h);
} else {
rto.clip(clipRect);
More information about the Scummvm-git-logs
mailing list