diff options
Diffstat (limited to 'backends')
26 files changed, 34 insertions, 34 deletions
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h index 056e894a46..9fde5cfaf2 100644 --- a/backends/graphics/graphics.h +++ b/backends/graphics/graphics.h @@ -80,7 +80,7 @@ public: virtual bool showMouse(bool visible) = 0; virtual void warpMouse(int x, int y) = 0; - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; virtual void setCursorPalette(const byte *colors, uint start, uint num) = 0; virtual void displayMessageOnOSD(const char *msg) {} diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h index 6ffe2e8286..30b1946a77 100644 --- a/backends/graphics/null/null-graphics.h +++ b/backends/graphics/null/null-graphics.h @@ -78,7 +78,7 @@ public: bool showMouse(bool visible) { return !visible; } void warpMouse(int x, int y) {} - void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) {} + void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) {} void setCursorPalette(const byte *colors, uint start, uint num) {} }; diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 033814a4b5..ed63916551 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -591,7 +591,7 @@ void OpenGLGraphicsManager::warpMouse(int x, int y) { setInternalMousePosition(scaledX, scaledY); } -void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (format) _cursorFormat = *format; diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 350ffa5f34..b2f78187dc 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -104,7 +104,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual void displayMessageOnOSD(const char *msg); diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 9244135262..cdbe6293e4 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -1715,7 +1715,7 @@ void SurfaceSdlGraphicsManager::warpMouse(int x, int y) { } } -void SurfaceSdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void SurfaceSdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (!format) _cursorFormat = Graphics::PixelFormat::createFormatCLUT8(); diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h index f2b2d7b239..f387c213fb 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.h +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h @@ -131,7 +131,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); #ifdef USE_OSD diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index 2315c582e2..13d52bcd25 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -1129,7 +1129,7 @@ void WINCESdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int x SDL_UnlockSurface(_screen); } -void WINCESdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void WINCESdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { undrawMouse(); if (w == 0 || h == 0) diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index 26067f0c02..33bf7e7880 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -73,7 +73,7 @@ public: void internDrawMouse(); void undrawMouse(); bool showMouse(bool visible); - void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend + void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) Graphics::Surface *lockScreen(); diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp index 2b4087634d..3c26d5afee 100644 --- a/backends/modular-backend.cpp +++ b/backends/modular-backend.cpp @@ -195,7 +195,7 @@ void ModularBackend::warpMouse(int x, int y) { _graphicsManager->warpMouse(x, y); } -void ModularBackend::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void ModularBackend::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { _graphicsManager->setMouseCursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format); } diff --git a/backends/modular-backend.h b/backends/modular-backend.h index fd4aca2e4d..400102428b 100644 --- a/backends/modular-backend.h +++ b/backends/modular-backend.h @@ -100,7 +100,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); //@} diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index bf66270a7a..ce51baec3d 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -267,7 +267,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index a40a9e2ee9..1241667533 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -685,7 +685,7 @@ bool OSystem_Android::showMouse(bool visible) { return true; } -void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h, +void OSystem_Android::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { @@ -741,7 +741,7 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h, byte *tmp = new byte[pitch * h]; // meh, a 16bit cursor without alpha bits... this is so silly - if (!crossBlit(tmp, buf, pitch, w * 2, w, h, + if (!crossBlit(tmp, (const byte *)buf, pitch, w * 2, w, h, _mouse_texture->getPixelFormat(), *format)) { LOGE("crossblit failed"); diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 95cb88c44b..aa2a3709cb 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -142,7 +142,7 @@ public: void warpMouse(int x, int y); // Set the bitmap that's used when drawing the cursor. - void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // Replace the specified range of cursor the palette with new colors. void setCursorPalette(const byte *colors, uint start, uint num); diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index 264b86646c..35e7b70a82 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -292,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) { diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index f91342a6ce..b4bf38c45b 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -580,7 +580,7 @@ bool OSystem_DS::showMouse(bool visible) { void OSystem_DS::warpMouse(int x, int y) { } -void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_DS::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if ((w > 0) && (w < 64) && (h > 0) && (h < 64)) { memcpy(_cursorImage, buf, w * h); _cursorW = w; diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 789053e522..d35b16c8fd 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -114,7 +114,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format); virtual bool pollEvent(Common::Event &event); virtual uint32 getMillis(); diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h index da3864e0df..b15b5e0375 100644 --- a/backends/platform/iphone/osys_main.h +++ b/backends/platform/iphone/osys_main.h @@ -161,7 +161,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 255, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 255, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual bool pollEvent(Common::Event &event); diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm index 387d91ff57..1649956a6c 100644 --- a/backends/platform/iphone/osys_video.mm +++ b/backends/platform/iphone/osys_video.mm @@ -399,7 +399,7 @@ void OSystem_IPHONE::dirtyFullOverlayScreen() { } } -void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_IPHONE::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { //printf("setMouseCursor(%p, %u, %u, %i, %i, %u, %d, %p)\n", (const void *)buf, w, h, hotspotX, hotspotY, keycolor, dontScale, (const void *)format); const Graphics::PixelFormat pixelFormat = format ? *format : Graphics::PixelFormat::createFormatCLUT8(); diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index 8e28dc9c98..121f84f93f 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -182,7 +182,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual bool pollEvent(Common::Event &event); diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index d8956404f5..b526c68762 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -774,7 +774,7 @@ void OSystem_N64::warpMouse(int x, int y) { _dirtyOffscreen = true; } -void OSystem_N64::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_N64::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if (!w || !h) return; _mouseHotspotX = hotspotX; diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index 9413c55062..a639725d78 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -618,8 +618,8 @@ void OSystem_PS2::warpMouse(int x, int y) { _screen->setMouseXy(x, y); } -void OSystem_PS2::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { - _screen->setMouseOverlay(buf, w, h, hotspot_x, hotspot_y, keycolor); +void OSystem_PS2::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { + _screen->setMouseOverlay((const byte *)buf, w, h, hotspot_x, hotspot_y, keycolor); } void OSystem_PS2::showOverlay(void) { diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h index d167988334..efbe7d5f93 100644 --- a/backends/platform/ps2/systemps2.h +++ b/backends/platform/ps2/systemps2.h @@ -80,7 +80,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = 0); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = 0); virtual uint32 getMillis(); virtual void delayMillis(uint msecs); diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 46e11b1bf7..3fe9a7f9c7 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -303,7 +303,7 @@ void OSystem_PSP::warpMouse(int x, int y) { _cursor.setXY(x, y); } -void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_PSP::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { DEBUG_ENTER_FUNC(); _displayManager.waitUntilRenderFinished(); _pendingUpdate = false; @@ -320,7 +320,7 @@ void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, _cursor.setSizeAndScummvmPixelFormat(w, h, format); _cursor.setHotspot(hotspotX, hotspotY); _cursor.clearKeyColor(); - _cursor.copyFromArray(buf); + _cursor.copyFromArray((const byte *)buf); } bool OSystem_PSP::pollEvent(Common::Event &event) { diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index af01b6f6c8..d167c757ae 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -118,7 +118,7 @@ public: // Mouse related bool showMouse(bool visible); void warpMouse(int x, int y); - void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // Events and input bool pollEvent(Common::Event &event); diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index 75c19e6f1b..ecd69178bb 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -187,7 +187,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index c2b6553bac..741acd4f4a 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -643,7 +643,7 @@ void OSystem_Wii::warpMouse(int x, int y) { _mouseY = y; } -void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, +void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { @@ -686,7 +686,7 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, tmpBuf = true; if (!tmpBuf) { - gfx_tex_convert(&_texMouse, buf); + gfx_tex_convert(&_texMouse, (const byte *)buf); } else { u8 bpp = _texMouse.bpp >> 3; byte *tmp = (byte *) malloc(tw * th * bpp); @@ -703,7 +703,7 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, #ifdef USE_RGB_COLOR if (bpp > 1) { - if (!Graphics::crossBlit(tmp, buf, + if (!Graphics::crossBlit(tmp, (const byte *)buf, tw * _pfRGB3444.bytesPerPixel, w * _pfCursor.bytesPerPixel, tw, th, _pfRGB3444, _pfCursor)) { @@ -727,10 +727,10 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, } else { #endif byte *dst = tmp; - + const byte *src = (const byte *)buf; do { - memcpy(dst, buf, w * bpp); - buf += w * bpp; + memcpy(dst, src, w * bpp); + src += w * bpp; dst += tw * bpp; } while (--h); #ifdef USE_RGB_COLOR |