engine: fix palette and builtin textures on BE

This commit is contained in:
Alibek Omarov
2026-04-25 02:33:24 +05:00
committed by a1batross
parent 22391eba1b
commit e30ce9c150
3 changed files with 25 additions and 52 deletions

View File

@@ -243,6 +243,9 @@ typedef int qboolean;
#define Swap32Store( x ) ( x = Swap32( x ))
#define Swap16Store( x ) ( x = Swap16( x ))
#define LittleFourCC( a, b, c, d ) (((uint32_t)( d ) << 24 ) | ((uint32_t)( c ) << 16 ) | ((uint32_t)( b ) << 8 ) | (uint32_t)( a ))
#define BigFourCC( a, b, c, d ) (((uint32_t)( a ) << 24 ) | ((uint32_t)( b ) << 16 ) | ((uint32_t)( c ) << 8 ) | (uint32_t)( d ))
#if XASH_BIG_ENDIAN
#define LittleLong( x ) Swap32( x )
#define LittleShort( x ) Swap16( x )
@@ -252,6 +255,7 @@ typedef int qboolean;
#define BigLong( x ) ( x )
#define BigShort( x ) ( x )
#define BigFloat( x ) ( x )
#define HostFourCC( a, b, c, d ) BigFourCC( a, b, c, d )
#else
#define LittleLong( x ) ( x )
#define LittleShort( x ) ( x )
@@ -261,6 +265,7 @@ typedef int qboolean;
#define BigLong( x ) Swap32( x )
#define BigShort( x ) Swap16( x )
#define BigFloat( x ) SwapFloat( x )
#define HostFourCC( a, b, c, d ) LittleFourCC( a, b, c, d )
#endif
#endif // XASH_TYPES_H