gba-trycatch
view src/palman.h @ 15:b755fb002f17
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 25 Jun 2014 17:02:48 +0300 |
parents | b0ed38f13261 |
children |
line source
1 #ifndef PALMAN_H_
2 #define PALMAN_H_
4 #include "config.h"
6 #ifdef PALMODE
7 #define RGBPAL(r, g, b) \
8 (((r) & 0xe0) | (((g) >> 3) & 0x1c) | (((b) >> 6) & 0x3))
10 #define GET_R_PAL(c) ((c) & 0xe0)
11 #define GET_G_PAL(c) (((c) & 0x1c) << 3)
12 #define GET_B_PAL(c) (((c) & 0x3) << 6)
13 #else
14 #define RGBPAL(r, g, b) RGB(r, g, b)
15 #define GET_R_PAL(c) GET_R(c)
16 #define GET_G_PAL(c) GET_G(c)
17 #define GET_B_PAL(c) GET_B(c)
18 #endif
20 void palman_init(void);
22 #endif /* PALMAN_H_ */