mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
ASYLUM: make byte twiddling macros endian agnostic
Also removed a couple of unused macros
This commit is contained in:
parent
db3341e2f1
commit
7e4d9b1e52
@ -922,10 +922,13 @@ enum AsylumAction {
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Sub-integer partial access macros
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#if defined SCUMM_LITTLE_ENDIAN
|
||||
#define LOBYTE(d) (*((char *)&(d)))
|
||||
#define BYTE1(d) (*((char *)&(d) + 1)) // Same as HIBYTE()
|
||||
#define BYTE2(d) (*((char *)&(d) + 2))
|
||||
#define LOWORD(x) (*((int16 *)&(x)))
|
||||
#elif defined SCUMM_BIG_ENDIAN
|
||||
#define LOBYTE(d) (*((char *)&(d) + sizeof(d) - 1))
|
||||
#define BYTE1(d) (*((char *)&(d) + sizeof(d) - 2))
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Resource ID macros
|
||||
|
Loading…
Reference in New Issue
Block a user