aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/coordadjuster.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-02-05 21:09:36 +0000
committerMartin Kiewitz2010-02-05 21:09:36 +0000
commitf9673182254d2a3ea4bb770ce031d89985c8cba9 (patch)
treef79a2408d9b051a7b478486b996d764e878c9554 /engines/sci/graphics/coordadjuster.cpp
parent16efee3c0df7e796b21ec198064a8499d2a28dac (diff)
downloadscummvm-rg350-f9673182254d2a3ea4bb770ce031d89985c8cba9.tar.gz
scummvm-rg350-f9673182254d2a3ea4bb770ce031d89985c8cba9.tar.bz2
scummvm-rg350-f9673182254d2a3ea4bb770ce031d89985c8cba9.zip
SCI: remaining cursor functions now also directly called
svn-id: r47914
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) {