aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc
diff options
context:
space:
mode:
authorsluicebox2019-11-15 01:38:21 -0800
committerEugene Sandulenko2019-11-19 00:20:40 +0100
commitb8390fa161c0c324af0e52a4f3a740cca9e9a479 (patch)
treee88f1e7cbb2c35c1b1c3319c9481c4edafca734d /backends/platform/dc
parent3238e523ee2ac442c7562830a85b347400b7da88 (diff)
downloadscummvm-rg350-b8390fa161c0c324af0e52a4f3a740cca9e9a479.tar.gz
scummvm-rg350-b8390fa161c0c324af0e52a4f3a740cca9e9a479.tar.bz2
scummvm-rg350-b8390fa161c0c324af0e52a4f3a740cca9e9a479.zip
GRAPHICS: Add interface for horizontal shake
Diffstat (limited to 'backends/platform/dc')
-rw-r--r--backends/platform/dc/dc.h4
-rw-r--r--backends/platform/dc/dcmain.cpp2
-rw-r--r--backends/platform/dc/display.cpp7
3 files changed, 7 insertions, 6 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index cdea88e6b3..20098a5e2e 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -145,7 +145,7 @@ public:
void setCursorPalette(const byte *colors, uint start, uint num);
// Shaking is used in SCUMM. Set current shake position.
- void setShakePos(int shake_pos);
+ void setShakePos(int shake_x_pos, int shake_y_pos);
// Get the number of milliseconds since the program was started.
uint32 getMillis(bool skipRecord = false);
@@ -201,7 +201,7 @@ public:
int _ms_cur_x, _ms_cur_y, _ms_cur_w, _ms_cur_h, _ms_old_x, _ms_old_y;
int _ms_hotspot_x, _ms_hotspot_y, _ms_visible, _devpoll, _last_screen_refresh;
- int _current_shake_pos, _screen_w, _screen_h;
+ int _current_shake_x_pos, _current_shake_y_pos, _screen_w, _screen_h;
int _overlay_x, _overlay_y;
unsigned char *_ms_buf;
uint32 _ms_keycolor;
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 26cf9de5b4..31fd883cd6 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -42,7 +42,7 @@ const char *gGameName;
OSystem_Dreamcast::OSystem_Dreamcast()
: _devpoll(0), screen(NULL), mouse(NULL), overlay(NULL), _softkbd(this),
_ms_buf(NULL), _mixer(NULL),
- _current_shake_pos(0), _aspect_stretch(false), _softkbd_on(false),
+ _current_shake_x_pos(0), _current_shake_y_pos(0), _aspect_stretch(false), _softkbd_on(false),
_softkbd_motion(0), _enable_cursor_palette(false), _screenFormat(0)
{
memset(screen_tx, 0, sizeof(screen_tx));
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index 2547605398..447f671059 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -35,7 +35,7 @@
#define OVL_H 200
#define OVL_TXSTRIDE 512
-#define TOP_OFFSET (_top_offset+_yscale*_current_shake_pos)
+#define TOP_OFFSET (_top_offset+_yscale*_current_shake_y_pos)
static const struct {
Graphics::PixelFormat pixelFormat;
@@ -320,9 +320,10 @@ void OSystem_Dreamcast::setMouseCursor(const void *buf, uint w, uint h,
memcpy(_ms_buf, buf, w * h);
}
-void OSystem_Dreamcast::setShakePos(int shake_pos)
+void OSystem_Dreamcast::setShakePos(int shake_x_pos, int shake_y_pos)
{
- _current_shake_pos = shake_pos;
+ _current_shake_x_pos = shake_x_pos;
+ _current_shake_y_pos = shake_y_pos;
}
void OSystem_Dreamcast::updateScreenTextures(void)