summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-03-27 20:53:47 +0100
committeraap <aap@papnet.eu>2020-03-27 20:53:47 +0100
commite7c18fc17f82c40e937367726e07a58d5d4d7bce (patch)
tree56cb927424f601b27f0bc8821c7761f0e7468724 /src/core/common.h
parentXInput (diff)
downloadre3-e7c18fc17f82c40e937367726e07a58d5d4d7bce.tar
re3-e7c18fc17f82c40e937367726e07a58d5d4d7bce.tar.gz
re3-e7c18fc17f82c40e937367726e07a58d5d4d7bce.tar.bz2
re3-e7c18fc17f82c40e937367726e07a58d5d4d7bce.tar.lz
re3-e7c18fc17f82c40e937367726e07a58d5d4d7bce.tar.xz
re3-e7c18fc17f82c40e937367726e07a58d5d4d7bce.tar.zst
re3-e7c18fc17f82c40e937367726e07a58d5d4d7bce.zip
Diffstat (limited to '')
-rw-r--r--src/core/common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/common.h b/src/core/common.h
index 3127cb12..0cdff871 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -8,10 +8,15 @@
#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>
#include <d3d8types.h>
@@ -30,6 +35,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;