-
Notifications
You must be signed in to change notification settings - Fork 1
/
GAE_Types.h
47 lines (33 loc) · 1.32 KB
/
GAE_Types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _GLESGAE_TYPES_H_
#define _GLESGAE_TYPES_H_
#include <stdint.h>
extern const unsigned int GAE_INVALID;
#define GAE_UNUSED(x) {(void)(x);}
#define GAE_TRUE 1
#define GAE_FALSE 0
#define GAE_PI 3.14159265358979323846F
#define GAE_DEG2RAD(x) (x * GAE_PI / 180.0F)
#define GAE_RAD2DEG(x) (x * 180.0F / GAE_PI)
#define GAE_MIN(a, b) ((a) < (b) ? (a) : (b))
#define GAE_MAX(a, b) ((a) > (b) ? (a) : (b))
#define GAE_LERP(a, b, time) ( (a) + (time) * (float) ((b) - (a)) )
#define GAE_CLAMP(val, low, hi) ((val) < (low) ? (low) : (val) > (hi) ? (hi) : (val))
#define VEC_X 0
#define VEC_Y 1
#define VEC_Z 2
typedef unsigned int GAE_HashString_t;
typedef unsigned int GAE_EntityId_t;
typedef GAE_HashString_t GAE_ComponentType_t;
typedef int GAE_BOOL;
typedef unsigned char GAE_BYTE;
typedef float GAE_Vector_t;
typedef GAE_Vector_t GAE_Vector2_t[2];
typedef GAE_Vector_t GAE_Vector3_t[3];
typedef GAE_Vector_t GAE_Vector4_t[4];
typedef GAE_Vector_t GAE_Matrix2_t[4];
typedef GAE_Vector_t GAE_Matrix3_t[9];
typedef GAE_Vector_t GAE_Matrix4_t[16];
typedef float GAE_Point_t; /* point in time */
typedef GAE_Point_t GAE_Point2D_t[2]; /* x, y point - could be GAE_Vector2_t but sometimes nice to be specific */
typedef GAE_Point_t GAE_Point3D_t[3]; /* x, y, z point - could be GAE_Vector3_t but sometimes nice to be specific */
#endif