aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/compare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics/compare.cpp')
-rw-r--r--engines/sci/graphics/compare.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp
index 1c961b2ad6..6a99d2384e 100644
--- a/engines/sci/graphics/compare.cpp
+++ b/engines/sci/graphics/compare.cpp
@@ -185,9 +185,9 @@ reg_t GfxCompare::kernelCanBeHere(reg_t curObject, reg_t listReference) {
checkRect.right = readSelectorValue(_segMan, curObject, SELECTOR(brRight));
checkRect.bottom = readSelectorValue(_segMan, curObject, SELECTOR(brBottom));
- if (!checkRect.isValidRect()) { // can occur in Iceman - HACK? TODO: is this really occuring in sierra sci? check this
+ if (!checkRect.isValidRect()) { // can occur in Iceman and Mother Goose - HACK? TODO: is this really occuring in sierra sci? check this
warning("kCan(t)BeHere - invalid rect %d, %d -> %d, %d", checkRect.left, checkRect.top, checkRect.right, checkRect.bottom);
- return NULL_REG;
+ return NULL_REG; // this means "can be here"
}
adjustedRect = _coordAdjuster->onControl(checkRect);
@@ -237,20 +237,24 @@ void GfxCompare::kernelBaseSetter(reg_t object) {
Common::Rect celRect;
GfxView *tmpView = _cache->getView(viewId);
- if (tmpView->isSci2Hires())
- _screen->adjustToUpscaledCoordinates(y, x);
+ if (!tmpView->isScaleable())
+ scaleSignal = 0;
if (scaleSignal & kScaleSignalDoScaling) {
- int16 scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX));
- int16 scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY));
- tmpView->getCelScaledRect(loopNo, celNo, x, y, z, scaleX, scaleY, celRect);
+ celRect.left = readSelectorValue(_segMan, object, SELECTOR(nsLeft));
+ celRect.right = readSelectorValue(_segMan, object, SELECTOR(nsRight));
+ celRect.top = readSelectorValue(_segMan, object, SELECTOR(nsTop));
+ celRect.bottom = readSelectorValue(_segMan, object, SELECTOR(nsBottom));
} else {
+ if (tmpView->isSci2Hires())
+ _screen->adjustToUpscaledCoordinates(y, x);
+
tmpView->getCelRect(loopNo, celNo, x, y, z, celRect);
- }
- if (tmpView->isSci2Hires()) {
- _screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left);
- _screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right);
+ if (tmpView->isSci2Hires()) {
+ _screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left);
+ _screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right);
+ }
}
celRect.bottom = y + 1;