aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-22 16:55:46 +0000
committerMartin Kiewitz2010-04-22 16:55:46 +0000
commite25651a4675e25c14521daa81ba4768642c88cce (patch)
tree136ffa289ed945c7ce49e2005bc21d558273f6b5
parent6a368a2c01b2152078495042d2da28f9557cf554 (diff)
downloadscummvm-rg350-e25651a4675e25c14521daa81ba4768642c88cce.tar.gz
scummvm-rg350-e25651a4675e25c14521daa81ba4768642c88cce.tar.bz2
scummvm-rg350-e25651a4675e25c14521daa81ba4768642c88cce.zip
SCI: SCI1LATE+ checks for STYLE_USER, versions before check for STYLE_USER|STYLE_TRANSPARENT
svn-id: r48771
-rw-r--r--engines/sci/graphics/ports.cpp9
-rw-r--r--engines/sci/graphics/ports.h2
2 files changed, 9 insertions, 2 deletions
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;