diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/common.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/common.h b/src/core/common.h index 3127cb12..7b4ff4a0 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -8,9 +8,12 @@ #pragma warning(disable: 4996) // POSIX names #include <stdint.h> +#include <string.h> #include <math.h> -//#include <assert.h> -#include <new> + +#ifdef WITHWINDOWS +#include <Windows.h> +#endif #ifdef WITHD3D #include <windows.h> @@ -30,6 +33,16 @@ #undef near #endif +#ifndef max +#define max(a,b) ((a) > (b) ? (a) : (b)) +#endif +#ifndef min +#define min(a,b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef ARRAYSIZE +#define ARRAYSIZE(a) (sizeof(a) / sizeof(*(a))) +#endif + typedef uint8_t uint8; typedef int8_t int8; typedef uint16_t uint16; |