main.cpp 431 Bytes
Newer Older
Georg Schaefer's avatar
Georg Schaefer committed
1
2
3
4
5
6
#include <iostream>
#include <stdexcept>

#include <SDL.h>

#include <core/engine.hpp>
7
#include <util/stacktrace.hpp>
Georg Schaefer's avatar
Georg Schaefer committed
8

9
int main(int, char* argv[]) {
Elias Broschin's avatar
Elias Broschin committed
10
    try {
Elias Broschin's avatar
Elias Broschin committed
11
        gdw::initStacktrace(argv[0]);
Georg Schaefer's avatar
Georg Schaefer committed
12
13
14
15
16
17
18
19
		gdw::engine e;
		e.run();
	} catch (std::exception& ex) {
		auto result = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", ex.what(), nullptr);
		if (result < 0) {
			std::cout << ex.what() << std::endl;
		}
	}
Elias Broschin's avatar
Elias Broschin committed
20

Georg Schaefer's avatar
Georg Schaefer committed
21
22
	return 0;
}