From 0328689099a71b79cd53b639fe8b578f38870ee8 Mon Sep 17 00:00:00 2001 From: sluicebox <22204938+sluicebox@users.noreply.github.com> Date: Sat, 16 Nov 2019 03:14:24 -0800 Subject: [PATCH] PS2: Implement horizontal shake --- backends/platform/ps2/Gs2dScreen.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp index da7d6aadfae..8f655e6aa17 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; }