diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | scumm.h | 8 | ||||
-rw-r--r-- | scummsys.h | 21 | ||||
-rw-r--r-- | sdl.cpp | 10 | ||||
-rw-r--r-- | stdafx.h | 4 |
5 files changed, 37 insertions, 8 deletions
@@ -1,6 +1,6 @@ CC = gcc CFLAGS = -g -O2 -Wno-multichar -DEFINES = -DUNIX -DSCUMM_BIG_ENDIAN -DSCUMM_NEED_ALIGNMENT +DEFINES = -DUNIX LDFLAGS = `sdl-config --libs` INCLUDES= `sdl-config --cflags` CPPFLAGS= $(DEFINES) $(INCLUDES) @@ -17,8 +17,12 @@ * * Change Log: * $Log$ - * Revision 1.1 2001/10/09 14:30:12 strigeus - * Initial revision + * Revision 1.2 2001/10/09 17:38:20 strigeus + * Autodetection of endianness. + * + * Revision 1.1.1.1 2001/10/09 14:30:12 strigeus + * + * initial revision * * */ diff --git a/scummsys.h b/scummsys.h index ae91e1e3e5..7002994999 100644 --- a/scummsys.h +++ b/scummsys.h @@ -17,8 +17,12 @@ * * Change Log: * $Log$ - * Revision 1.1 2001/10/09 14:30:14 strigeus - * Initial revision + * Revision 1.2 2001/10/09 17:38:20 strigeus + * Autodetection of endianness. + * + * Revision 1.1.1.1 2001/10/09 14:30:14 strigeus + * + * initial revision * * */ @@ -44,6 +48,19 @@ typedef signed long int32; #elif defined(UNIX) +/* need this for the SDL_BYTEORDER define */ + +#include <SDL_byteorder.h> + +#if SDL_BYTEORDER == SDL_LIL_ENDIAN +#define SCUMM_LITTLE_ENDIAN +#elif SDL_BYTEORDER == SDL_BIG_ENDIAN +#define SCUMM_BIG_ENDIAN +#define SCUMM_NEED_ALIGNMENT +#else +#error Neither SDL_BIG_ENDIAN nor SDL_LITTLE_ENDIAN is set. +#endif + #define FORCEINLINE inline #define NORETURN #define CDECL @@ -17,12 +17,18 @@ * * Change Log: * $Log$ - * Revision 1.1 2001/10/09 14:30:13 strigeus - * Initial revision + * Revision 1.2 2001/10/09 17:38:20 strigeus + * Autodetection of endianness. + * + * Revision 1.1.1.1 2001/10/09 14:30:13 strigeus + * + * initial revision * * */ +#define NEED_SDL_HEADERS + #include "stdafx.h" #include "scumm.h" @@ -42,7 +42,9 @@ #else +#if defined(NEED_SDL_HEADERS) #include <SDL.h> +#endif #include <sys/types.h> #include <sys/uio.h> #include <unistd.h> @@ -55,4 +57,4 @@ -#endif
\ No newline at end of file +#endif |