Skip to content

Commit

Permalink
Merge pull request #140 from raku-cat/master
Browse files Browse the repository at this point in the history
Fix compiler warnings, also fixes #139
  • Loading branch information
naelstrof authored May 13, 2018
2 parents 7b60eea + 991cdf8 commit bee32c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static inline unsigned char computeRGBPixel(unsigned char* data, XImage* image,
data[curpixel] = (unsigned char)((real & image->red_mask) >> roffset);
data[curpixel+1] = (unsigned char)((real & image->green_mask) >> goffset);
data[curpixel+2] = (unsigned char)((real & image->blue_mask) >> boffset);
return *data;
}

static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image, int x, int y, int roffset, int goffset, int boffset, int aoffset, int width, glm::ivec2 offset ) {
Expand All @@ -47,6 +48,7 @@ static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image,
data[curpixel+1] = (unsigned char)((real & image->green_mask) >> goffset);
data[curpixel+2] = (unsigned char)((real & image->blue_mask) >> boffset);
data[curpixel+3] = (unsigned char)(real >> aoffset);
return *data;
}

static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image, int x, int y, int roffset, int goffset, int boffset, int width, glm::ivec2 offset ) {
Expand All @@ -57,6 +59,7 @@ static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image,
data[curpixel+1] = (unsigned char)((real & image->green_mask) >> goffset);
data[curpixel+2] = (unsigned char)((real & image->blue_mask) >> boffset);
data[curpixel+3] = 255;
return *data;
}

static inline int get_shift (int mask) {
Expand Down

0 comments on commit bee32c6

Please sign in to comment.