summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-28 13:24:55 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-28 13:24:55 +0100
commit9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18 (patch)
tree6e220fddfcabc63c477335fb1ddccefe7b6d5e0d /src/core/common.h
parentgarages part 1 (diff)
parentremove include <new> from common.h (diff)
downloadre3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.gz
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.bz2
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.lz
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.xz
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.tar.zst
re3-9fb101fdd96c82f73f8b09a75a2f248e1ccc0f18.zip
Diffstat (limited to 'src/core/common.h')
-rw-r--r--src/core/common.h17
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;