From 21474d32ab2d2de784c6cd12f85e0f9ad68bcea4 Mon Sep 17 00:00:00 2001 From: richiesams Date: Fri, 30 Aug 2013 17:08:38 -0500 Subject: ZVISION: Fix error is RenderManager backgroundOffset handling --- engines/zvision/render_manager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/zvision') diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp index b1282dc007..96030ba2b9 100644 --- a/engines/zvision/render_manager.cpp +++ b/engines/zvision/render_manager.cpp @@ -118,7 +118,7 @@ void RenderManager::renderSubRectToScreen(Graphics::Surface &surface, int16 dest if (destinationY > 0) { // Move destinationY to 0 - subRectX = surface.w - destinationX; + subRectY = surface.h - destinationY; destinationY = 0; } } @@ -327,12 +327,12 @@ void RenderManager::moveBackground(int offset) { if (_backgroundOffset.x <= -_backgroundWidth) _backgroundOffset.x += _backgroundWidth; else if (_backgroundOffset.x >= _backgroundWidth) - _backgroundOffset.x += _backgroundWidth; + _backgroundOffset.x -= _backgroundWidth; if (_backgroundOffset.y <= -_backgroundHeight) _backgroundOffset.y += _backgroundHeight; else if (_backgroundOffset.y >= _backgroundHeight) - _backgroundOffset.y += _backgroundHeight; + _backgroundOffset.y -= _backgroundHeight; renderImageToScreen(_currentBackground, 0, _screenCenterY - _backgroundOffset.y, true); } else if (state == RenderTable::PANORAMA) { @@ -341,12 +341,12 @@ void RenderManager::moveBackground(int offset) { if (_backgroundOffset.x <= -_backgroundWidth) _backgroundOffset.x += _backgroundWidth; else if (_backgroundOffset.x >= _backgroundWidth) - _backgroundOffset.x += _backgroundWidth; + _backgroundOffset.x -= _backgroundWidth; if (_backgroundOffset.y <= -_backgroundHeight) _backgroundOffset.y += _backgroundHeight; else if (_backgroundOffset.y >= _backgroundHeight) - _backgroundOffset.y += _backgroundHeight; + _backgroundOffset.y -= _backgroundHeight; renderImageToScreen(_currentBackground, _screenCenterX - _backgroundOffset.x, 0, true); } else { -- cgit v1.2.3