aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/compare.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-21 12:41:17 +0000
committerMartin Kiewitz2010-07-21 12:41:17 +0000
commit54c516b3bf34ce2f6f4e7f499839dfad2d5fa68a (patch)
tree6d44c54db45f163b11aaa09719f9dea8b16567f5 /engines/sci/graphics/compare.cpp
parent15fc39589d109245fd66d5cee6319ee19bb8e4d2 (diff)
downloadscummvm-rg350-54c516b3bf34ce2f6f4e7f499839dfad2d5fa68a.tar.gz
scummvm-rg350-54c516b3bf34ce2f6f4e7f499839dfad2d5fa68a.tar.bz2
scummvm-rg350-54c516b3bf34ce2f6f4e7f499839dfad2d5fa68a.zip
SCI: kSetNowSeen sci2.1
fixes hotspots svn-id: r51085
Diffstat (limited to 'engines/sci/graphics/compare.cpp')
-rw-r--r--engines/sci/graphics/compare.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp
index 760108ffd2..c019687fc2 100644
--- a/engines/sci/graphics/compare.cpp
+++ b/engines/sci/graphics/compare.cpp
@@ -132,14 +132,35 @@ void GfxCompare::kernelSetNowSeen(reg_t objectReference) {
view = _cache->getView(viewId);
- if (view->isSci2Hires())
- _screen->adjustToUpscaledCoordinates(y, x);
+ switch (getSciVersion()) {
+ 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);
- if (view->isSci2Hires()) {
- _screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left);
- _screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right);
+ switch (getSciVersion()) {
+ case SCI_VERSION_2:
+ 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) {