-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.cpp
45 lines (41 loc) · 800 Bytes
/
Build.cpp
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
#include "Build.h"
#include "Flat.h"
#include "debug/Exception.h"
#include "graphics/GraphicsAPI.h"
#include "memory/Heap.h"
#ifdef FL_GRAPHICS_SDL
#include <SDL2/SDL_main.h>
int SDL_main(int argc, char **argv)
{
fl::initialize();
flmain();
fl::cleanup();
return 0;
}
#else
int main(int argc, char **argv)
{
fl::initialize();
flmain();
fl::cleanup();
}
#endif
namespace fl
{
void runtimeAssert(bool condition)
{
if (!condition)
{
fl::log::fatal("Assertion failed");
fl::exception::crash();
}
}
void runtimeAssert(bool condition, const char *message)
{
if (!condition)
{
fl::log::fatal("Assertation failed: ", message);
fl::exception::crash();
}
}
}