aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/palette.h
diff options
context:
space:
mode:
authorFabio Battaglia2009-05-24 22:10:12 +0000
committerFabio Battaglia2009-05-24 22:10:12 +0000
commiteba025f48f99b1538ebbf71ca5b815e76083b78f (patch)
treec0f11ff5fd2ee8feea5dfe790f02a238d1d205ee /engines/tinsel/palette.h
parentc97a1aed74fc54176e0de66fc2b6bbe0767e8de6 (diff)
downloadscummvm-rg350-eba025f48f99b1538ebbf71ca5b815e76083b78f.tar.gz
scummvm-rg350-eba025f48f99b1538ebbf71ca5b815e76083b78f.tar.bz2
scummvm-rg350-eba025f48f99b1538ebbf71ca5b815e76083b78f.zip
tinsel: fix for CLUT palettes in Discworld PSX
svn-id: r40873
Diffstat (limited to 'engines/tinsel/palette.h')
-rw-r--r--engines/tinsel/palette.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index ff5ff13f2a..7a74424ba9 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -39,6 +39,10 @@ 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)
+
enum {
MAX_COLOURS = 256, //!< maximum number of colours - for VGA 256
BITS_PER_PIXEL = 8, //!< number of bits per pixel for VGA 256
@@ -107,7 +111,7 @@ void ResetPalAllocator(void); // wipe out all palettes
void PaletteStats(void); // Shows the maximum number of palettes used at once
#endif
-COLORREF* psxClutToRGBPal(uint8 *srcClut); // Convert Discworld PSX 555 CLUTs to compatible 888 palette
+void psxPaletteMapper(PALQ *originalPal, uint16 *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