diff options
author | D G Turner | 2019-11-20 12:21:32 +0000 |
---|---|---|
committer | D G Turner | 2019-11-20 12:21:32 +0000 |
commit | cac14ad6999ae8b6efd0ae2b73d54c512a00c704 (patch) | |
tree | ec9d3ba7b94be2f0a4db306c544f1d131dcec116 /backends/graphics/gph | |
parent | f014f9a6f2d69309c1eb12b65f012b3f70ee765f (diff) | |
download | scummvm-rg350-cac14ad6999ae8b6efd0ae2b73d54c512a00c704.tar.gz scummvm-rg350-cac14ad6999ae8b6efd0ae2b73d54c512a00c704.tar.bz2 scummvm-rg350-cac14ad6999ae8b6efd0ae2b73d54c512a00c704.zip |
GPH: Fix Compilation Breakage from Screen Shake API Changes
This was broken by the recent modifications to the SurfaceSDLGraphics class
which this inherits from.
Diffstat (limited to 'backends/graphics/gph')
-rw-r--r-- | backends/graphics/gph/gph-graphics.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index cb3e09ac49..1a81cf142c 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -78,7 +78,8 @@ ScalerProc *GPHGraphicsManager::getGraphicsScalerProc(int mode) const { void GPHGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *format) { assert(_transactionMode == kTransactionActive); - _gameScreenShakeOffset = 0; + _gameScreenShakeXOffset = 0; + _gameScreenShakeYOffset = 0; #ifdef USE_RGB_COLOR // Avoid redundant format changes @@ -166,7 +167,7 @@ void GPHGraphicsManager::drawMouse() { // scaling, shake position and aspect ratio correction manually. if (!_overlayVisible) { - dst.y += _currentShakePos; + dst.y += _currentShakeYOffset; } if (_videoMode.aspectRatioCorrection && !_overlayVisible) @@ -218,16 +219,16 @@ void GPHGraphicsManager::internUpdateScreen() { #endif // If the shake position changed, fill the dirty area with blackness - if (_currentShakePos != _gameScreenShakeOffset || - (_cursorNeedsRedraw && _mouseBackup.y <= _currentShakePos)) { - SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_gameScreenShakeOffset * _videoMode.scaleFactor)}; + if (_currentShakeYOffset != _gameScreenShakeYOffset || + (_cursorNeedsRedraw && _mouseBackup.y <= _currentShakeYOffset)) { + SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_gameScreenShakeYOffset * _videoMode.scaleFactor)}; if (_videoMode.aspectRatioCorrection && !_overlayVisible) blackrect.h = real2Aspect(blackrect.h - 1) + 1; SDL_FillRect(_hwScreen, &blackrect, 0); - _currentShakePos = _gameScreenShakeOffset; + _currentShakeYOffset = _gameScreenShakeYOffset; _forceRedraw = true; } @@ -305,7 +306,7 @@ void GPHGraphicsManager::internUpdateScreen() { dstPitch = _hwScreen->pitch; for (r = _dirtyRectList; r != lastRect; ++r) { - int dst_y = r->y + _currentShakePos; + int dst_y = r->y + _currentShakeYOffset; int dst_h = 0; int dst_w = r->w; int orig_dst_y = 0; |