2016-03-01 15:47:10 +00:00
|
|
|
#ifndef __BASICTYPES_H
|
|
|
|
#define __BASICTYPES_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2017-03-10 18:46:22 +00:00
|
|
|
typedef uint32_t BITFIELD;
|
2016-03-01 15:47:10 +00:00
|
|
|
typedef int INTBOOL;
|
|
|
|
|
|
|
|
#if !defined(GUID_DEFINED)
|
|
|
|
#define GUID_DEFINED
|
|
|
|
typedef struct _GUID
|
|
|
|
{
|
2017-03-10 15:12:52 +00:00
|
|
|
uint32_t Data1;
|
2017-03-08 17:50:37 +00:00
|
|
|
uint16_t Data2;
|
|
|
|
uint16_t Data3;
|
2017-03-08 17:47:52 +00:00
|
|
|
uint8_t Data4[8];
|
2016-03-01 15:47:10 +00:00
|
|
|
} GUID;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
2016-03-26 11:36:15 +00:00
|
|
|
// fixed point, 32bit as 16.16.
|
2016-03-01 15:47:10 +00:00
|
|
|
//
|
|
|
|
#define FRACBITS 16
|
|
|
|
#define FRACUNIT (1<<FRACBITS)
|
|
|
|
|
2017-03-03 18:35:08 +00:00
|
|
|
typedef int32_t fixed_t;
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
#define FIXED_MAX (signed)(0x7fffffff)
|
|
|
|
#define FIXED_MIN (signed)(0x80000000)
|
|
|
|
|
2016-04-28 13:59:37 +00:00
|
|
|
// the last remnants of tables.h
|
|
|
|
#define ANGLE_90 (0x40000000)
|
|
|
|
#define ANGLE_180 (0x80000000)
|
|
|
|
#define ANGLE_270 (0xc0000000)
|
|
|
|
#define ANGLE_MAX (0xffffffff)
|
|
|
|
|
2017-03-09 18:31:45 +00:00
|
|
|
typedef uint32_t angle_t;
|
2016-04-28 13:59:37 +00:00
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
#define GCCPRINTF(stri,firstargi) __attribute__((format(printf,stri,firstargi)))
|
|
|
|
#define GCCFORMAT(stri) __attribute__((format(printf,stri,0)))
|
|
|
|
#define GCCNOWARN __attribute__((unused))
|
|
|
|
#else
|
|
|
|
#define GCCPRINTF(a,b)
|
|
|
|
#define GCCFORMAT(a)
|
|
|
|
#define GCCNOWARN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|