-
Notifications
You must be signed in to change notification settings - Fork 1
/
Globals.h
93 lines (71 loc) · 2.08 KB
/
Globals.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#pragma once
// Warning disabled ---
#pragma warning( disable : 4577 ) // Warning that exceptions are disabled
#pragma warning( disable : 4530 )
#include <windows.h>
#include <stdio.h>"
#include "lib/nlohmann/json.hpp"
#include <fstream>
#include <iomanip>
#define LOG(format, ...) log(__FILE__, __LINE__, format, __VA_ARGS__);
void log(const char file[], int line, const char* format, ...);
#define LOGC(message, ...) App->gui->console.AddLog(message, __VA_ARGS__);
#define CAP(n) ((n <= 0.0f) ? n=0.0f : (n >= 1.0f) ? n=1.0f : n=n)
#define DEGTORAD 0.0174532925199432957f
#define RADTODEG 57.295779513082320876f
#define HAVE_M_PI 3.14159265358979323846
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned __int32 uint32;
typedef unsigned __int64 uint64;
typedef unsigned long long UID;
enum update_status
{
UPDATE_CONTINUE = 1,
UPDATE_STOP,
UPDATE_ERROR
};
// Configuration -----------
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 720
#define SCREEN_SIZE 1
#define WIN_FULLSCREEN false
#define WIN_RESIZABLE true
#define WIN_BORDERLESS false
#define WIN_FULLSCREEN_DESKTOP false
#define VSYNC false
#define WIN_DOUBLE_BUFFERING false
#define TITLE "Mercury Engine"
//Librarys and paths
#define VERSION "0.4-alpha"
#define ASSETS_FOLDER "/Assets"
#define SETTINGS_FOLDER "/Settings"
#define LIBRARY_FOLDER "/Library"
#define LIBRARY_AUDIO_FOLDER "/Library/Audio"
#define LIBRARY_TEXTURES_FOLDER "/Library/Textures"
#define LIBRARY_MESH_FOLDER "/Library/Meshes"
#define LIBRARY_ANIMATION_FOLDER "/Library/Animations"
#define LIBRARY_SCENE_FOLDER "/Library/Scenes"
#define LIBRARY_MODEL_FOLDER "/Library/GameObjects"
#define LIBRARY_MATERIAL_FOLDER "/Library/Materials"
#define LIBRARY_STATE_MACHINE_FOLDER "/Library/StateMachines"
using json = nlohmann::json;
//Userfull defines
// Deletes a buffer
#define RELEASE( x )\
{\
if( x != nullptr )\
{\
delete x;\
x = nullptr;\
}\
}
// Deletes an array of buffers
#define RELEASE_ARRAY( x )\
{\
if( x != nullptr )\
{\
delete[] x;\
x = nullptr;\
}\
}