-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Types.h
executable file
·65 lines (53 loc) · 1.32 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright CircumScriptor and DarkNeutrino 2021
#ifndef TYPES_H
#define TYPES_H
#define LOG__INT(msg, ...) printf(msg "%s", __VA_ARGS__);
#define LOGF__INT(file ,msg, ...) fprintf(file, msg "%s", __VA_ARGS__);
#define LOG_DEBUG(...) LOG__INT("\x1B[34mDEBUG: " __VA_ARGS__, "\x1B[37m\n")
#define LOG_INFO(...) LOG__INT("\x1B[36mINFO: " __VA_ARGS__, "\x1B[37m\n")
#define LOG_STATUS(...) LOG__INT("\x1B[32mSTATUS: " __VA_ARGS__, "\x1B[37m\n")
#define LOG_WARNING(...) LOG__INT("\x1B[33mWARNING: " __VA_ARGS__, "\x1B[37m\n")
#define LOG_ERROR(...) LOGF__INT(stderr ,"\x1B[31mERROR: " __VA_ARGS__, "\x1B[37m\n")
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef unsigned long long int uint64;
typedef union
{
uint8 colorArray[4];
uint32 color;
} Color4i;
typedef union
{
uint8 colorArray[3];
uint32 color; //Bitshift required before usage
} Color3i;
typedef struct
{
float x;
float y;
} Vector2f;
typedef struct
{
float x;
float y;
float z;
} Vector3f;
typedef struct
{
long x;
long y;
long z;
} Vector3l;
typedef struct
{
int x;
int y;
int z;
} Vector3i;
typedef struct
{
Vector3f from;
Vector3f to;
} Quad3D;
#endif /* TYPES_H */