forked from rgriege/Violet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
all.h
143 lines (132 loc) · 2.85 KB
/
all.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#ifndef VIOLET_ALL_H
#define VIOLET_ALL_H
/* Core */
#include "violet/core.h"
/* Data structures */
#include "violet/array.h"
#include "violet/list.h"
/* Math */
#include "violet/dmath.h"
#include "violet/fmath.h"
#include "violet/imath.h"
#include "violet/geom.h"
/* Serialization */
#include "violet/vson.h"
#include "violet/base64.h"
/* String */
#include "violet/string.h"
#include "violet/localize.h"
#include "violet/utf8.h"
/* OS */
#include "violet/os.h"
/* Profiler */
#include "violet/profiler.h"
/* Gui */
#include "violet/color.h"
#ifndef VIOLET_NO_GUI
#include "violet/gui.h"
#include "violet/sdl_gl.h"
#else
#include "violet/stbi.h"
#include "violet/img_stub.h"
#endif
/* Audio */
#include "violet/audio.h"
/* Undo/Redo System */
#include "violet/event.h"
#include "violet/store.h"
#include "violet/transaction.h"
/* Additional utilities useful when using the entire library */
static inline
v2f v2i_to_v2f(v2i v)
{
return (v2f){ .x = v.x, .y = v.y };
}
static inline
v2i v2f_to_v2i(v2f v)
{
return (v2i){ .x = v.x, .y = v.y };
}
static inline
v2f v2d_to_v2f(v2d v)
{
return (v2f){ .x = v.x, .y = v.y };
}
static inline
v2d v2f_to_v2d(v2f v)
{
return (v2d){ .x = v.x, .y = v.y };
}
static inline
v2i v2d_to_v2i(v2d v)
{
return (v2i){ .x = v.x, .y = v.y };
}
static inline
v2d v2i_to_v2d(v2i v)
{
return (v2d){ .x = v.x, .y = v.y };
}
#endif // VIOLET_ALL_H
#ifdef VIOLET_IMPLEMENTATION
#define ARRAY_IMPLEMENTATION
#define AUDIO_IMPLEMENTATION
#define BASE64_IMPLEMENTATION
#define COLOR_IMPLEMENTATION
#define CORE_IMPLEMENTATION
#define DMATH_IMPLEMENTATION
#define EVENT_IMPLEMENTATION
#define FMATH_IMPLEMENTATION
#define GEOM_IMPLEMENTATION
#define GUI_IMPLEMENTATION
#define IMATH_IMPLEMENTATION
#define IMG_STUB_IMPLEMENTATION
#define LIST_IMPLEMENTATION
#define LOCALIZE_IMPLEMENTATION
#define OS_IMPLEMENTATION
#define PROFILER_IMPLEMENTATION
#define SDL_GL_IMPLEMENTATION
#define STORE_IMPLEMENTATION
#define STRING_IMPLEMENTATION
#define TRANSACTION_IMPLEMENTATION
#define UTF8_IMPLEMENTATION
#define VSON_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#undef VIOLET_IMPLEMENTATION
#endif
/* Core */
#include "violet/core.h"
/* Data structures */
#include "violet/array.h"
#include "violet/list.h"
/* Math */
#include "violet/dmath.h"
#include "violet/fmath.h"
#include "violet/imath.h"
#include "violet/geom.h"
/* Serialization */
#include "violet/vson.h"
#include "violet/base64.h"
/* String */
#include "violet/string.h"
#include "violet/localize.h"
#include "violet/utf8.h"
/* OS */
#include "violet/os.h"
/* Profiler */
#include "violet/profiler.h"
/* Gui */
#include "violet/color.h"
#ifndef VIOLET_NO_GUI
#include "violet/gui.h"
#include "violet/sdl_gl.h"
#else
#include "violet/stbi.h"
#include "violet/img_stub.h"
#endif
/* Audio */
#include "violet/audio.h"
/* Undo/Redo System */
#include "violet/event.h"
#include "violet/store.h"
#include "violet/transaction.h"