diff options
-rw-r--r-- | engines/zvision/render_manager.cpp | 13 | ||||
-rw-r--r-- | engines/zvision/render_manager.h | 9 |
2 files changed, 22 insertions, 0 deletions
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp index 3f19cae6fe..c0554dc20a 100644 --- a/engines/zvision/render_manager.cpp +++ b/engines/zvision/render_manager.cpp @@ -338,6 +338,19 @@ const Common::Point RenderManager::screenSpaceToImageSpace(const Common::Point & return newPoint; } +const Common::Point RenderManager::imageSpaceToWorkingWindowSpace(const Common::Point &point) { + Common::Point newPoint(point); + + RenderTable::RenderState state = _renderTable.getRenderState(); + if (state == RenderTable::PANORAMA) { + newPoint += (Common::Point(_screenCenterX, 0) - _backgroundOffset); + } else if (state == RenderTable::TILT) { + newPoint += (Common::Point(0, _screenCenterY) - _backgroundOffset); + } + + return newPoint; +} + RenderTable *RenderManager::getRenderTable() { return &_renderTable; } diff --git a/engines/zvision/render_manager.h b/engines/zvision/render_manager.h index bb673e9929..0294d6a19f 100644 --- a/engines/zvision/render_manager.h +++ b/engines/zvision/render_manager.h @@ -173,6 +173,15 @@ public: * @return Point in image coordinate space */ const Common::Point screenSpaceToImageSpace(const Common::Point &point); + /** + * Converts a point in image coordinate space to ***PRE-WARP*** + * working window coordinate space + * + * @param point Point in image coordinate space + * @return Point in PRE-WARP working window coordinate space + */ + const Common::Point imageSpaceToWorkingWindowSpace(const Common::Point &point); + RenderTable *getRenderTable(); uint32 getCurrentBackgroundOffset(); |