aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorJohannes Schickel2012-06-20 08:02:26 -0700
committerJohannes Schickel2012-06-20 08:02:26 -0700
commit4fb9bceabc4309a477472aa55207eae55bc0aa13 (patch)
tree1e119f6d63d0a4c5c38a7caabd92be335749f07d /graphics
parent5a2e65469f3650dc9785bf27b77d25d285ded4f1 (diff)
parentaec9b9e22a9bff54ae3c39bb796bae0f4b4c2d95 (diff)
downloadscummvm-rg350-4fb9bceabc4309a477472aa55207eae55bc0aa13.tar.gz
scummvm-rg350-4fb9bceabc4309a477472aa55207eae55bc0aa13.tar.bz2
scummvm-rg350-4fb9bceabc4309a477472aa55207eae55bc0aa13.zip
Merge pull request #246 from lordhoto/osystem-void-buffers
OSYSTEM: Use void buffers for screen/overlay/mouse buffers and proper pitch values for overlay code
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRendererSpec.cpp4
-rw-r--r--graphics/cursorman.cpp6
-rw-r--r--graphics/cursorman.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 7817725664..1ed5a3308a 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -422,8 +422,8 @@ void VectorRendererSpec<PixelType>::
copyFrame(OSystem *sys, const Common::Rect &r) {
sys->copyRectToOverlay(
- (const OverlayColor *)_activeSurface->getBasePtr(r.left, r.top),
- _activeSurface->pitch / _activeSurface->format.bytesPerPixel,
+ _activeSurface->getBasePtr(r.left, r.top),
+ _activeSurface->pitch,
r.left, r.top, r.width(), r.height()
);
}
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index 825b5c2e19..c818101645 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -55,7 +55,7 @@ bool CursorManager::showMouse(bool visible) {
return g_system->showMouse(visible);
}
-void CursorManager::pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
+void CursorManager::pushCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
Cursor *cur = new Cursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format);
cur->_visible = isVisible();
@@ -98,7 +98,7 @@ void CursorManager::popAllCursors() {
g_system->showMouse(isVisible());
}
-void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
+void CursorManager::replaceCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
if (_cursorStack.empty()) {
pushCursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format);
@@ -225,7 +225,7 @@ void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint nu
}
}
-CursorManager::Cursor::Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
+CursorManager::Cursor::Cursor(const void *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
#ifdef USE_RGB_COLOR
if (!format)
_format = Graphics::PixelFormat::createFormatCLUT8();
diff --git a/graphics/cursorman.h b/graphics/cursorman.h
index 852109d7e6..66e8d1ba56 100644
--- a/graphics/cursorman.h
+++ b/graphics/cursorman.h
@@ -71,7 +71,7 @@ public:
* useful to push a "dummy" cursor and modify it later. The
* cursor will be added to the stack, but not to the backend.
*/
- void pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
+ void pushCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
/**
* Pop a cursor from the stack, and restore the previous one to the
@@ -96,7 +96,7 @@ public:
* @param format a pointer to the pixel format which the cursor graphic uses,
* CLUT8 will be used if this is NULL or not specified.
*/
- void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
+ void replaceCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
/**
* Pop all of the cursors and cursor palettes from their respective stacks.
@@ -181,7 +181,7 @@ private:
uint _size;
- Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
+ Cursor(const void *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL);
~Cursor();
};