From a5f59ccdae6cd60b365229e7fd48c737dad6b4ba Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 13 May 2010 21:14:37 +0000 Subject: 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 --- engines/sci/graphics/ports.cpp | 17 ++++++----------- 1 file 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; } -- cgit v1.2.3