Tweak to see if we can get the new colour picking code working

This commit is contained in:
Will
2013-12-01 00:43:49 +01:00
parent 125e1c53dc
commit a869dd0fee
2 changed files with 6 additions and 6 deletions

View File

@@ -278,8 +278,8 @@ public:
private: private:
unsigned char uniqueColorID[COLOR_COMPONENTS]; unsigned char uniqueColorID[COLOR_COMPONENTS];
static int nextColorID; static unsigned nextColorID;
static const int k, p; static const unsigned k, p;
static Mutex mutexNextColorID; static Mutex mutexNextColorID;
static auto_ptr<PixelBufferWrapper> pbo; static auto_ptr<PixelBufferWrapper> pbo;

View File

@@ -1826,9 +1826,9 @@ PixelBufferWrapper::~PixelBufferWrapper() {
cleanup(); cleanup();
} }
const int BaseColorPickEntity::p = 64007; const unsigned BaseColorPickEntity::p = 64007;
const int BaseColorPickEntity::k = 43067; const unsigned BaseColorPickEntity::k = 43067;
int BaseColorPickEntity::nextColorID = BaseColorPickEntity::k; unsigned BaseColorPickEntity::nextColorID = BaseColorPickEntity::k;
Mutex BaseColorPickEntity::mutexNextColorID; Mutex BaseColorPickEntity::mutexNextColorID;
auto_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo; auto_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo;
@@ -1845,7 +1845,7 @@ void BaseColorPickEntity::assign_color() {
// nextColorID is a 16-bit (hi)colour (for players with 16-bit display depths) // nextColorID is a 16-bit (hi)colour (for players with 16-bit display depths)
// we expand it to true-color for use with OpenGL // we expand it to true-color for use with OpenGL
const int const unsigned
r = (nextColorID >> 11) & ((1<<5)-1), r = (nextColorID >> 11) & ((1<<5)-1),
g = (nextColorID >> 5) & ((1<<6)-1), g = (nextColorID >> 5) & ((1<<6)-1),
b = nextColorID & ((1<<5)-1); b = nextColorID & ((1<<5)-1);