From 4d65be826412e8a41fb714f19deb804bfd7599a0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 7 Mar 2012 21:58:08 -0500 Subject: COMMON: Add a READ_UINT24 macro Complements READ_UINT16 and READ_UINT32 --- common/endian.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/endian.h b/common/endian.h index 1760dc74b2..394437ec67 100644 --- a/common/endian.h +++ b/common/endian.h @@ -396,4 +396,10 @@ inline uint32 READ_BE_UINT24(const void *ptr) { return (b[0] << 16) | (b[1] << 8) | (b[2]); } +#ifdef SCUMM_LITTLE_ENDIAN +#define READ_UINT24(a) READ_LE_UINT24(a) +#else +#define READ_UINT24(a) READ_BE_UINT24(a) +#endif + #endif -- cgit v1.2.3