diff options
author | Martin Kiewitz | 2010-07-25 16:31:46 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-25 16:31:46 +0000 |
commit | b3949cf4be02136c633becd841a4a5e45033f8d5 (patch) | |
tree | b7af657a4fa0361e1c6d21d4e78fadbf4377718c /engines/sci/graphics/coordadjuster.cpp | |
parent | 8145fea6b9afdc90f1a24ce845133e46ac3f68ff (diff) | |
download | scummvm-rg350-b3949cf4be02136c633becd841a4a5e45033f8d5.tar.gz scummvm-rg350-b3949cf4be02136c633becd841a4a5e45033f8d5.tar.bz2 scummvm-rg350-b3949cf4be02136c633becd841a4a5e45033f8d5.zip |
SCI: sci32 coord adjustment changes
- fixes lsl6hires inventory
svn-id: r51275
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) { |