diff options
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 28 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 2 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 12 | ||||
-rw-r--r-- | base/main.cpp | 2 | ||||
-rw-r--r-- | common/error.h | 2 | ||||
-rw-r--r-- | common/system.h | 6 | ||||
-rw-r--r-- | dists/msvc8/gob.vcproj | 2 | ||||
-rw-r--r-- | dists/msvc8/scumm.vcproj | 2 | ||||
-rw-r--r-- | dists/msvc8/scummvm.vcproj | 2 | ||||
-rw-r--r-- | engines/engine.cpp | 6 | ||||
-rw-r--r-- | engines/engine.h | 4 | ||||
-rw-r--r-- | engines/scumm/cursor.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | graphics/cursorman.cpp | 6 | ||||
-rw-r--r-- | graphics/cursorman.h | 8 | ||||
-rw-r--r-- | graphics/pixelformat.h | 4 | ||||
-rw-r--r-- | gui/GuiManager.cpp | 6 | ||||
-rw-r--r-- | gui/ThemeEngine.cpp | 8 | ||||
-rw-r--r-- | gui/ThemeEngine.h | 2 |
19 files changed, 52 insertions, 54 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index f4269b55b2..a08239d472 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -97,7 +97,7 @@ void OSystem_SDL::beginGFXTransaction(void) { _transactionDetails.needUpdatescreen = false; _transactionDetails.normal1xScaler = false; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _transactionDetails.formatChanged = false; #endif @@ -123,7 +123,7 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) { _videoMode.mode = _oldVideoMode.mode; _videoMode.scaleFactor = _oldVideoMode.scaleFactor; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR } else if (_videoMode.format != _oldVideoMode.format) { errors |= kTransactionPixelFormatNotSupported; @@ -153,7 +153,7 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) { } } -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR if (_transactionDetails.sizeChanged || _transactionDetails.formatChanged) { #else if (_transactionDetails.sizeChanged) { @@ -353,7 +353,7 @@ int OSystem_SDL::getGraphicsMode() const { assert (_transactionMode == kTransactionNone); return _videoMode.mode; } -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR void OSystem_SDL::initFormat(Graphics::PixelFormat format) { assert(_transactionMode == kTransactionActive); @@ -411,7 +411,7 @@ bool OSystem_SDL::loadGFXMode() { // // Create the surface that contains the 8 bit game data // -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight, _screenFormat.bytesPerPixel << 3, ((1 << _screenFormat.rBits()) - 1) << _screenFormat.rShift , @@ -871,7 +871,7 @@ void OSystem_SDL::copyRectToScreen(const byte *src, int pitch, int x, int y, int if (SDL_LockSurface(_screen) == -1) error("SDL_LockSurface failed: %s", SDL_GetError()); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR byte *dst = (byte *)_screen->pixels + y * _videoMode.screenWidth * _screenFormat.bytesPerPixel + x * _screenFormat.bytesPerPixel; if (_videoMode.screenWidth == w && pitch == w * _screenFormat.bytesPerPixel) { memcpy(dst, src, h*w*_screenFormat.bytesPerPixel); @@ -917,7 +917,7 @@ Graphics::Surface *OSystem_SDL::lockScreen() { _framebuffer.w = _screen->w; _framebuffer.h = _screen->h; _framebuffer.pitch = _screen->pitch; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _framebuffer.bytesPerPixel = _screenFormat.bytesPerPixel; #else _framebuffer.bytesPerPixel = 1; @@ -1105,7 +1105,7 @@ int16 OSystem_SDL::getWidth() { void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) { assert(colors); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR if (_screenFormat.bytesPerPixel > 1) return; //not using a paletted pixel format #endif @@ -1163,7 +1163,7 @@ void OSystem_SDL::setCursorPalette(const byte *colors, uint start, uint num) { } _cursorPaletteDisabled = false; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR } void OSystem_SDL::setCursorFormat(Graphics::PixelFormat format) { @@ -1380,7 +1380,7 @@ void OSystem_SDL::warpMouse(int x, int y) { } void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR keycolor &= (1 << (_cursorFormat.bytesPerPixel << 3)) - 1; #else keycolor &= 0xFF; @@ -1419,7 +1419,7 @@ void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, } free(_mouseData); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _mouseData = (byte *)malloc(w * h * _cursorFormat.bytesPerPixel); memcpy(_mouseData, buf, w * h * _cursorFormat.bytesPerPixel); #else @@ -1433,7 +1433,7 @@ void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, void OSystem_SDL::blitCursor() { byte *dstPtr; const byte *srcPtr = _mouseData; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR uint32 color; uint32 colormask = (1 << (_cursorFormat.bytesPerPixel << 3)) - 1; #else @@ -1472,7 +1472,7 @@ void OSystem_SDL::blitCursor() { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR if (_cursorFormat.bytesPerPixel > 1) { color = (*(uint32 *) srcPtr) & colormask; if (color != _mouseKeyColor) { // transparent, don't draw @@ -1492,7 +1492,7 @@ void OSystem_SDL::blitCursor() { } dstPtr += 2; srcPtr++; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR } #endif } diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 17ee5941a4..3f9b81a912 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -196,7 +196,7 @@ OSystem_SDL::OSystem_SDL() _osdSurface(0), _osdAlpha(SDL_ALPHA_TRANSPARENT), _osdFadeStartTime(0), #endif _hwscreen(0), _screen(0), _tmpscreen(0), -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _screenFormat(Graphics::PixelFormat::createFormatCLUT8()), _cursorFormat(Graphics::PixelFormat::createFormatCLUT8()), #endif diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 2cb9451a0d..aee15fcbd0 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -81,7 +81,7 @@ public: void beginGFXTransaction(void); TransactionError endGFXTransaction(void); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR // Set the depth and format of the video bitmap // Typically, CLUT8 virtual void initFormat(Graphics::PixelFormat format); @@ -92,7 +92,6 @@ public: // Highest supported virtual Graphics::PixelFormat getBestFormat() const { //TODO scale down 16/32 bit based on hardware support -#if (defined ENABLE_32BIT) || (defined ENABLE_16BIT) { SDL_PixelFormat *HWFormat = SDL_GetVideoInfo()->vfmt; #ifdef ENABLE_32BIT @@ -105,7 +104,6 @@ public: if (HWFormat->BitsPerPixel >= 16) return Graphics::PixelFormat::createFormatRGB565(); } -#endif //ENABLE_32BIT or ENABLE_16BIT return Graphics::PixelFormat::createFormatCLUT8(); } #endif @@ -142,7 +140,7 @@ public: // Set the bitmap that's used when drawing the cursor. virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale); // overloaded by CE backend (FIXME) -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR virtual void setCursorFormat(Graphics::PixelFormat format); #endif @@ -260,7 +258,7 @@ protected: // unseen game screen SDL_Surface *_screen; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat _screenFormat; Graphics::PixelFormat _cursorFormat; #endif @@ -297,7 +295,7 @@ protected: bool needHotswap; bool needUpdatescreen; bool normal1xScaler; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR bool formatChanged; #endif }; @@ -314,7 +312,7 @@ protected: int screenWidth, screenHeight; int overlayWidth, overlayHeight; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat format; #endif }; diff --git a/base/main.cpp b/base/main.cpp index 56db1a4276..3bbe6ddd9c 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -226,7 +226,7 @@ static void setupGraphics(OSystem &system) { // Set the user specified graphics mode (if any). system.setGraphicsMode(ConfMan.get("gfx_mode").c_str()); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR system.initFormat(Graphics::PixelFormat::createFormatCLUT8()); #endif system.initSize(320, 200); diff --git a/common/error.h b/common/error.h index 8959a6ae23..6522fbf4af 100644 --- a/common/error.h +++ b/common/error.h @@ -48,7 +48,7 @@ enum Error { kInvalidPathError, //!< Engine initialization: Invalid game path was passed kNoGameDataFoundError, //!< Engine initialization: No game data was found in the specified location kUnsupportedGameidError, //!< Engine initialization: Gameid not supported by this (Meta)Engine -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR kUnsupportedColorMode, //!< Engine initialization: Engine does not support backend's color mode #endif diff --git a/common/system.h b/common/system.h index 7df4a124e3..6846b7b9dd 100644 --- a/common/system.h +++ b/common/system.h @@ -343,7 +343,7 @@ public: */ virtual int getGraphicsMode() const = 0; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR /** * Set the color format of the virtual screen. Typical formats include: * CLUT8 (e.g. 256 color, for most games) @@ -436,7 +436,7 @@ public: kTransactionAspectRatioFailed = (1 << 0), /**< Failed switchting aspect ratio correction mode */ kTransactionFullscreenFailed = (1 << 1), /**< Failed switchting fullscreen mode */ kTransactionModeSwitchFailed = (1 << 2), /**< Failed switchting the GFX graphics mode (setGraphicsMode) */ -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR kTransactionPixelFormatNotSupported = (1 << 4), /**< Failed setting the color format (function not yet implemented) */ #endif kTransactionSizeChangeFailed = (1 << 3) /**< Failed switchting the screen dimensions (initSize) */ @@ -720,7 +720,7 @@ public: * @param cursorTargetScale scale factor which cursor is designed for */ virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int cursorTargetScale = 1) = 0; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR virtual void setCursorFormat(Graphics::PixelFormat format) = 0; #endif diff --git a/dists/msvc8/gob.vcproj b/dists/msvc8/gob.vcproj index 9016140453..2b2fca62fc 100644 --- a/dists/msvc8/gob.vcproj +++ b/dists/msvc8/gob.vcproj @@ -43,7 +43,7 @@ Optimization="0" InlineFunctionExpansion="0" AdditionalIncludeDirectories="../../;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS;ENABLE_16BIT" + PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS;ENABLE_RGB_COLOR" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" diff --git a/dists/msvc8/scumm.vcproj b/dists/msvc8/scumm.vcproj index 006c1e3078..63d7e5ddf3 100644 --- a/dists/msvc8/scumm.vcproj +++ b/dists/msvc8/scumm.vcproj @@ -43,7 +43,7 @@ Optimization="0" InlineFunctionExpansion="0" AdditionalIncludeDirectories="../../;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS;ENABLE_16BIT" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS;ENABLE_RGB_COLOR" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index 8c345596ae..5eca2b2009 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -43,7 +43,7 @@ Optimization="0" InlineFunctionExpansion="0" AdditionalIncludeDirectories="../../;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE;ENABLE_16BIT" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCI;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE;ENABLE_TINSEL;ENABLE_TUCKER;ENABLE_GROOVIE;ENABLE_RGB_COLOR" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" diff --git a/engines/engine.cpp b/engines/engine.cpp index fdf0186a89..15c6820f22 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -125,7 +125,7 @@ void initCommonGFX(bool defaultTo1XScaler) { g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); } void initGraphics(int width, int height, bool defaultTo1xScaler) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR initGraphics(width,height,defaultTo1xScaler, Graphics::PixelFormat::createFormatCLUT8()); } void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format) { @@ -134,7 +134,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::Pixel g_system->beginGFXTransaction(); initCommonGFX(defaultTo1xScaler); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR g_system->initFormat(format); #endif g_system->initSize(width, height); @@ -158,7 +158,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::Pixel } // Just show warnings then these occur: -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR if (gfxError & OSystem::kTransactionPixelFormatNotSupported) { Common::String message = "Could not initialize color format."; diff --git a/engines/engine.h b/engines/engine.h index 1ea1b70b5d..864450d6e1 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -29,7 +29,7 @@ #include "common/error.h" #include "common/fs.h" #include "common/str.h" -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR #include "graphics/pixelformat.h" #endif @@ -62,7 +62,7 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format); #endif void initGraphics(int width, int height, bool defaultTo1xScaler); diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 30483a638c..5c695e58a5 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -112,7 +112,7 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.replaceCursorFormat(_system->getScreenFormat()); #endif CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 75a03aae0f..cab8db2d45 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1084,7 +1084,7 @@ Common::Error ScummEngine::init() { // there is no text surface for them. This takes that into account (_screenWidth * _textSurfaceMultiplier > 320)); } else if (_game.features & GF_16BIT_COLOR) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat format = Graphics::PixelFormat::createFormatRGB555(); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, format); if (format != _system->getScreenFormat()) diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp index 6446216867..865c7515f0 100644 --- a/graphics/cursorman.cpp +++ b/graphics/cursorman.cpp @@ -97,7 +97,7 @@ void CursorManager::popAllCursors() { } } -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR while (!_cursorFormatStack.empty()) { PixelFormat *form = _cursorFormatStack.pop(); delete form; @@ -116,7 +116,7 @@ void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, Cursor *cur = _cursorStack.top(); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR uint size = w * h * g_system->getScreenFormat().bytesPerPixel; #else uint size = w * h; @@ -220,7 +220,7 @@ void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint nu } } -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR void CursorManager::pushCursorFormat(PixelFormat format) { // if (!g_system->hasFeature(OSystem::kFeatureCursorHasPalette)) // return; diff --git a/graphics/cursorman.h b/graphics/cursorman.h index 32f1b90f3e..b28145d932 100644 --- a/graphics/cursorman.h +++ b/graphics/cursorman.h @@ -28,7 +28,7 @@ #include "common/scummsys.h" #include "common/stack.h" #include "common/singleton.h" -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR #include "graphics/pixelformat.h" #include "common/system.h" #endif @@ -134,7 +134,7 @@ public: */ void replaceCursorPalette(const byte *colors, uint start, uint num); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR /** * Push a new cursor pixel format onto the stack, and set it in the backend. * @@ -177,7 +177,7 @@ private: uint _size; Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 0xFFFFFFFF, int targetScale = 1, uint8 bitDepth = 8) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR { //limit the lifespan of the format value to minimize impact on memory usage Graphics::PixelFormat f = g_system->getScreenFormat(); _size = w * h * f.bytesPerPixel; @@ -231,7 +231,7 @@ private: }; Common::Stack<Cursor *> _cursorStack; Common::Stack<Palette *> _cursorPaletteStack; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Common::Stack<Graphics::PixelFormat *> _cursorFormatStack; #endif }; diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index 4ad1f8b400..7f7f2412cb 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -70,7 +70,7 @@ struct PixelFormat { static inline PixelFormat createFormatCLUT8() { return PixelFormat(1,8,8,8,8,0,0,0,0); } -#if (defined ENABLE_16BIT) || (defined ENABLE_32BIT) //TODO: more generic define instead of ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR //2 Bytes-per-pixel modes static inline PixelFormat createFormatRGB555() { return PixelFormat(2,3,3,3,8,10,5,0,0); @@ -94,7 +94,7 @@ struct PixelFormat { return PixelFormat(4,0,0,0,0,24,16,8,0); } #endif //ENABLE_32BIT -#endif //ENABLE_16BIT or ENABLE_32BIT +#endif //ENABLE_RGB_COLOR inline bool operator==(const PixelFormat &fmt) const { // TODO: If aLoss==8, then the value of aShift is irrelevant, and should be ignored. diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp index fcfc02967e..8e161f3e60 100644 --- a/gui/GuiManager.cpp +++ b/gui/GuiManager.cpp @@ -135,7 +135,7 @@ bool GuiManager::loadNewTheme(Common::String id, ThemeEngine::GraphicsMode gfx) delete _theme; if (_useStdCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.popCursorFormat(); #endif CursorMan.popCursorPalette(); @@ -385,7 +385,7 @@ void GuiManager::saveState() { void GuiManager::restoreState() { if (_useStdCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.popCursorFormat(); #endif CursorMan.popCursor(); @@ -430,7 +430,7 @@ void GuiManager::setupCursor() { 87, 87, 87, 0 }; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat format; format.bytesPerPixel = 1; format.rLoss = format.gLoss = format.bLoss = format.aLoss = 8; diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index d8e368581c..70b295b989 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -434,7 +434,7 @@ void ThemeEngine::refresh() { _system->showOverlay(); if (_useCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.replaceCursorFormat(_cursorFormat); #endif CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize); @@ -448,7 +448,7 @@ void ThemeEngine::enable() { return; if (_useCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.pushCursorFormat(_cursorFormat); #endif CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize); @@ -468,7 +468,7 @@ void ThemeEngine::disable() { _system->hideOverlay(); if (_useCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.popCursorFormat(); #endif CursorMan.popCursorPalette(); @@ -1174,7 +1174,7 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int if (!cursor) return false; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _cursorFormat.bytesPerPixel = 1; _cursorFormat.rLoss = _cursorFormat.gLoss = _cursorFormat.bLoss = _cursorFormat.aLoss = 8; _cursorFormat.rShift = _cursorFormat.gShift = _cursorFormat.bShift = _cursorFormat.aShift = 0; diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 2a7bbcc6ce..74af16f09f 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -579,7 +579,7 @@ protected: ImagesMap _bitmaps; Graphics::PixelFormat _overlayFormat; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat _cursorFormat; #endif |