[Scummvm-cvs-logs] SF.net SVN: scummvm:[41696] scummvm/branches/gsoc2009-16bit

upthorn at users.sourceforge.net upthorn at users.sourceforge.net
Sat Jun 20 07:23:10 CEST 2009


Revision: 41696
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41696&view=rev
Author:   upthorn
Date:     2009-06-20 05:23:09 +0000 (Sat, 20 Jun 2009)

Log Message:
-----------
renamed ENABLE_16BIT define to more accurate ENABLE_RGB_COLOR

Modified Paths:
--------------
    scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp
    scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h
    scummvm/branches/gsoc2009-16bit/base/main.cpp
    scummvm/branches/gsoc2009-16bit/common/error.h
    scummvm/branches/gsoc2009-16bit/common/system.h
    scummvm/branches/gsoc2009-16bit/dists/msvc8/gob.vcproj
    scummvm/branches/gsoc2009-16bit/dists/msvc8/scumm.vcproj
    scummvm/branches/gsoc2009-16bit/dists/msvc8/scummvm.vcproj
    scummvm/branches/gsoc2009-16bit/engines/engine.cpp
    scummvm/branches/gsoc2009-16bit/engines/engine.h
    scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp
    scummvm/branches/gsoc2009-16bit/engines/scumm/scumm.cpp
    scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp
    scummvm/branches/gsoc2009-16bit/graphics/cursorman.h
    scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h
    scummvm/branches/gsoc2009-16bit/gui/GuiManager.cpp
    scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.cpp
    scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.h

Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/graphics.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -97,7 +97,7 @@
 	_transactionDetails.needUpdatescreen = false;
 
 	_transactionDetails.normal1xScaler = false;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 	_transactionDetails.formatChanged = false;
 #endif
 
@@ -123,7 +123,7 @@
 
 			_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 @@
 		}
 	}
 
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 	if (_transactionDetails.sizeChanged || _transactionDetails.formatChanged) {
 #else
 	if (_transactionDetails.sizeChanged) {
@@ -353,7 +353,7 @@
 	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 @@
 	//
 	// 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 @@
 	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 @@
 	_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 @@
 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 @@
 	}
 
 	_cursorPaletteDisabled = false;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 }
 
 void OSystem_SDL::setCursorFormat(Graphics::PixelFormat format) {
@@ -1380,7 +1380,7 @@
 }
 
 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 @@
 	}
 
 	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::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 @@
 
 	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 @@
 				}
 				dstPtr += 2;
 				srcPtr++;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 			}
 #endif
 		}

Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -196,7 +196,7 @@
 	_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

Modified: scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/backends/platform/sdl/sdl.h	2009-06-20 05:23:09 UTC (rev 41696)
@@ -81,7 +81,7 @@
 	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 @@
 	// 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 @@
 			if (HWFormat->BitsPerPixel >= 16)
 				return Graphics::PixelFormat::createFormatRGB565();
 		}
-#endif //ENABLE_32BIT or ENABLE_16BIT
 		return Graphics::PixelFormat::createFormatCLUT8();
 	}
 #endif
@@ -142,7 +140,7 @@
 
 	// 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 @@
 
 	// unseen game screen
 	SDL_Surface *_screen;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 	Graphics::PixelFormat _screenFormat;
 	Graphics::PixelFormat _cursorFormat;
 #endif
@@ -297,7 +295,7 @@
 		bool needHotswap;
 		bool needUpdatescreen;
 		bool normal1xScaler;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 		bool formatChanged;
 #endif
 	};
@@ -314,7 +312,7 @@
 
 		int screenWidth, screenHeight;
 		int overlayWidth, overlayHeight;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 		Graphics::PixelFormat format;
 #endif
 	};

Modified: scummvm/branches/gsoc2009-16bit/base/main.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/base/main.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/base/main.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -226,7 +226,7 @@
 		// 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);

Modified: scummvm/branches/gsoc2009-16bit/common/error.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/common/error.h	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/common/error.h	2009-06-20 05:23:09 UTC (rev 41696)
@@ -48,7 +48,7 @@
 	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
 

Modified: scummvm/branches/gsoc2009-16bit/common/system.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/common/system.h	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/common/system.h	2009-06-20 05:23:09 UTC (rev 41696)
@@ -343,7 +343,7 @@
 	 */
 	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 @@
 		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 @@
 	 * @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
 

