aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorsluicebox2019-11-16 03:06:24 -0800
committerEugene Sandulenko2019-11-19 00:20:40 +0100
commitba2923aa0c541dbdfd79b7026d611a7a45e1394d (patch)
tree598ff772a095d3b813038d090d5b617186616ec9 /backends/platform
parent336a79f0780664448fc28f35d2751618321d7f22 (diff)
downloadscummvm-rg350-ba2923aa0c541dbdfd79b7026d611a7a45e1394d.tar.gz
scummvm-rg350-ba2923aa0c541dbdfd79b7026d611a7a45e1394d.tar.bz2
scummvm-rg350-ba2923aa0c541dbdfd79b7026d611a7a45e1394d.zip
PSP: Implement horizontal shake
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/3ds/osystem-graphics.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index 1ea70053fb..fa419f28ec 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -370,8 +370,12 @@ void OSystem_3DS::setShakePos(int shakeXOffset, int shakeYOffset) {
// TODO: implement this in overlay, top screen, and mouse too
_screenShakeXOffset = shakeXOffset;
_screenShakeYOffset = shakeYOffset;
- _gameTopTexture.setPosition(_gameTopX, _gameTopY + _gameTopTexture.getScaleY() * shakeYOffset);
- _gameBottomTexture.setPosition(_gameBottomX, _gameBottomY + _gameBottomTexture.getScaleY() * shakeYOffset);
+ int topX = _gameTopX + (_gameTopTexture.getScaleX() * shakeXOffset);
+ int topY = _gameTopY + (_gameTopTexture.getScaleY() * shakeYOffset);
+ _gameTopTexture.setPosition(topX, topY);
+ int bottomX = _gameBottomX + (_gameBottomTexture.getScaleX() * shakeXOffset);
+ int bottomY = _gameBottomY + (_gameBottomTexture.getScaleY() * shakeYOffset);
+ _gameBottomTexture.setPosition(bottomX, bottomY);
}
void OSystem_3DS::setFocusRectangle(const Common::Rect &rect) {