1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-27 03:47:40 +00:00

Fix colors for big endian architectures.

This commit is contained in:
Charlène
2019-01-16 23:15:40 +01:00
committed by Zeno Rogue
parent 87240cf990
commit 9cee52cf81
2 changed files with 13 additions and 4 deletions

View File

@@ -766,7 +766,12 @@ void fixMercator(bool tinf) {
}
unsigned char& part(color_t& col, int i) {
unsigned char* c = (unsigned char*) &col; return c[i];
unsigned char* c = (unsigned char*) &col;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
return c[sizeof(col) - 1 - i];
#else
return c[i];
#endif
}
bool in_twopoint = false;