aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2004-06-22 23:52:31 +0000
committerEugene Sandulenko2004-06-22 23:52:31 +0000
commita350fcda0d02806a0593d556745e16226543eaa0 (patch)
tree6a29f09ad444902e340f45fdaeaaa9f383168e56
parent2cd355107e6c83503130b1ad8c63afa9dd4ef2a0 (diff)
downloadscummvm-rg350-a350fcda0d02806a0593d556745e16226543eaa0.tar.gz
scummvm-rg350-a350fcda0d02806a0593d556745e16226543eaa0.tar.bz2
scummvm-rg350-a350fcda0d02806a0593d556745e16226543eaa0.zip
Implement 24-bit read from memory functions
svn-id: r14002
-rw-r--r--common/scummsys.h8
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