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.cpp | |
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.cpp')
-rw-r--r-- | graphics/cursorman.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp index e5a86b6bd8..6446216867 100644 --- a/graphics/cursorman.cpp +++ b/graphics/cursorman.cpp @@ -57,11 +57,7 @@ bool CursorManager::showMouse(bool visible) { return g_system->showMouse(visible); } -#ifdef ENABLE_16BIT void CursorManager::pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale) { -#else -void CursorManager::pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int targetScale) { -#endif Cursor *cur = new Cursor(buf, w, h, hotspotX, hotspotY, keycolor, targetScale); cur->_visible = isVisible(); @@ -111,11 +107,7 @@ void CursorManager::popAllCursors() { g_system->showMouse(isVisible()); } -#ifdef ENABLE_16BIT void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale) { -#else -void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int targetScale) { -#endif if (_cursorStack.empty()) { pushCursor(buf, w, h, hotspotX, hotspotY, keycolor, targetScale); @@ -125,11 +117,7 @@ void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, Cursor *cur = _cursorStack.top(); #ifdef ENABLE_16BIT - uint size; - { //limit the lifespan of the format variable to minimize memory impact - Graphics::PixelFormat f = g_system->getScreenFormat(); - size = w * h * (f.bytesPerPixel); - } + uint size = w * h * g_system->getScreenFormat().bytesPerPixel; #else uint size = w * h; #endif |