diff options
author | Matthew Hoops | 2012-06-24 09:37:53 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-06-24 09:37:53 -0400 |
commit | 91efe792d5b231752dd16888729a94f323363fa0 (patch) | |
tree | e7346f83d4966ff4f3cf7e593a7f0cfa16c45b20 /backends/platform/dc/display.cpp | |
parent | 915a8399c910fb5c8e35de58857ce1577c1a0151 (diff) | |
parent | 20b677080881580706652b17dd5a4c3ed3e36c07 (diff) | |
download | scummvm-rg350-91efe792d5b231752dd16888729a94f323363fa0.tar.gz scummvm-rg350-91efe792d5b231752dd16888729a94f323363fa0.tar.bz2 scummvm-rg350-91efe792d5b231752dd16888729a94f323363fa0.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'backends/platform/dc/display.cpp')
-rw-r--r-- | backends/platform/dc/display.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index e4e9a94ec8..cc5798fc10 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -260,7 +260,7 @@ void OSystem_Dreamcast::initSize(uint w, uint h, const Graphics::PixelFormat *fo _devpoll = Timer(); } -void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int y, +void OSystem_Dreamcast::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { if (w<1 || h<1) @@ -269,10 +269,11 @@ void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int x<<=1; w<<=1; } unsigned char *dst = screen + y*SCREEN_W*2 + x; + const byte *src = (const byte *)buf; do { - memcpy(dst, buf, w); + memcpy(dst, src, w); dst += SCREEN_W*2; - buf += pitch; + src += pitch; } while (--h); _screen_dirty = true; } @@ -291,7 +292,7 @@ void OSystem_Dreamcast::warpMouse(int x, int y) _ms_cur_y = y; } -void OSystem_Dreamcast::setMouseCursor(const byte *buf, uint w, uint h, +void OSystem_Dreamcast::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { @@ -652,27 +653,29 @@ void OSystem_Dreamcast::clearOverlay() _overlay_dirty = true; } -void OSystem_Dreamcast::grabOverlay(OverlayColor *buf, int pitch) +void OSystem_Dreamcast::grabOverlay(void *buf, int pitch) { int h = OVL_H; unsigned short *src = overlay; + unsigned char *dst = (unsigned char *)buf; do { - memcpy(buf, src, OVL_W*sizeof(int16)); + memcpy(dst, src, OVL_W*sizeof(int16)); src += OVL_W; - buf += pitch; + dst += pitch; } while (--h); } -void OSystem_Dreamcast::copyRectToOverlay(const OverlayColor *buf, int pitch, +void OSystem_Dreamcast::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { if (w<1 || h<1) return; unsigned short *dst = overlay + y*OVL_W + x; + const unsigned char *src = (const unsigned char *)buf; do { - memcpy(dst, buf, w*sizeof(int16)); + memcpy(dst, src, w*sizeof(int16)); dst += OVL_W; - buf += pitch; + src += pitch; } while (--h); _overlay_dirty = true; } |