[Scummvm-git-logs] scummvm master -> 90c2f77686978b09f758f8c0bbc39258fc691d58
csnover
csnover at users.noreply.github.com
Sat Oct 22 04:04:32 CEST 2016
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:
90c2f77686 SCI32: Implement HShutterIn for SCI2.1mid+
Commit: 90c2f77686978b09f758f8c0bbc39258fc691d58
https://github.com/scummvm/scummvm/commit/90c2f77686978b09f758f8c0bbc39258fc691d58
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-10-21T21:04:01-05:00
Commit Message:
SCI32: Implement HShutterIn for SCI2.1mid+
Fixes Trac#9584.
Changed paths:
engines/sci/graphics/transitions32.cpp
diff --git a/engines/sci/graphics/transitions32.cpp b/engines/sci/graphics/transitions32.cpp
index ee230f5..330b9be 100644
--- a/engines/sci/graphics/transitions32.cpp
+++ b/engines/sci/graphics/transitions32.cpp
@@ -389,6 +389,7 @@ ShowStyleList::iterator GfxTransitions32::deleteShowStyle(const ShowStyleList::i
break;
case kShowStyleNone:
case kShowStyleMorph:
+ case kShowStyleHShutterIn:
// do nothing
break;
default:
@@ -546,7 +547,48 @@ void GfxTransitions32::processHShutterOut(PlaneShowStyle &showStyle) {
}
void GfxTransitions32::processHShutterIn(PlaneShowStyle &showStyle) {
- error("HShutterIn is not known to be used by any game. Please submit a bug report with details about the game you were playing and what you were doing that triggered this error. Thanks!");
+ if (getSciVersion() <= SCI_VERSION_2_1_EARLY) {
+ error("HShutterIn is not known to be used by any SCI2.1early- game. Please submit a bug report with details about the game you were playing and what you were doing that triggered this error. Thanks!");
+ }
+
+ Plane* plane = g_sci->_gfxFrameout->getVisiblePlanes().findByObject(showStyle.plane);
+ const Common::Rect &screenRect = plane->_screenRect;
+ Common::Rect rect;
+
+ const int divisions = showStyle.divisions;
+ const int width = screenRect.width();
+ const int divisionWidth = width / divisions - 1;
+
+ if (width % divisions) {
+ rect.left = (divisionWidth + 1) * divisions + screenRect.left;
+ rect.top = screenRect.top;
+ rect.right = (divisionWidth + 1) * divisions + (width % divisions) + screenRect.left;
+ rect.bottom = screenRect.bottom;
+ g_sci->_gfxFrameout->showRect(rect);
+ }
+
+ throttle();
+
+ for (int i = 0; i < width / (2 * divisions); ++i) {
+ // Left side
+ rect.left = i * divisions + screenRect.left;
+ rect.top = screenRect.top;
+ rect.right = i * divisions + divisions + screenRect.left;
+ rect.bottom = screenRect.bottom;
+ g_sci->_gfxFrameout->showRect(rect);
+
+ // Right side
+ rect.left = (divisionWidth - i) * divisions + screenRect.left;
+ rect.top = screenRect.top;
+ rect.right = (divisionWidth - i) * divisions + divisions + screenRect.left;
+ rect.bottom = screenRect.bottom;
+ g_sci->_gfxFrameout->showRect(rect);
+
+ throttle();
+ }
+
+ g_sci->_gfxFrameout->showRect(screenRect);
+ throttle();
}
void GfxTransitions32::processVShutterOut(PlaneShowStyle &showStyle) {
More information about the Scummvm-git-logs
mailing list