From e25651a4675e25c14521daa81ba4768642c88cce Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 22 Apr 2010 16:55:46 +0000 Subject: SCI: SCI1LATE+ checks for STYLE_USER, versions before check for STYLE_USER|STYLE_TRANSPARENT svn-id: r48771 --- engines/sci/graphics/ports.cpp | 9 +++++++-- engines/sci/graphics/ports.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index 7dddbbb55c..43671f79ec 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -85,6 +85,11 @@ void GfxPorts::init(bool usesOldGfxFunctions, SciGui *gui, GfxPaint16 *paint16, // will work, but some scripts seem to check for 0 and initialize the variable again in that case // resulting in problems. + if (getSciVersion() >= SCI_VERSION_1_LATE) + _styleUser = SCI_WINDOWMGR_STYLE_USER; + else + _styleUser = SCI_WINDOWMGR_STYLE_USER | SCI_WINDOWMGR_STYLE_TRANSPARENT; + // Jones, Slater and Hoyle 3 were called with parameter -Nw 0 0 200 320. // Mother Goose (SCI1) uses -Nw 0 0 159 262. The game will later use SetPort so we don't need to set the other fields. // This actually meant not skipping the first 10 pixellines in windowMgrPort @@ -233,7 +238,7 @@ Window *GfxPorts::newWindow(const Common::Rect &dims, const Common::Rect *restor } r = dims; - if ((style != SCI_WINDOWMGR_STYLE_USER) && !(style & SCI_WINDOWMGR_STYLE_NOFRAME)) { + if ((style != _styleUser) && !(style & SCI_WINDOWMGR_STYLE_NOFRAME)) { r.grow(1); if (style & SCI_WINDOWMGR_STYLE_TITLE) { r.top -= 10; @@ -298,7 +303,7 @@ void GfxPorts::drawWindow(Window *pWnd) { } // drawing frame,shadow and title - if (!(wndStyle & SCI_WINDOWMGR_STYLE_USER)) { + if (wndStyle != _styleUser) { r = pWnd->dims; if (!(wndStyle & SCI_WINDOWMGR_STYLE_NOFRAME)) { r.translate(1, 1); diff --git a/engines/sci/graphics/ports.h b/engines/sci/graphics/ports.h index a4fb93e38b..32f79de730 100644 --- a/engines/sci/graphics/ports.h +++ b/engines/sci/graphics/ports.h @@ -109,6 +109,8 @@ private: bool _usesOldGfxFunctions; + uint16 _styleUser; + /** The list of open 'windows' (and ports), in visual order. */ PortList _windowList; -- cgit v1.2.3