AnimEngine
All Classes Namespaces Functions
common.h
1 #pragma once
2 #ifndef COMMON_H_
3 #define COMMON_H_
4 
5 #include <assert.h>
6 
7 #define MAX(_A, _B) ((_A) > (_B) ? (_A) : (_B))
8 #define MIN(_A, _B) ((_A) < (_B) ? (_A) : (_B))
9 #define CLAMP(_A, _MIN, _MAX) ( _A > _MAX ? (_MAX) : (_A < _MIN ? (_MIN) : (_A) ) )
10 #define FNOT(_F) (1.0f - (_F))
11 
12 #ifndef STRIFY
13  #define _STRIFY(_PD) #_PD
14  #define STRIFY(_PD) _STRIFY(_PD)
15 #endif
16 
17 #define PING() {fprintf(stderr,"PING! (%d:%s)\n",__LINE__,__FILE__);}
18 
19 #ifndef BASETYPES
20  #define BASETYPES
21  typedef unsigned UINT;
22  typedef unsigned long ULONG;
23  typedef ULONG *PULONG;
24  typedef unsigned short USHORT;
25  typedef USHORT *PUSHORT;
26  typedef unsigned char UCHAR;
27  typedef UCHAR *PUCHAR;
28 #endif
29 
30 
31 #endif