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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user