Ticket #6452: SCI-update-nsRect.patch

File SCI-update-nsRect.patch, 1.5 KB (added by SF/tkorvola, 10 years ago)
  • engines/sci/graphics/frameout.cpp

    diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
    index 76510fa..fd1d4b0 100644
    a b void GfxFrameout::kernelFrameout() {  
    773773                                        if (view && view->isSci2Hires()) {
    774774                                                view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left);
    775775                                                view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right);
    776                                                 g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
    777776                                        } else if (getSciVersion() >= SCI_VERSION_2_1 && _resMan->detectHires()) {
    778777                                                _coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left);
    779778                                                _coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right);
    780                                                 g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
    781779                                        }
    782780
    783781                                        // TODO: For some reason, the top left nsRect coordinates get
    784782                                        // swapped in the GK1 inventory screen, investigate why.
    785783                                        // HACK: Fix the coordinates by explicitly setting them here.
    786                                         Common::Rect objNSRect = g_sci->_gfxCompare->getNSRect(itemEntry->object);
    787                                         if (objNSRect.top == nsRect.left && objNSRect.left == nsRect.top && nsRect.top != 0 && nsRect.left != 0) {
    788                                                 g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
    789                                         }
     784                                        // Actually nsRects get messed up in all kinds of ways in GK1.
     785                                        // So just always set it from the cel.
     786
     787                                        g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
    790788                                }
    791789
    792790                                // Don't attempt to draw sprites that are outside the visible