diff options
author | Jody Northup | 2009-06-16 05:33:11 +0000 |
---|---|---|
committer | Jody Northup | 2009-06-16 05:33:11 +0000 |
commit | fb96e826f27b071d6696731f43cb5fa0d8760205 (patch) | |
tree | 8d7b4c0d1cc875fa623993818fde85c1b4569aae /graphics/cursorman.h | |
parent | 3d9d542908323c3d0ce545589e5532175eda9063 (diff) | |
download | scummvm-rg350-fb96e826f27b071d6696731f43cb5fa0d8760205.tar.gz scummvm-rg350-fb96e826f27b071d6696731f43cb5fa0d8760205.tar.bz2 scummvm-rg350-fb96e826f27b071d6696731f43cb5fa0d8760205.zip |
Simplified cursor related 16-bit code.
svn-id: r41577
Diffstat (limited to 'graphics/cursorman.h')
-rw-r--r-- | graphics/cursorman.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/graphics/cursorman.h b/graphics/cursorman.h index 08da3ac802..32f1b90f3e 100644 --- a/graphics/cursorman.h +++ b/graphics/cursorman.h @@ -60,11 +60,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. */ -#ifdef ENABLE_16BIT void pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1); -#else - void pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255, int targetScale = 1); -#endif /** * Pop a cursor from the stack, and restore the previous one to the @@ -85,11 +81,7 @@ public: * @param keycolor the index for the transparent color * @param targetScale the scale for which the cursor is designed */ -#ifdef ENABLE_16BIT void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1); -#else - void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255, int targetScale = 1); -#endif /** * Pop all of the cursors and cursor palettes from their respective stacks. @@ -178,26 +170,22 @@ private: uint _height; int _hotspotX; int _hotspotY; -//#ifdef ENABLE_16BIT uint32 _keycolor; -//#else -// byte _keycolor; -//#endif + byte _targetScale; uint _size; -#ifdef ENABLE_16BIT Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, uint8 bitDepth = 8) { +#ifdef ENABLE_16BIT { //limit the lifespan of the format value to minimize impact on memory usage Graphics::PixelFormat f = g_system->getScreenFormat(); _size = w * h * f.bytesPerPixel; _keycolor = keycolor & ((1 << (f.bytesPerPixel << 3)) - 1); } #else - Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255, int targetScale = 1) { _size = w * h; - _keycolor = keycolor; + _keycolor = keycolor & 0xFF; #endif _data = new byte[_size]; if (data && _data) |