Attempt to get these files back to a compilable state.
This commit is contained in:
@@ -340,26 +340,26 @@ SGTexture::set_pixel(GLuint x, GLuint y, sgVec3 &c)
|
||||
return;
|
||||
|
||||
unsigned int pos = (x + y*texture_width)*3;
|
||||
texture_data[pos] = c[0];
|
||||
texture_data[pos+1] = c[1];
|
||||
texture_data[pos+2] = c[2];
|
||||
texture_data[pos] = (unsigned char)(c[0] * 256);
|
||||
texture_data[pos+1] = (unsigned char)(c[1] * 256);
|
||||
texture_data[pos+2] = (unsigned char)(c[2] * 256);
|
||||
}
|
||||
|
||||
|
||||
sgVec3 *
|
||||
float *
|
||||
SGTexture::get_pixel(GLuint x, GLuint y)
|
||||
{
|
||||
static sgVec3 c;
|
||||
|
||||
sgSetVec3(c, 0, 0, 0);
|
||||
if (!texture_data)
|
||||
return;
|
||||
return c;
|
||||
|
||||
unsigned int pos = (x + y*texture_width)*3;
|
||||
|
||||
sgSetVec3(c, texture_data[pos], texture_data[pos+1], texture_data[pos+2]);
|
||||
|
||||
return &c;
|
||||
return c;
|
||||
}
|
||||
|
||||
SGTexture::ImageRec *
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
// texture pixel manipulation functions.
|
||||
void set_pixel(GLuint x, GLuint y, sgVec3 &c);
|
||||
sgVec3 *get_pixel(GLuint x, GLuint y);
|
||||
float *get_pixel(GLuint x, GLuint y);
|
||||
|
||||
void bind();
|
||||
inline void select(bool keep_data = false) {
|
||||
|
||||
Reference in New Issue
Block a user