diff options
author | richiesams | 2013-09-03 23:48:11 -0500 |
---|---|---|
committer | richiesams | 2013-09-04 00:15:19 -0500 |
commit | dd307c2484f7d251fa447bc6c05a3c4512928681 (patch) | |
tree | 616edd6e96de7243355e0e50a21cbc989cc28e7b /engines | |
parent | 117eea1be6231ad26fe43f9080fa572b4deb73cb (diff) | |
download | scummvm-rg350-dd307c2484f7d251fa447bc6c05a3c4512928681.tar.gz scummvm-rg350-dd307c2484f7d251fa447bc6c05a3c4512928681.tar.bz2 scummvm-rg350-dd307c2484f7d251fa447bc6c05a3c4512928681.zip |
ZVISION: Create method to get the current background offset
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/render_manager.cpp | 12 | ||||
-rw-r--r-- | engines/zvision/render_manager.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp index 837e3880c7..e394baf504 100644 --- a/engines/zvision/render_manager.cpp +++ b/engines/zvision/render_manager.cpp @@ -335,4 +335,16 @@ void RenderManager::moveBackground(int offset) { } } +uint32 RenderManager::getCurrentBackgroundOffset() { + RenderTable::RenderState state = _renderTable.getRenderState(); + + if (state == RenderTable::PANORAMA) { + return _backgroundOffset.x; + } else if (state == RenderTable::TILT) { + return _backgroundOffset.y; + } else { + return 0; + } +} + } // End of namespace ZVision diff --git a/engines/zvision/render_manager.h b/engines/zvision/render_manager.h index 41dedab792..1dcbf76d8c 100644 --- a/engines/zvision/render_manager.h +++ b/engines/zvision/render_manager.h @@ -166,6 +166,7 @@ public: const Common::Point screenSpaceToImageSpace(const Common::Point &point); RenderTable *getRenderTable(); + uint32 getCurrentBackgroundOffset(); private: /** |