mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 15:11:20 +02:00
- cleanup some color pick code
This commit is contained in:
@@ -253,8 +253,24 @@ public:
|
|||||||
|
|
||||||
static const int COLOR_COMPONENTS = 4;
|
static const int COLOR_COMPONENTS = 4;
|
||||||
|
|
||||||
struct ColorPickStruct {
|
class ColorPickStruct {
|
||||||
|
public:
|
||||||
unsigned char color[COLOR_COMPONENTS];
|
unsigned char color[COLOR_COMPONENTS];
|
||||||
|
|
||||||
|
ColorPickStruct(unsigned char newColor1,unsigned char newColor2,
|
||||||
|
unsigned char newColor3,unsigned char newColor4) {
|
||||||
|
color[0] = newColor1;
|
||||||
|
color[1] = newColor2;
|
||||||
|
color[2] = newColor3;
|
||||||
|
color[3] = newColor4;
|
||||||
|
}
|
||||||
|
ColorPickStruct() {
|
||||||
|
color[0] = 0;
|
||||||
|
color[1] = 0;
|
||||||
|
color[2] = 0;
|
||||||
|
color[3] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void init(int bufferSize);
|
static void init(int bufferSize);
|
||||||
|
@@ -1462,7 +1462,7 @@ PixelBufferWrapper::~PixelBufferWrapper() {
|
|||||||
|
|
||||||
const int colorSpacing = 8;
|
const int colorSpacing = 8;
|
||||||
//unsigned char BaseColorPickEntity::nextColorID[COLOR_COMPONENTS] = {1, 1, 1, 1};
|
//unsigned char BaseColorPickEntity::nextColorID[COLOR_COMPONENTS] = {1, 1, 1, 1};
|
||||||
BaseColorPickEntity::ColorPickStruct BaseColorPickEntity::nextColorID = { colorSpacing, colorSpacing, colorSpacing };
|
BaseColorPickEntity::ColorPickStruct BaseColorPickEntity::nextColorID = ColorPickStruct(colorSpacing, colorSpacing, colorSpacing, colorSpacing);
|
||||||
vector<BaseColorPickEntity::ColorPickStruct> BaseColorPickEntity::nextColorIDReuseList;
|
vector<BaseColorPickEntity::ColorPickStruct> BaseColorPickEntity::nextColorIDReuseList;
|
||||||
Mutex BaseColorPickEntity::mutexNextColorID;
|
Mutex BaseColorPickEntity::mutexNextColorID;
|
||||||
auto_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo;
|
auto_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo;
|
||||||
|
Reference in New Issue
Block a user