gba-x3dtest

diff src/palman.h @ 9:b0ed38f13261

working on the rasterizer
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 22 Jun 2014 05:16:10 +0300
parents
children 23f716fa7f10
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/palman.h	Sun Jun 22 05:16:10 2014 +0300
     1.3 @@ -0,0 +1,13 @@
     1.4 +#ifndef PALMAN_H_
     1.5 +#define PALMAN_H_
     1.6 +
     1.7 +#define RGBPAL(r, g, b)	\
     1.8 +	(((r) & 0xe0) | (((g) >> 3) & 0x1c) | (((b) >> 6) & 0x3))
     1.9 +
    1.10 +#define GET_R_PAL(c)	((c) & 0xe0)
    1.11 +#define GET_G_PAL(c)	(((c) & 0x1c) << 3)
    1.12 +#define GET_B_PAL(c)	(((c) & 0x3) << 6)
    1.13 +
    1.14 +void palman_init(void);
    1.15 +
    1.16 +#endif	/* PALMAN_H_ */