aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2
diff options
context:
space:
mode:
authorsluicebox2019-11-16 03:14:24 -0800
committerEugene Sandulenko2019-11-19 00:20:40 +0100
commit0328689099a71b79cd53b639fe8b578f38870ee8 (patch)
tree1291b5c93d5bfdb162381d41cecaae9bbefcee1e /backends/platform/ps2
parent9ae76619550892f33c2ef446036dc6d4158c5bd1 (diff)
downloadscummvm-rg350-0328689099a71b79cd53b639fe8b578f38870ee8.tar.gz
scummvm-rg350-0328689099a71b79cd53b639fe8b578f38870ee8.tar.bz2
scummvm-rg350-0328689099a71b79cd53b639fe8b578f38870ee8.zip
PS2: Implement horizontal shake
Diffstat (limited to 'backends/platform/ps2')
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index da7d6aadfa..8f655e6aa1 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -680,8 +680,11 @@ int16 Gs2dScreen::getOverlayHeight(void) {
}
void Gs2dScreen::setShakePos(int shakeXOffset, int shakeYOffset) {
+ _shakeXOffset = (shakeXOffset * _mouseScaleX) >> 8;
_shakeYOffset = (shakeYOffset * _mouseScaleY) >> 8;
+ _blitCoords[0].x = SCALE(_shakeXOffset) + ORIGIN_X;
_blitCoords[0].y = SCALE(_shakeYOffset) + ORIGIN_Y;
+ _blitCoords[1].x = SCALE(_tvWidth + _shakeXOffset) + ORIGIN_X;
_blitCoords[1].y = SCALE(_tvHeight + _shakeYOffset) + ORIGIN_Y;
}