dxx-rebirth/include/byteswap.h
md2211 d393f32eed * Removed executable flag on most files
* Reverted value of SOUND_MAX_VOLUME
2007-09-21 19:06:05 +00:00

11 lines
326 B
C

//byteswap.h - added 03/04/99 Matt Mueller
#ifdef BIGENDIAN
//untested, borrowed from ggi-descent
#define swapshort(x) ( (x << 8) | (((ushort)x) >> 8) )
#define swapint(x) ( (x << 24) | (((/*ulong*/uint)x) >> 24) | ((x & 0x0000ff00) << 8) | ((x & 0x00ff0000) >> 8) )
#else
#define swapint(x) x
#define swapshort(x) x
#endif