diff options
Diffstat (limited to 'common/scummsys.h')
-rw-r--r-- | common/scummsys.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/scummsys.h b/common/scummsys.h index c020878527..9b19489079 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -419,7 +419,15 @@ FORCEINLINE uint16 SWAP_BYTES_16(uint16 a) { } #endif +FORCEINLINE uint32 READ_LE_UINT24(const void *ptr) { + const byte *b = (const byte *)ptr; + return (b[2] << 16) + (b[1] << 8) + (b[0]); +} +FORCEINLINE uint32 READ_BE_UINT24(const void *ptr) { + const byte *b = (const byte*)ptr; + return (b[0] << 16) + (b[1] << 8) + (b[2]); +} #if defined(NEWGUI_256) // 256 color only on PalmOS |