Skip to content

Commit

Permalink
Consolidate byte-swapping for color components.
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Hansen <[email protected]>
  • Loading branch information
Deledrius and zrax authored Mar 9, 2024
1 parent f1bcd97 commit 5a2d271
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/PrpShop/PRP/Surface/QMipmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ unsigned char* getTextureData(plMipmap *tex, size_t level=0)
unsigned int* dp = (unsigned int*)imageData;
for (size_t i = 0; i < size; i += 4) {
//unsigned int alpha = doAlpha ? (*dp & 0xFF000000) : 0xFF000000;
*dp = (*dp & 0xFF000000)
*dp = (*dp & 0xFF00FF00)
| (*dp & 0x00FF0000) >> 16
| (*dp & 0x0000FF00)
| (*dp & 0x000000FF) << 16;
dp++;
}
Expand Down

0 comments on commit 5a2d271

Please sign in to comment.