aboutsummaryrefslogtreecommitdiff
path: root/graphics/cursorman.h
diff options
context:
space:
mode:
authorJody Northup2009-06-26 08:50:11 +0000
committerJody Northup2009-06-26 08:50:11 +0000
commit2859c9130462e66df705d534f9a70d1430628be7 (patch)
tree4d35b05d92e7f0fb2de37e34a4530a81acde524a /graphics/cursorman.h
parentdc873f5e89f2622a8e4d3857a28971f30db932e0 (diff)
downloadscummvm-rg350-2859c9130462e66df705d534f9a70d1430628be7.tar.gz
scummvm-rg350-2859c9130462e66df705d534f9a70d1430628be7.tar.bz2
scummvm-rg350-2859c9130462e66df705d534f9a70d1430628be7.zip
Changed cursor manager functions to take *Graphics::PixelFormat with default parameter of NULL (and initialize NULL pointers with CLUT8), rather than taking a Graphics::PixelFormat with default parameter of Graphics::PixelFormat::createFormatCLUT8()
svn-id: r41900
Diffstat (limited to 'graphics/cursorman.h')
-rw-r--r--graphics/cursorman.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/graphics/cursorman.h b/graphics/cursorman.h
index 1ac711caec..2b2f34f952 100644
--- a/graphics/cursorman.h
+++ b/graphics/cursorman.h
@@ -61,7 +61,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 = 0xFFFFFFFF, int targetScale = 1, Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8());
+ void pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, Graphics::PixelFormat *format = NULL);
/**
* Pop a cursor from the stack, and restore the previous one to the
@@ -83,7 +83,7 @@ public:
* @param targetScale the scale for which the cursor is designed
* @param format the pixel format which the cursor graphic uses
*/
- void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8());
+ void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, Graphics::PixelFormat *format = NULL);
/**
* Pop all of the cursors and cursor palettes from their respective stacks.
@@ -154,11 +154,13 @@ private:
byte _targetScale;
uint _size;
- Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8()) {
+ Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, Graphics::PixelFormat *format = NULL) {
#ifdef ENABLE_RGB_COLOR
- _size = w * h * format.bytesPerPixel;
- _keycolor = keycolor & ((1 << (format.bytesPerPixel << 3)) - 1);
- _format = format;
+ if (!format)
+ format = new Graphics::PixelFormat(1,8,8,8,8,0,0,0,0);
+ _size = w * h * format->bytesPerPixel;
+ _keycolor &= ((1 << (format->bytesPerPixel << 3)) - 1);
+ _format = *format;
#else
_size = w * h;
_keycolor = keycolor & 0xFF;