SCI: kSetNowSeen sci2.1

fixes hotspots

svn-id: r51085
This commit is contained in:
Martin Kiewitz 2010-07-21 12:41:17 +00:00
parent 15fc39589d
commit 54c516b3bf

View File

@ -132,14 +132,35 @@ void GfxCompare::kernelSetNowSeen(reg_t objectReference) {
view = _cache->getView(viewId); view = _cache->getView(viewId);
if (view->isSci2Hires()) switch (getSciVersion()) {
_screen->adjustToUpscaledCoordinates(y, x); case SCI_VERSION_2:
if (view->isSci2Hires())
_screen->adjustToUpscaledCoordinates(y, x);
break;
case SCI_VERSION_2_1:
_coordAdjuster->kernelLocalToGlobal(x, y, readSelector(_segMan, objectReference, SELECTOR(plane)));
break;
default:
break;
}
view->getCelRect(loopNo, celNo, x, y, z, celRect); view->getCelRect(loopNo, celNo, x, y, z, celRect);
if (view->isSci2Hires()) { switch (getSciVersion()) {
_screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left); case SCI_VERSION_2:
_screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right); if (view->isSci2Hires()) {
_screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left);
_screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right);
}
break;
case SCI_VERSION_2_1: {
reg_t planeObj = readSelector(_segMan, objectReference, SELECTOR(plane));
_coordAdjuster->kernelGlobalToLocal(celRect.left, celRect.top, planeObj);
_coordAdjuster->kernelGlobalToLocal(celRect.right, celRect.bottom, planeObj);
break;
}
default:
break;
} }
if (lookupSelector(_segMan, objectReference, SELECTOR(nsTop), NULL, NULL) == kSelectorVariable) { if (lookupSelector(_segMan, objectReference, SELECTOR(nsTop), NULL, NULL) == kSelectorVariable) {