#ifndef __BASICTYPES_H #define __BASICTYPES_H #ifdef _MSC_VER typedef __int8 SBYTE; typedef unsigned __int8 BYTE; typedef __int16 SWORD; typedef unsigned __int16 WORD; typedef __int32 SDWORD; typedef unsigned __int32 uint32; typedef __int64 SQWORD; typedef unsigned __int64 QWORD; #else #include typedef int8_t SBYTE; typedef uint8_t BYTE; typedef int16_t SWORD; typedef uint16_t WORD; typedef int32_t SDWORD; typedef uint32_t uint32; typedef int64_t SQWORD; typedef uint64_t QWORD; #endif // windef.h, included by windows.h, has its own incompatible definition // of DWORD as a long. In files that mix Doom and Windows code, you // must define USE_WINDOWS_DWORD before including doomtype.h so that // you are aware that those files have a different DWORD than the rest // of the source. #ifndef USE_WINDOWS_DWORD typedef uint32 DWORD; #endif typedef uint32 BITFIELD; typedef int INTBOOL; // a 64-bit constant #ifdef __GNUC__ #define CONST64(v) (v##LL) #define UCONST64(v) (v##ULL) #else #define CONST64(v) ((SQWORD)(v)) #define UCONST64(v) ((QWORD)(v)) #endif #if !defined(GUID_DEFINED) #define GUID_DEFINED typedef struct _GUID { DWORD Data1; WORD Data2; WORD Data3; BYTE Data4[8]; } GUID; #endif union QWORD_UNION { QWORD AsOne; struct { #ifdef __BIG_ENDIAN__ unsigned int Hi, Lo; #else unsigned int Lo, Hi; #endif }; }; // // Fixed point, 32bit as 16.16. // #define FRACBITS 16 #define FRACUNIT (1<