aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/coordadjuster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics/coordadjuster.cpp')
-rw-r--r--engines/sci/graphics/coordadjuster.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/sci/graphics/coordadjuster.cpp b/engines/sci/graphics/coordadjuster.cpp
index 1c5207b2b4..3c9e30c8c8 100644
--- a/engines/sci/graphics/coordadjuster.cpp
+++ b/engines/sci/graphics/coordadjuster.cpp
@@ -65,6 +65,19 @@ Common::Rect GfxCoordAdjuster16::onControl(Common::Rect rect) {
return adjustedRect;
}
+void GfxCoordAdjuster16::setCursorPos(Common::Point &pos) {
+ pos.y += _ports->getPort()->top;
+ pos.x += _ports->getPort()->left;
+}
+
+void GfxCoordAdjuster16::moveCursor(Common::Point &pos) {
+ pos.y += _ports->_picWind->rect.top;
+ pos.x += _ports->_picWind->rect.left;
+
+ pos.y = CLIP<int16>(pos.y, _ports->_picWind->rect.top, _ports->_picWind->rect.bottom - 1);
+ pos.x = CLIP<int16>(pos.x, _ports->_picWind->rect.left, _ports->_picWind->rect.right - 1);
+}
+
#ifdef ENABLE_SCI32
GfxCoordAdjuster32::GfxCoordAdjuster32(SegManager *segMan)
: _segMan(segMan) {