gba-trycatch
annotate src/palman.h @ 14:c398d834d64a
fixed the rendering bugs
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 23 Jun 2014 10:33:24 +0300 |
parents | b0ed38f13261 |
children |
rev | line source |
---|---|
nuclear@9 | 1 #ifndef PALMAN_H_ |
nuclear@9 | 2 #define PALMAN_H_ |
nuclear@9 | 3 |
nuclear@10 | 4 #include "config.h" |
nuclear@10 | 5 |
nuclear@10 | 6 #ifdef PALMODE |
nuclear@9 | 7 #define RGBPAL(r, g, b) \ |
nuclear@9 | 8 (((r) & 0xe0) | (((g) >> 3) & 0x1c) | (((b) >> 6) & 0x3)) |
nuclear@9 | 9 |
nuclear@9 | 10 #define GET_R_PAL(c) ((c) & 0xe0) |
nuclear@9 | 11 #define GET_G_PAL(c) (((c) & 0x1c) << 3) |
nuclear@9 | 12 #define GET_B_PAL(c) (((c) & 0x3) << 6) |
nuclear@10 | 13 #else |
nuclear@10 | 14 #define RGBPAL(r, g, b) RGB(r, g, b) |
nuclear@10 | 15 #define GET_R_PAL(c) GET_R(c) |
nuclear@10 | 16 #define GET_G_PAL(c) GET_G(c) |
nuclear@10 | 17 #define GET_B_PAL(c) GET_B(c) |
nuclear@10 | 18 #endif |
nuclear@9 | 19 |
nuclear@9 | 20 void palman_init(void); |
nuclear@9 | 21 |
nuclear@9 | 22 #endif /* PALMAN_H_ */ |