aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorD G Turner2019-11-20 12:14:52 +0000
committerD G Turner2019-11-20 12:14:52 +0000
commitf014f9a6f2d69309c1eb12b65f012b3f70ee765f (patch)
tree6ad29f6eff48c31ccb9f964e9fb44a6279f44ac3 /backends
parent12fca19d59bed1a820ca470d6c6b69d8541eab4e (diff)
downloadscummvm-rg350-f014f9a6f2d69309c1eb12b65f012b3f70ee765f.tar.gz
scummvm-rg350-f014f9a6f2d69309c1eb12b65f012b3f70ee765f.tar.bz2
scummvm-rg350-f014f9a6f2d69309c1eb12b65f012b3f70ee765f.zip
DINGUX: 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')
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index f44fd99334..5d5f8e9f51 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -86,7 +86,8 @@ ScalerProc *DINGUXSdlGraphicsManager::getGraphicsScalerProc(int mode) const {
void DINGUXSdlGraphicsManager::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
@@ -169,7 +170,7 @@ void DINGUXSdlGraphicsManager::drawMouse() {
// We draw the pre-scaled cursor image, so now we need to adjust for
// scaling, shake position and aspect ratio correction manually.
- dst.y += _currentShakePos;
+ dst.y += _currentShakeYOffset;
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
dst.y = real2Aspect(dst.y);
@@ -221,16 +222,16 @@ void DINGUXSdlGraphicsManager::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;
}
@@ -304,7 +305,7 @@ void DINGUXSdlGraphicsManager::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;