From 910f43ffd883eed0dfa2d08deb3e7503675672ac Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Mon, 25 May 2009 06:09:48 +0000 Subject: tinsel: endianess fix Discworld PSX palette remapper svn-id: r40876 --- engines/tinsel/palette.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/tinsel/palette.h') diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h index 7a74424ba9..c887220840 100644 --- a/engines/tinsel/palette.h +++ b/engines/tinsel/palette.h @@ -39,9 +39,9 @@ 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 PSXGetRValue(rgb) (FROM_LE_32(rgb) & 0x000000f8) -#define PSXGetGValue(rgb) (FROM_LE_32((rgb) >> 8) & 0x000000f8) -#define PSXGetBValue(rgb) (FROM_LE_32((rgb) >> 16) & 0x000000f8) +#define PSXGetRValue(rgb) ((uint8)(FROM_LE_32(rgb) & 0x000000f8)) +#define PSXGetGValue(rgb) ((uint8)(FROM_LE_32((rgb) >> 8) & 0x000000f8)) +#define PSXGetBValue(rgb) ((uint8)(FROM_LE_32((rgb) >> 16) & 0x000000f8)) enum { MAX_COLOURS = 256, //!< maximum number of colours - for VGA 256 @@ -111,7 +111,7 @@ void ResetPalAllocator(void); // wipe out all palettes void PaletteStats(void); // Shows the maximum number of palettes used at once #endif -void psxPaletteMapper(PALQ *originalPal, uint16 *psxClut, byte *mapperTable); // Maps PSX CLUTs to original palette in resource file +void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable); // Maps PSX CLUTs to original palette in resource file void PalettesToVideoDAC(void); // Update the video DAC with palettes currently the the DAC queue -- cgit v1.2.3