PALETTE_REDSHIFT
((r & PALETTE_COLORMASK) << PALETTE_REDSHIFT) |
#define PALETTE_RED(entry) ((entry) >> PALETTE_REDSHIFT)