2012-03-24 22:39:19 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef unsigned int Color;
|
|
|
|
|
|
|
|
//have to use a define to ensure constant folding.. with an inline I don't get that, sucks
|
2012-10-06 10:28:20 +00:00
|
|
|
#define COLOR(i) (((i&0xFF) << 16) | (i & 0xFF00) | ((i & 0xFF0000) >> 16) | 0xFF000000)
|
2012-03-24 22:39:19 +00:00
|
|
|
inline Color darkenColor(Color color) {
|
|
|
|
return (color & 0xFF000000) | ((color >> 1)&0x7F7F7F);
|
|
|
|
}
|
|
|
|
inline Color whitenColor(Color color) {
|
|
|
|
return ((color & 0xFF000000) | ((color >> 1)&0x7F7F7F)) + 0x7F7F7F;
|
|
|
|
}
|
|
|
|
inline Color colorInterpol(Color x, Color y, int n) {
|
|
|
|
// TODO
|
|
|
|
return x;
|
2012-10-06 10:28:20 +00:00
|
|
|
}
|