aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-05-13 21:14:37 +0000
committerMartin Kiewitz2010-05-13 21:14:37 +0000
commita5f59ccdae6cd60b365229e7fd48c737dad6b4ba (patch)
tree3bc9a12b272b7845fe8debaa1bab15caede8d39c
parent070b2e14fe3fa1c89aba4e1e5410a52a5315fbfc (diff)
downloadscummvm-rg350-a5f59ccdae6cd60b365229e7fd48c737dad6b4ba.tar.gz
scummvm-rg350-a5f59ccdae6cd60b365229e7fd48c737dad6b4ba.tar.bz2
scummvm-rg350-a5f59ccdae6cd60b365229e7fd48c737dad6b4ba.zip
SCI: remove hack code for shadows and implement them properly (shadow is actually part of the window, not added onto the window) - fixes especially lsl5
svn-id: r49026
-rw-r--r--engines/sci/graphics/ports.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index f20aa8f38c..1a77e6c6ae 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -276,13 +276,6 @@ Window *GfxPorts::newWindow(const Common::Rect &dims, const Common::Rect *restor
if (restoreRect == 0)
pwnd->restoreRect = pwnd->dims;
- if (!(pwnd->wndStyle & (SCI_WINDOWMGR_STYLE_USER | SCI_WINDOWMGR_STYLE_NOFRAME))) {
- // The shadow is drawn slightly outside the window.
- // Enlarge restoreRect to cover that.
- pwnd->restoreRect.bottom++;
- pwnd->restoreRect.right++;
- }
-
if (draw)
drawWindow(pwnd);
setPort((Port *)pwnd);
@@ -314,16 +307,18 @@ void GfxPorts::drawWindow(Window *pWnd) {
if ((getSciVersion() >= SCI_VERSION_1_LATE) ? !(wndStyle & _styleUser) : wndStyle != _styleUser) {
r = pWnd->dims;
if (!(wndStyle & SCI_WINDOWMGR_STYLE_NOFRAME)) {
- r.translate(1, 1);
- _paint16->frameRect(r);// shadow
+ r.top++;
+ r.left++;
+ _paint16->frameRect(r);// draw shadow
r.translate(-1, -1);
- _paint16->frameRect(r);// window frame
+ _paint16->frameRect(r);// draw actual window frame
if (wndStyle & SCI_WINDOWMGR_STYLE_TITLE) {
if (getSciVersion() <= SCI_VERSION_0_LATE) {
// draw a black line between titlebar and actual window content for SCI0
r.bottom = r.top + 10;
_paint16->frameRect(r);
+ r.bottom = pWnd->dims.bottom - 1;
}
r.grow(-1);
if (getSciVersion() <= SCI_VERSION_0_LATE)
@@ -337,7 +332,7 @@ void GfxPorts::drawWindow(Window *pWnd) {
penColor(oldcolor);
}
- r = pWnd->dims;
+ r.grow(+1);
r.top += 9;
}