[Scummvm-git-logs] scummvm master -> b4c6ab24b0a091fe8a1c58fa556709bf148fe83d
npjg
nathanael.gentrydb8 at gmail.com
Fri Aug 14 01:25:38 UTC 2020
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:
d12cb32f5d DIRECTOR: Only recenter window on new dims
b4c6ab24b0 GRAPHICS: MACGUI: Restore window border transparency
Commit: d12cb32f5dacda37e0591d8153df5ea4830aa583
https://github.com/scummvm/scummvm/commit/d12cb32f5dacda37e0591d8153df5ea4830aa583
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-08-13T21:24:47-04:00
Commit Message:
DIRECTOR: Only recenter window on new dims
DIRECTOR: Fix whitespace
Changed paths:
engines/director/movie.cpp
diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index c43d37b848..58852ae06f 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -110,30 +110,34 @@ bool Movie::loadArchive() {
// _movieRect and _stageColor are in VWCF, which the cast handles
+ bool recenter = false;
// If the stage dimensions are different, delete it and start again.
// Otherwise, do not clear it so there can be a nice transition.
if (_window->getSurface()->w != _movieRect.width() || _window->getSurface()->h != _movieRect.height()) {
_window->resize(_movieRect.width(), _movieRect.height(), true);
+ recenter = true;
}
+
// TODO: Add more options for desktop dimensions
if (_window == _vm->getStage()) {
uint16 windowWidth = debugChannelSet(-1, kDebugDesktop) ? 1024 : _movieRect.width();
uint16 windowHeight = debugChannelSet(-1, kDebugDesktop) ? 768 : _movieRect.height();
if (_vm->_wm->_screenDims.width() != windowWidth || _vm->_wm->_screenDims.height() != windowHeight) {
_vm->_wm->_screenDims = Common::Rect(windowWidth, windowHeight);
+ recenter = true;
- if (debugChannelSet(-1, kDebug32bpp))
- initGraphics(windowWidth, windowHeight, new Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
- else
- initGraphics(windowWidth, windowHeight);
+ if (debugChannelSet(-1, kDebug32bpp))
+ initGraphics(windowWidth, windowHeight, new Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
+ else
+ initGraphics(windowWidth, windowHeight);
}
}
- _window->setStageColor(_stageColor, true);
-
- if (debugChannelSet(-1, kDebugDesktop))
+ if (recenter && debugChannelSet(-1, kDebugDesktop))
_window->center(g_director->_centerStage);
+ _window->setStageColor(_stageColor, true);
+
// Score
if (!_movieArchive->hasResource(MKTAG('V', 'W', 'S', 'C'), -1)) {
warning("Movie::loadArchive(): Wrong movie format. VWSC resource missing");
Commit: b4c6ab24b0a091fe8a1c58fa556709bf148fe83d
https://github.com/scummvm/scummvm/commit/b4c6ab24b0a091fe8a1c58fa556709bf148fe83d
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-08-13T21:24:52-04:00
Commit Message:
GRAPHICS: MACGUI: Restore window border transparency
Changed paths:
graphics/macgui/macwindowmanager.cpp
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index b46b1970d6..75ffe41aba 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -542,8 +542,23 @@ void MacWindowManager::draw() {
Common::Rect innerDims = w->getInnerDimensions();
int adjWidth, adjHeight;
- adjustDimensions(clip, outerDims, adjWidth, adjHeight);
- g_system->copyRectToScreen(w->getBorderSurface()->getBasePtr(MAX(clip.left - outerDims.left, 0), MAX(clip.top - outerDims.top, 0)), w->getBorderSurface()->pitch, clip.left, clip.top, adjWidth, adjHeight);
+ if (w->isDirty() || forceRedraw) {
+ w->draw(forceRedraw);
+
+ Surface *surface = g_system->lockScreen();
+ ManagedSurface *border = w->getBorderSurface();
+
+ adjustDimensions(clip, outerDims, adjWidth, adjHeight);
+ for (int y = 0; y < adjHeight; y++) {
+ const byte *src = (const byte *)border->getBasePtr(clip.left - outerDims.left, y);
+ byte *dst = (byte *)surface->getBasePtr(clip.left, y + clip.top);
+ for (int x = 0; x < adjWidth; x++, src++, dst++)
+ if (*src != _colorGreen2 && *src != _colorGreen)
+ *dst = *src;
+ }
+
+ g_system->unlockScreen();
+ }
adjustDimensions(clip, innerDims, adjWidth, adjHeight);
g_system->copyRectToScreen(w->getWindowSurface()->getBasePtr(MAX(clip.left - innerDims.left, 0), MAX(clip.top - innerDims.top, 0)), w->getWindowSurface()->pitch,MAX(innerDims.left, (int16)0), MAX(innerDims.top, (int16)0), adjWidth, adjHeight);
More information about the Scummvm-git-logs
mailing list