[Scummvm-cvs-logs] SF.net SVN: scummvm:[39049] scummvm/trunk/engines/tinsel

knakos at users.sourceforge.net knakos at users.sourceforge.net
Sun Mar 1 20:46:07 CET 2009


Revision: 39049
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39049&view=rev
Author:   knakos
Date:     2009-03-01 19:46:07 +0000 (Sun, 01 Mar 2009)

Log Message:
-----------
silence compiler warnings: the names of some tinsel defines were shadowing standard winapi defines

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/actors.cpp
    scummvm/trunk/engines/tinsel/bmv.cpp
    scummvm/trunk/engines/tinsel/faders.cpp
    scummvm/trunk/engines/tinsel/palette.cpp
    scummvm/trunk/engines/tinsel/palette.h
    scummvm/trunk/engines/tinsel/tinlib.cpp

Modified: scummvm/trunk/engines/tinsel/actors.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/actors.cpp	2009-03-01 19:12:25 UTC (rev 39048)
+++ scummvm/trunk/engines/tinsel/actors.cpp	2009-03-01 19:46:07 UTC (rev 39049)
@@ -1283,9 +1283,9 @@
 	if (b1 > MAX_INTENSITY)	b1 = MAX_INTENSITY;	// }
 
 	if (ano == -1)
-		defaultColour = RGB(r1, g1, b1);
+		defaultColour = TINSEL_RGB(r1, g1, b1);
 	else
