diff options
Diffstat (limited to 'engines/sci/graphics/coordadjuster.cpp')
| -rw-r--r-- | engines/sci/graphics/coordadjuster.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/sci/graphics/coordadjuster.cpp b/engines/sci/graphics/coordadjuster.cpp index 70b04b37bf..468c41f1c1 100644 --- a/engines/sci/graphics/coordadjuster.cpp +++ b/engines/sci/graphics/coordadjuster.cpp @@ -122,9 +122,14 @@ void GfxCoordAdjuster32::setScriptsResolution(uint16 width, uint16 height) { scriptsRunningHeight = height; } -void GfxCoordAdjuster32::getEvent(Common::Point &pos) { - pos.y = ((pos.y * scriptsRunningHeight) / g_sci->_gfxScreen->getHeight()); - pos.x = ((pos.x * scriptsRunningWidth) / g_sci->_gfxScreen->getWidth()); +void GfxCoordAdjuster32::fromDisplayToScript(int16 &y, int16 &x) { + y = ((y * scriptsRunningHeight) / g_sci->_gfxScreen->getHeight()); + x = ((x * scriptsRunningWidth) / g_sci->_gfxScreen->getWidth()); +} + +void GfxCoordAdjuster32::fromScriptToDisplay(int16 &y, int16 &x) { + y = ((y * g_sci->_gfxScreen->getHeight()) / scriptsRunningHeight); + x = ((x * g_sci->_gfxScreen->getWidth()) / scriptsRunningWidth); } void GfxCoordAdjuster32::pictureSetDisplayArea(Common::Rect displayArea) { |
