aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFabio Battaglia2009-06-03 16:15:17 +0000
committerFabio Battaglia2009-06-03 16:15:17 +0000
commitee04870cc2067b1717e5d8319f4d25519e312a9c (patch)
tree254625c9f6ad8aac35405c39867205b9aea0b742 /engines
parent9673beb082b47d01aa2ddd25431393efcb859e8e (diff)
downloadscummvm-rg350-ee04870cc2067b1717e5d8319f4d25519e312a9c.tar.gz
scummvm-rg350-ee04870cc2067b1717e5d8319f4d25519e312a9c.tar.bz2
scummvm-rg350-ee04870cc2067b1717e5d8319f4d25519e312a9c.zip
tinsel: fixed endianess issue in psx palette remapper
svn-id: r41142
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/palette.cpp2
-rw-r--r--engines/tinsel/palette.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index 1a384ea6c5..e9914fa2ff 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -110,7 +110,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) {
}
// 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);
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index bfeb2dd658..259f693923 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -39,7 +39,7 @@ typedef uint32 COLORREF;
#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