Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
Latest commit
33 lines (28 loc) · 969 Bytes
/
Copy pathMain.cpp
File metadata and controls
33 lines (28 loc) · 969 Bytes
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
#include"EditorApp.h"
#include"EditorUtil.h"
#include"ContentFile.h"
#include"winalleg.h"
#include"loadpng.h"
usingnamespaceRTEGUI;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// <summary>
/// Entry point for the GUI editor app.
/// </summary>
intAPIENTRYWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
allegro_init();
loadpng_init();
g_GUIEditor.Initialize();
std::chrono::steady_clock::time_point frameTimeStart;
while (true) {
if (!g_GUIEditor.UpdateEditor()) {
break;
}
frameTimeStart = std::chrono::high_resolution_clock::now();
vsync();
g_GUIEditor.DrawEditor();
EditorApp::s_FrameTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - frameTimeStart).count();
}
g_GUIEditor.DestroyBackBuffers();
ContentFile::FreeAllLoaded();
std::exit(EXIT_SUCCESS);
}