From d5f61d13b6453b6501caf7a71a96dc40bcfc3eec Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Mon, 24 Aug 2009 21:56:54 +0000 Subject: SCI: Reverted r40889. New fix for window erasing issue in SCI1.1 games. svn-id: r43711 --- engines/sci/engine/kgraphics.cpp | 2 +- engines/sci/gfx/gfx_widgets.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index da1a2ec413..796ca857e8 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -2541,7 +2541,7 @@ reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) { // PQ3 and SCI1.1 games have the interpreter store underBits implicitly if (argextra) - gfxw_port_auto_restore_background(s->visual, window, gfx_rect(argv[5].toSint16(), argv[4].toSint16(), argv[7].toSint16() - argv[5].toSint16(), argv[6].toSint16() - argv[4].toSint16())); + gfxw_port_auto_restore_background(s->visual, window, gfx_rect(argv[5].toSint16(), argv[4].toSint16() + s->wm_port->_bounds.y, argv[7].toSint16() - argv[5].toSint16(), argv[6].toSint16() - argv[4].toSint16())); ADD_TO_WINDOW_PORT(window); FULL_REDRAW(); diff --git a/engines/sci/gfx/gfx_widgets.cpp b/engines/sci/gfx/gfx_widgets.cpp index 12cec0ada6..6a3bddee0d 100644 --- a/engines/sci/gfx/gfx_widgets.cpp +++ b/engines/sci/gfx/gfx_widgets.cpp @@ -1753,8 +1753,8 @@ int gfxw_widget_matches_snapshot(gfxw_snapshot_t *snapshot, GfxWidget *widget) { // (this one includes equality too) return ((widget->_serial >= free_above_eq || widget->_serial < free_below) && (snapshot->area.x <= bounds.x && snapshot->area.y <= bounds.y && - snapshot->area.width >= bounds.width && - snapshot->area.height >= bounds.height)); + snapshot->area.x + snapshot->area.width >= bounds.x + bounds.width && + snapshot->area.y + snapshot->area.height >= bounds.y + bounds.height)); } #define MAGIC_FREE_NUMBER -42 -- cgit v1.2.3