-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAyanami.cpp
More file actions
26 lines (22 loc) · 823 Bytes
/
Ayanami.cpp
File metadata and controls
26 lines (22 loc) · 823 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
#include "Core/Cinq.hpp"
#include "Core/Logger.hpp"
#include "Window/Window.hpp"
#include "Window/Windows.hpp"
#include "Window/Exception.hpp"
// TODO: More/better error handling
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, char *cmdLine, int cmdShow) {
const int width = 1600;
const float aspectRatio = 2 / 1.;
const int height = width / aspectRatio;
try {
Cinq cinq(width, height, "Cinq");
cinq.run();
} catch (const CinqException &e) {
MessageBox(nullptr, e.what(), e.getType(), MB_OK | MB_ICONERROR);
} catch (const std::exception &e) {
MessageBox(nullptr, e.what(), "Exception", MB_OK | MB_ICONERROR);
} catch (...) {
MessageBox(nullptr, "Unknown error", "Unknown Error", MB_OK | MB_ICONERROR);
}
return -1;
}