diff options
Diffstat (limited to 'scummsys.h')
-rw-r--r-- | scummsys.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/scummsys.h b/scummsys.h index e1513f6372..301622f134 100644 --- a/scummsys.h +++ b/scummsys.h @@ -17,6 +17,9 @@ * * Change Log: * $Log$ + * Revision 1.4 2001/10/16 10:01:47 strigeus + * preliminary DOTT support + * * Revision 1.3 2001/10/09 18:35:02 strigeus * fixed object parent bug * fixed some signed/unsigned comparisons @@ -36,6 +39,13 @@ #pragma warning (disable: 4101) +#if defined(CHECK_HEAP) +#undef CHECK_HEAP +#define CHECK_HEAP checkHeap(); +#else +#define CHECK_HEAP +#endif + #define SCUMM_LITTLE_ENDIAN #define FORCEINLINE __forceinline @@ -55,8 +65,9 @@ typedef signed long int32; #elif defined(UNIX) -/* need this for the SDL_BYTEORDER define */ +#define CHECK_HEAP +/* need this for the SDL_BYTEORDER define */ #include <SDL_byteorder.h> #if SDL_BYTEORDER == SDL_LIL_ENDIAN @@ -122,6 +133,9 @@ uint32 FORCEINLINE READ_BE_UINT32(void *ptr) { #define FROM_LE_32(__a__) __a__ #define FROM_LE_16(__a__) __a__ +#define TO_LE_32(__a__) __a__ +#define TO_LE_16(__a__) __a__ + #define TO_BE_32(a) ((((a)>>24)&0xFF) | (((a)>>8)&0xFF00) | (((a)<<8)&0xFF0000) | (((a)<<24)&0xFF000000)) #elif defined(SCUMM_BIG_ENDIAN) @@ -136,6 +150,9 @@ uint16 FORCEINLINE FROM_LE_16(uint16 a) { return ((a>>8)&0xFF) + ((a<<8)&0xFF00); } +#define TO_LE_32 FROM_LE_32 +#define TO_LE_16 FROM_LE_16 + uint32 FORCEINLINE READ_LE_UINT32(void *ptr) { byte *b = (byte*)ptr; return (b[3]<<24)+(b[2]<<16)+(b[1]<<8)+(b[0]); @@ -158,7 +175,6 @@ int FORCEINLINE READ_BE_UINT16_UNALIGNED(void *ptr) { return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1]; } - uint32 FORCEINLINE READ_BE_UINT32_UNALIGNED(void *ptr) { byte *b = (byte*)ptr; return (b[0]<<24)+(b[1]<<16)+(b[2]<<8)+(b[3]); |