From b05fa7f20414d6a7571a9ba52f542e527f598c62 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 11 Dec 2012 02:56:48 +0200 Subject: TINSEL: Add resource handling of the BE resources in DW1 Mac This is the second attempt. All the BE resources of DW1 Mac are handled correctly now. Added READ_16, READ_32, FROM_16, FROM_32 and TO_32 to handle all of the different cases where endianess is already handled. Note that the game scripts are LE, so these haven't been changed --- 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 af58a7ffbd..49a78ae236 100644 --- a/engines/tinsel/palette.h +++ b/engines/tinsel/palette.h @@ -30,11 +30,11 @@ namespace Tinsel { typedef uint32 COLORREF; -#define TINSEL_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_32(((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<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)) +#define TINSEL_GetRValue(rgb) ((uint8)(FROM_32(rgb))) +#define TINSEL_GetGValue(rgb) ((uint8)(((uint16)(FROM_32(rgb)))>>8)) +#define TINSEL_GetBValue(rgb) ((uint8)((FROM_32(rgb))>>16)) #define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10))) -- cgit v1.2.3