dostunnel
view src/colorbit.h @ 5:0f984156753e
fixed the jerkiness
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 16 Mar 2013 07:10:53 +0200 |
parents | |
children |
line source
1 #ifndef COLORBIT_H_
2 #define COLORBIT_H_
4 #define RSHIFT 0
5 #define GSHIFT 8
6 #define BSHIFT 16
8 #define PACK_COLOR24(r, g, b) \
9 ((((r) & 0xff) << RSHIFT) | \
10 (((g) & 0xff) << GSHIFT) | \
11 (((b) & 0xff) << BSHIFT))
13 #define UNP_RED32(x) (((x) >> RSHIFT) & 0xff)
14 #define UNP_GREEN32(x) (((x) >> GSHIFT) & 0xff)
15 #define UNP_BLUE32(x) (((x) >> BSHIFT) & 0xff)
17 #endif /* COLORBIT_H_ */