diff options
author | Andre Heider | 2009-08-21 18:16:37 +0000 |
---|---|---|
committer | Andre Heider | 2009-08-21 18:16:37 +0000 |
commit | 007f68366fd55a519753bf533c7c3a80db3754f0 (patch) | |
tree | d25cade63a148fdd6b2190151e8e1f5c87a73ef3 /backends | |
parent | c0d954334547c166b52b37199ad877bc7e5ac2b0 (diff) | |
download | scummvm-rg350-007f68366fd55a519753bf533c7c3a80db3754f0.tar.gz scummvm-rg350-007f68366fd55a519753bf533c7c3a80db3754f0.tar.bz2 scummvm-rg350-007f68366fd55a519753bf533c7c3a80db3754f0.zip |
Renamed ENABLE_RGB_COLOR to USE_RGB_COLOR, and added it to config.h to guarantee a consistent build.
svn-id: r43604
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/gp2x/graphics.cpp | 12 | ||||
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 30 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 2 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 8 |
4 files changed, 26 insertions, 26 deletions
diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp index d948cb82d3..cf874323e0 100644 --- a/backends/platform/gp2x/graphics.cpp +++ b/backends/platform/gp2x/graphics.cpp @@ -243,7 +243,7 @@ int OSystem_GP2X::getGraphicsMode() const { void OSystem_GP2X::initSize(uint w, uint h, const Graphics::PixelFormat *format) { assert(_transactionMode == kTransactionActive); -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR //avoid redundant format changes Graphics::PixelFormat newFormat; if (!format) @@ -1231,7 +1231,7 @@ void OSystem_GP2X::warpMouse(int x, int y) { } void OSystem_GP2X::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (!format) _cursorFormat = Graphics::PixelFormat::createFormatCLUT8(); else if (format->bytesPerPixel <= _screenFormat.bytesPerPixel) @@ -1274,7 +1274,7 @@ void OSystem_GP2X::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x } free(_mouseData); -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR _mouseData = (byte *)malloc(w * h * _cursorFormat.bytesPerPixel); memcpy(_mouseData, buf, w * h * _cursorFormat.bytesPerPixel); #else @@ -1288,7 +1288,7 @@ void OSystem_GP2X::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x void OSystem_GP2X::blitCursor() { byte *dstPtr; const byte *srcPtr = _mouseData; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR uint32 color; uint32 colormask = (1 << (_cursorFormat.bytesPerPixel << 3)) - 1; #else @@ -1327,7 +1327,7 @@ void OSystem_GP2X::blitCursor() { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (_cursorFormat.bytesPerPixel > 1) { color = (*(uint32 *) srcPtr) & colormask; if (color != _mouseKeyColor) { // transparent, don't draw @@ -1347,7 +1347,7 @@ void OSystem_GP2X::blitCursor() { } dstPtr += 2; srcPtr++; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR } #endif } diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 3bfe8f5c98..d3a37f4de7 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -26,7 +26,7 @@ #include "backends/platform/sdl/sdl.h" #include "common/mutex.h" #include "common/util.h" -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR #include "common/list.h" #endif #include "graphics/font.h" @@ -100,7 +100,7 @@ void OSystem_SDL::beginGFXTransaction(void) { _transactionDetails.needUpdatescreen = false; _transactionDetails.normal1xScaler = false; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR _transactionDetails.formatChanged = false; #endif @@ -126,7 +126,7 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) { _videoMode.mode = _oldVideoMode.mode; _videoMode.scaleFactor = _oldVideoMode.scaleFactor; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR } else if (_videoMode.format != _oldVideoMode.format) { errors |= kTransactionFormatNotSupported; @@ -156,7 +156,7 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) { } } -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (_transactionDetails.sizeChanged || _transactionDetails.formatChanged) { #else if (_transactionDetails.sizeChanged) { @@ -209,7 +209,7 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) { return (TransactionError)errors; } -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR const Graphics::PixelFormat RGBList[] = { #ifdef ENABLE_32BIT // RGBA8888, ARGB8888, RGB888 @@ -442,7 +442,7 @@ int OSystem_SDL::getGraphicsMode() const { void OSystem_SDL::initSize(uint w, uint h, const Graphics::PixelFormat *format) { assert(_transactionMode == kTransactionActive); -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR //avoid redundant format changes Graphics::PixelFormat newFormat; if (!format) @@ -543,7 +543,7 @@ bool OSystem_SDL::loadGFXMode() { // // Create the surface that contains the 8 bit game data // -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight, _screenFormat.bytesPerPixel << 3, ((1 << _screenFormat.rBits()) - 1) << _screenFormat.rShift , @@ -1007,7 +1007,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_RGB_COLOR +#ifdef USE_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); @@ -1053,7 +1053,7 @@ Graphics::Surface *OSystem_SDL::lockScreen() { _framebuffer.w = _screen->w; _framebuffer.h = _screen->h; _framebuffer.pitch = _screen->pitch; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR _framebuffer.bytesPerPixel = _screenFormat.bytesPerPixel; #else _framebuffer.bytesPerPixel = 1; @@ -1241,7 +1241,7 @@ int16 OSystem_SDL::getWidth() { void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) { assert(colors); -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (_screenFormat.bytesPerPixel > 1) return; //not using a paletted pixel format #endif @@ -1508,7 +1508,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, const Graphics::PixelFormat *format) { -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (!format) _cursorFormat = Graphics::PixelFormat::createFormatCLUT8(); else if (format->bytesPerPixel <= _screenFormat.bytesPerPixel) @@ -1551,7 +1551,7 @@ void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, } free(_mouseData); -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR _mouseData = (byte *)malloc(w * h * _cursorFormat.bytesPerPixel); memcpy(_mouseData, buf, w * h * _cursorFormat.bytesPerPixel); #else @@ -1565,7 +1565,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_RGB_COLOR +#ifdef USE_RGB_COLOR uint32 color; uint32 colormask = (1 << (_cursorFormat.bytesPerPixel << 3)) - 1; #else @@ -1604,7 +1604,7 @@ void OSystem_SDL::blitCursor() { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (_cursorFormat.bytesPerPixel > 1) { color = (*(uint32 *) srcPtr) & colormask; if (color != _mouseKeyColor) { // transparent, don't draw @@ -1624,7 +1624,7 @@ void OSystem_SDL::blitCursor() { } dstPtr += 2; srcPtr++; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR } #endif } diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index b6b46af9d7..7c1107582b 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -222,7 +222,7 @@ OSystem_SDL::OSystem_SDL() _osdSurface(0), _osdAlpha(SDL_ALPHA_TRANSPARENT), _osdFadeStartTime(0), #endif _hwscreen(0), _screen(0), _tmpscreen(0), -#ifdef ENABLE_RGB_COLOR +#ifdef USE_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 09213ad417..3da9a433b7 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -93,7 +93,7 @@ public: void beginGFXTransaction(void); TransactionError endGFXTransaction(void); -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR // Game screen virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; } @@ -248,7 +248,7 @@ protected: // unseen game screen SDL_Surface *_screen; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR Graphics::PixelFormat _screenFormat; Graphics::PixelFormat _cursorFormat; #endif @@ -285,7 +285,7 @@ protected: bool needHotswap; bool needUpdatescreen; bool normal1xScaler; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR bool formatChanged; #endif }; @@ -304,7 +304,7 @@ protected: int screenWidth, screenHeight; int overlayWidth, overlayHeight; int hardwareWidth, hardwareHeight; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR Graphics::PixelFormat format; #endif }; |