diff options
author | Peter Moraliyski | 2002-11-30 16:03:46 +0000 |
---|---|---|
committer | Peter Moraliyski | 2002-11-30 16:03:46 +0000 |
commit | c0c5fc274f74cf9b3809acf565aa626f52b183cb (patch) | |
tree | 9d72638d876dfa6938c86babc2d1fa58253fdbf1 /common/util.h | |
parent | 0a17046c4a29b406fa3303887b26571e89f7a644 (diff) | |
download | scummvm-rg350-c0c5fc274f74cf9b3809acf565aa626f52b183cb.tar.gz scummvm-rg350-c0c5fc274f74cf9b3809acf565aa626f52b183cb.tar.bz2 scummvm-rg350-c0c5fc274f74cf9b3809acf565aa626f52b183cb.zip |
gp32 port stuff
svn-id: r5761
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h index 3218a8546d..37576bd8af 100644 --- a/common/util.h +++ b/common/util.h @@ -45,6 +45,13 @@ static inline void SWAP(int &a, int &b) { int tmp=a; a=b; b=tmp; } #define GREEN_FROM_16(x) ((((x)>>5)&0x1F) << 3) #define BLUE_FROM_16(x) (((x)&0x1F) << 3) +#elif defined(__GP32__) //ph0x +// GP32 format 5-5-5-1 (first bit means intensity) +#define RGB_TO_16(r,g,b) (((((r)>>3)&0x1F) << 11) | ((((g)>>3)&0x1F) << 6) | (((b)>>3)&0x1F)<<1) +#define RED_FROM_16(x) ((((x)>>11)&0x1F) << 3) +#define GREEN_FROM_16(x) ((((x)>>6) &0x1F) << 3) +#define BLUE_FROM_16(x) ((((x)>>1) &0x1F) << 3) + #else // Assume the 16 bit graphics data is in 5-6-5 format #define RGB_TO_16(r,g,b) (((((r)>>3)&0x1F) << 11) | ((((g)>>2)&0x3F) << 5) | (((b)>>3)&0x1F)) |