From a350fcda0d02806a0593d556745e16226543eaa0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 22 Jun 2004 23:52:31 +0000 Subject: Implement 24-bit read from memory functions svn-id: r14002 --- common/scummsys.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common/scummsys.h') 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 -- cgit v1.2.3