aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-11-20 13:26:17 +0000
committerD G Turner2019-11-20 13:26:17 +0000
commit19e56e5e1fb03fcbe7f4fc764d22520d46dbe0b1 (patch)
tree514b7592ec576df01aafe0ebfd3224dfaaa4d282
parentcac14ad6999ae8b6efd0ae2b73d54c512a00c704 (diff)
downloadscummvm-rg350-19e56e5e1fb03fcbe7f4fc764d22520d46dbe0b1.tar.gz
scummvm-rg350-19e56e5e1fb03fcbe7f4fc764d22520d46dbe0b1.tar.bz2
scummvm-rg350-19e56e5e1fb03fcbe7f4fc764d22520d46dbe0b1.zip
LINUXMOTO: Fix Compilation Breakage from Screen Shake API Changes
This was broken by the recent modifications to the SurfaceSDLGraphics class which this inherits from.
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index 2105bd84d8..a087c95705 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -88,7 +88,8 @@ ScalerProc *LinuxmotoSdlGraphicsManager::getGraphicsScalerProc(int mode) const {
void LinuxmotoSdlGraphicsManager::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
@@ -197,7 +198,7 @@ void LinuxmotoSdlGraphicsManager::drawMouse() {
// scaling, shake position and aspect ratio correction manually.
if (!_overlayVisible) {
- dst.y += _currentShakePos;
+ dst.y += _currentShakeYOffset;
}
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
@@ -249,16 +250,16 @@ void LinuxmotoSdlGraphicsManager::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;
_forceFull = true;
}
@@ -332,7 +333,7 @@ void LinuxmotoSdlGraphicsManager::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;