2020-07-21 11:03:22 +00:00
|
|
|
#include <SFML/System.hpp>
|
|
|
|
#include <SFML/Window.hpp>
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
|
2020-07-21 11:15:10 +00:00
|
|
|
#include <imgui.h>
|
|
|
|
#include <imgui-SFML.h>
|
|
|
|
|
2020-07-21 11:34:39 +00:00
|
|
|
#include "state.hpp"
|
|
|
|
|
2020-08-09 07:14:33 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#include "windows.h"
|
|
|
|
|
|
|
|
int WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd) {
|
|
|
|
// init
|
|
|
|
Tri::State state(0, nullptr);
|
|
|
|
|
|
|
|
// main loop
|
|
|
|
while(state.get_flags().test(1)) {
|
|
|
|
state.handle_events();
|
|
|
|
state.update();
|
|
|
|
state.draw();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#else
|
2020-07-21 11:03:22 +00:00
|
|
|
int main(int argc, char **argv) {
|
2020-07-21 11:15:10 +00:00
|
|
|
// init
|
2020-07-22 06:19:37 +00:00
|
|
|
Tri::State state(argc, argv);
|
2020-07-21 11:34:39 +00:00
|
|
|
|
2020-07-21 11:15:10 +00:00
|
|
|
// main loop
|
2020-07-22 06:19:37 +00:00
|
|
|
while(state.get_flags().test(1)) {
|
2020-07-22 06:11:10 +00:00
|
|
|
state.handle_events();
|
2020-07-21 11:34:39 +00:00
|
|
|
state.update();
|
|
|
|
state.draw();
|
2020-07-21 11:15:10 +00:00
|
|
|
}
|
|
|
|
|
2020-07-21 11:03:22 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2020-08-09 07:14:33 +00:00
|
|
|
#endif
|