aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/render_manager.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp
index 96030ba2b9..ea34469baf 100644
--- a/engines/zvision/render_manager.cpp
+++ b/engines/zvision/render_manager.cpp
@@ -324,15 +324,7 @@ void RenderManager::moveBackground(int offset) {
if (state == RenderTable::TILT) {
_backgroundOffset += Common::Point(0, offset);
- if (_backgroundOffset.x <= -_backgroundWidth)
- _backgroundOffset.x += _backgroundWidth;
- else if (_backgroundOffset.x >= _backgroundWidth)
- _backgroundOffset.x -= _backgroundWidth;
-
- if (_backgroundOffset.y <= -_backgroundHeight)
- _backgroundOffset.y += _backgroundHeight;
- else if (_backgroundOffset.y >= _backgroundHeight)
- _backgroundOffset.y -= _backgroundHeight;
+ _backgroundOffset.y = CLIP<int16>(_backgroundOffset.y, _screenCenterY, (int16)_backgroundHeight - _screenCenterY);
renderImageToScreen(_currentBackground, 0, _screenCenterY - _backgroundOffset.y, true);
} else if (state == RenderTable::PANORAMA) {
@@ -343,11 +335,6 @@ void RenderManager::moveBackground(int offset) {
else if (_backgroundOffset.x >= _backgroundWidth)
_backgroundOffset.x -= _backgroundWidth;
- if (_backgroundOffset.y <= -_backgroundHeight)
- _backgroundOffset.y += _backgroundHeight;
- else if (_backgroundOffset.y >= _backgroundHeight)
- _backgroundOffset.y -= _backgroundHeight;
-
renderImageToScreen(_currentBackground, _screenCenterX - _backgroundOffset.x, 0, true);
} else {
renderImageToScreen(_currentBackground, 0, 0);