[Scummvm-cvs-logs] SF.net SVN: scummvm:[41142] scummvm/trunk/engines/tinsel
Hkz at users.sourceforge.net
Hkz at users.sourceforge.net
Wed Jun 3 18:15:17 CEST 2009
Revision: 41142
http://scummvm.svn.sourceforge.net/scummvm/?rev=41142&view=rev
Author: Hkz
Date: 2009-06-03 16:15:17 +0000 (Wed, 03 Jun 2009)
Log Message:
-----------
tinsel: fixed endianess issue in psx palette remapper
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/palette.cpp
scummvm/trunk/engines/tinsel/palette.h
Modified: scummvm/trunk/engines/tinsel/palette.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/palette.cpp 2009-06-03 14:47:32 UTC (rev 41141)
+++ scummvm/trunk/engines/tinsel/palette.cpp 2009-06-03 16:15:17 UTC (rev 41142)
@@ -110,7 +110,7 @@
}
// Check for correspondent color
- for (int i = 0; (i < pal->numColours) && !colorFound; i++) {
+ for (int i = 0; (i < FROM_LE_32(pal->numColours)) && !colorFound; i++) {
// get R G B values in the same way as psx format converters
uint16 psxEquivalent = TINSEL_PSX_RGB(TINSEL_GetRValue(pal->palRGB[i]) >> 3, TINSEL_GetGValue(pal->palRGB[i]) >> 3, TINSEL_GetBValue(pal->palRGB[i]) >> 3);
Modified: scummvm/trunk/engines/tinsel/palette.h
===================================================================
--- scummvm/trunk/engines/tinsel/palette.h 2009-06-03 14:47:32 UTC (rev 41141)
+++ scummvm/trunk/engines/tinsel/palette.h 2009-06-03 16:15:17 UTC (rev 41142)
@@ -39,7 +39,7 @@
#define TINSEL_GetGValue(rgb) ((uint8)(((uint16)(FROM_LE_32(rgb)))>>8))
#define TINSEL_GetBValue(rgb) ((uint8)((FROM_LE_32(rgb))>>16))
-#define TINSEL_PSX_RGB(r,g,b) ((uint16)TO_LE_16(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
+#define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
enum {
MAX_COLOURS = 256, //!< maximum number of colours - for VGA 256
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