Modified: scummvm/branches/gsoc2009-16bit/dists/msvc8/gob.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc8/gob.vcproj	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc8/gob.vcproj	2009-06-20 05:23:09 UTC (rev 41696)
@@ -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"

Modified: scummvm/branches/gsoc2009-16bit/dists/msvc8/scumm.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc8/scumm.vcproj	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc8/scumm.vcproj	2009-06-20 05:23:09 UTC (rev 41696)
@@ -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"

Modified: scummvm/branches/gsoc2009-16bit/dists/msvc8/scummvm.vcproj
===================================================================
--- scummvm/branches/gsoc2009-16bit/dists/msvc8/scummvm.vcproj	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/dists/msvc8/scummvm.vcproj	2009-06-20 05:23:09 UTC (rev 41696)
@@ -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"

Modified: scummvm/branches/gsoc2009-16bit/engines/engine.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/engine.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/engines/engine.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -125,7 +125,7 @@
 		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 @@
 	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 @@
 	}
 
 	// 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.";
 

Modified: scummvm/branches/gsoc2009-16bit/engines/engine.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/engine.h	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/engines/engine.h	2009-06-20 05:23:09 UTC (rev 41696)
@@ -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 @@
  * 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);

Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -112,7 +112,7 @@
 
 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,

Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/scumm.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/scumm.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/scumm.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -1084,7 +1084,7 @@
 					// 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())

Modified: scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/graphics/cursorman.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -97,7 +97,7 @@
 		}
 	}
 
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 	while (!_cursorFormatStack.empty()) {
 		PixelFormat *form = _cursorFormatStack.pop();
 		delete form;
@@ -116,7 +116,7 @@
 
 	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 @@
 	}
 }
 
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 void CursorManager::pushCursorFormat(PixelFormat format) {
 //	if (!g_system->hasFeature(OSystem::kFeatureCursorHasPalette))
 //		return;

Modified: scummvm/branches/gsoc2009-16bit/graphics/cursorman.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/cursorman.h	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/graphics/cursorman.h	2009-06-20 05:23:09 UTC (rev 41696)
@@ -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 @@
 	 */
 	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 @@
 
 		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 @@
 	};
 	Common::Stack<Cursor *> _cursorStack;
 	Common::Stack<Palette *> _cursorPaletteStack;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 	Common::Stack<Graphics::PixelFormat *> _cursorFormatStack;
 #endif
 };

Modified: scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/graphics/pixelformat.h	2009-06-20 05:23:09 UTC (rev 41696)
@@ -70,7 +70,7 @@
 	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 @@
 		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.

Modified: scummvm/branches/gsoc2009-16bit/gui/GuiManager.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/gui/GuiManager.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/gui/GuiManager.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -135,7 +135,7 @@
 	delete _theme;
 
 	if (_useStdCursor) {
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 		CursorMan.popCursorFormat();
 #endif
 		CursorMan.popCursorPalette();
@@ -385,7 +385,7 @@
 
 void GuiManager::restoreState() {
 	if (_useStdCursor) {
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 		CursorMan.popCursorFormat();
 #endif
 		CursorMan.popCursor();
@@ -430,7 +430,7 @@
 		 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;

Modified: scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.cpp	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.cpp	2009-06-20 05:23:09 UTC (rev 41696)
@@ -434,7 +434,7 @@
 		_system->showOverlay();
 
 		if (_useCursor) {
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 			CursorMan.replaceCursorFormat(_cursorFormat);
 #endif
 			CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize);
@@ -448,7 +448,7 @@
 		return;
 
 	if (_useCursor) {
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 		CursorMan.pushCursorFormat(_cursorFormat);
 #endif
 		CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize);
@@ -468,7 +468,7 @@
 	_system->hideOverlay();
 
 	if (_useCursor) {
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 		CursorMan.popCursorFormat();
 #endif
 		CursorMan.popCursorPalette();
@@ -1174,7 +1174,7 @@
 	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;

Modified: scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.h	2009-06-20 05:08:07 UTC (rev 41695)
+++ scummvm/branches/gsoc2009-16bit/gui/ThemeEngine.h	2009-06-20 05:23:09 UTC (rev 41696)
@@ -579,7 +579,7 @@
 
 	ImagesMap _bitmaps;
 	Graphics::PixelFormat _overlayFormat;
-#ifdef ENABLE_16BIT
+#ifdef ENABLE_RGB_COLOR
 	Graphics::PixelFormat _cursorFormat;
 #endif
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list