-		actorInfo[ano - 1].textColour = RGB(r1, g1, b1);
+		actorInfo[ano - 1].textColour = TINSEL_RGB(r1, g1, b1);
 }
 
 /**

Modified: scummvm/trunk/engines/tinsel/bmv.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/bmv.cpp	2009-03-01 19:12:25 UTC (rev 39048)
+++ scummvm/trunk/engines/tinsel/bmv.cpp	2009-03-01 19:46:07 UTC (rev 39049)
@@ -439,7 +439,7 @@
 	r = bigBuffer + paletteOffset;
 
 	for (i = 0; i < 256; i++, r += 3) 	{
-		moviePal[i] = RGB(*r, *(r + 1), *(r + 2));
+		moviePal[i] = TINSEL_RGB(*r, *(r + 1), *(r + 2));
 	}
 
 	UpdateDACqueue(1, 255, &moviePal[1]);
@@ -610,7 +610,7 @@
 			PTALK_CMD pCmd;
 
 			pCmd = (PTALK_CMD)(bigBuffer + commandOffset);
-			talkColour = RGB(pCmd->r, pCmd->g, pCmd->b);
+			talkColour = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b);
 
 			MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
 					(int16)READ_LE_UINT16(&pCmd->x),

Modified: scummvm/trunk/engines/tinsel/faders.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/faders.cpp	2009-03-01 19:12:25 UTC (rev 39048)
+++ scummvm/trunk/engines/tinsel/faders.cpp	2009-03-01 19:46:07 UTC (rev 39049)
@@ -52,12 +52,12 @@
  */
 static COLORREF ScaleColour(COLORREF colour, uint32 colourMult)	{
 	// apply multiplier to RGB components
-	uint32 red   = ((GetRValue(colour) * colourMult) << 8) >> 24;
-	uint32 green = ((GetGValue(colour) * colourMult) << 8) >> 24;
-	uint32 blue  = ((GetBValue(colour) * colourMult) << 8) >> 24;
+	uint32 red   = ((TINSEL_GetRValue(colour) * colourMult) << 8) >> 24;
+	uint32 green = ((TINSEL_GetGValue(colour) * colourMult) << 8) >> 24;
+	uint32 blue  = ((TINSEL_GetBValue(colour) * colourMult) << 8) >> 24;
 
 	// return new colour
-	return RGB(red, green, blue);
+	return TINSEL_RGB(red, green, blue);
 }
 
 /**

Modified: scummvm/trunk/engines/tinsel/palette.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/palette.cpp	2009-03-01 19:12:25 UTC (rev 39048)
+++ scummvm/trunk/engines/tinsel/palette.cpp	2009-03-01 19:46:07 UTC (rev 39049)
@@ -486,9 +486,9 @@
 
 	for (uint i = 0; i < FROM_LE_32(pPal->numColours); i++) {
 		// get the RGB colour model values
-		uint8 red   = GetRValue(pPal->palRGB[i]);
-		uint8 green = GetGValue(pPal->palRGB[i]);
-		uint8 blue  = GetBValue(pPal->palRGB[i]);
+		uint8 red   = TINSEL_GetRValue(pPal->palRGB[i]);
+		uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
+		uint8 blue  = TINSEL_GetBValue(pPal->palRGB[i]);
 
 		// calculate the Value field of the HSV colour model
 		unsigned val = (red > green) ? red : green;
@@ -514,9 +514,9 @@
 
 	for (i = 0; i < (int)FROM_LE_32(pPal->numColours); i++) {
 		// get the RGB colour model values
-		uint8 red   = GetRValue(pPal->palRGB[i]);
-		uint8 green = GetGValue(pPal->palRGB[i]);
-		uint8 blue  = GetBValue(pPal->palRGB[i]);
+		uint8 red   = TINSEL_GetRValue(pPal->palRGB[i]);
+		uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
+		uint8 blue  = TINSEL_GetBValue(pPal->palRGB[i]);
 
 		// calculate the Value field of the HSV colour model
 		unsigned val = (red > green) ? red : green;
@@ -545,12 +545,12 @@
 		return 0;
 	} else {
 		// apply multiplier to RGB components
-		red   = GetRValue(colour) * factor / 10;
-		green = GetGValue(colour) * factor / 10;
-		blue  = GetBValue(colour) * factor / 10;
+		red   = TINSEL_GetRValue(colour) * factor / 10;
+		green = TINSEL_GetGValue(colour) * factor / 10;
+		blue  = TINSEL_GetBValue(colour) * factor / 10;
 
 		// return new colour
-		return RGB(red, green, blue);
+		return TINSEL_RGB(red, green, blue);
 	}
 }
 

Modified: scummvm/trunk/engines/tinsel/palette.h
===================================================================
--- scummvm/trunk/engines/tinsel/palette.h	2009-03-01 19:12:25 UTC (rev 39048)
+++ scummvm/trunk/engines/tinsel/palette.h	2009-03-01 19:46:07 UTC (rev 39049)
@@ -33,11 +33,11 @@
 
 typedef	uint32	COLORREF;
 
-#define RGB(r,g,b)	((COLORREF)TO_LE_32(((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<16)))
+#define TINSEL_RGB(r,g,b)	((COLORREF)TO_LE_32(((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<16)))
 
-#define GetRValue(rgb)	((uint8)(FROM_LE_32(rgb)))
-#define GetGValue(rgb)	((uint8)(((uint16)(FROM_LE_32(rgb))) >> 8))
-#define GetBValue(rgb)	((uint8)((FROM_LE_32(rgb))>>16))
+#define TINSEL_GetRValue(rgb)	((uint8)(FROM_LE_32(rgb)))
+#define TINSEL_GetGValue(rgb)	((uint8)(((uint16)(FROM_LE_32(rgb))) >> 8))
+#define TINSEL_GetBValue(rgb)	((uint8)((FROM_LE_32(rgb))>>16))
 
 enum {
 	MAX_COLOURS		= 256,	//!< maximum number of colours - for VGA 256
@@ -57,14 +57,14 @@
 
 // some common colours
 
-#define	BLACK	(RGB(0, 0, 0))
-#define	WHITE	(RGB(MAX_INTENSITY, MAX_INTENSITY, MAX_INTENSITY))
-#define	RED		(RGB(MAX_INTENSITY, 0, 0))
-#define	GREEN	(RGB(0, MAX_INTENSITY, 0))
-#define	BLUE	(RGB(0, 0, MAX_INTENSITY))
-#define	YELLOW	(RGB(MAX_INTENSITY, MAX_INTENSITY, 0))
-#define	MAGENTA	(RGB(MAX_INTENSITY, 0, MAX_INTENSITY))
-#define	CYAN	(RGB(0, MAX_INTENSITY, MAX_INTENSITY))
+#define	BLACK	(TINSEL_RGB(0, 0, 0))
+#define	WHITE	(TINSEL_RGB(MAX_INTENSITY, MAX_INTENSITY, MAX_INTENSITY))
+#define	RED		(TINSEL_RGB(MAX_INTENSITY, 0, 0))
+#define	GREEN	(TINSEL_RGB(0, MAX_INTENSITY, 0))
+#define	BLUE	(TINSEL_RGB(0, 0, MAX_INTENSITY))
+#define	YELLOW	(TINSEL_RGB(MAX_INTENSITY, MAX_INTENSITY, 0))
+#define	MAGENTA	(TINSEL_RGB(MAX_INTENSITY, 0, MAX_INTENSITY))
+#define	CYAN	(TINSEL_RGB(0, MAX_INTENSITY, MAX_INTENSITY))
 
 
 #include "common/pack-start.h"	// START STRUCT PACKING

Modified: scummvm/trunk/engines/tinsel/tinlib.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinlib.cpp	2009-03-01 19:12:25 UTC (rev 39048)
+++ scummvm/trunk/engines/tinsel/tinlib.cpp	2009-03-01 19:46:07 UTC (rev 39049)
@@ -3528,7 +3528,7 @@
 	if (g1 > MAX_INTENSITY)	g1 = MAX_INTENSITY;	// } within limits
 	if (b1 > MAX_INTENSITY)	b1 = MAX_INTENSITY;	// }
 
-	SetTextPal(RGB(r1, g1, b1));
+	SetTextPal(TINSEL_RGB(r1, g1, b1));
 }
 
 /**


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