mirror of
https://github.com/bailwillharr/engine.git
synced 2024-09-21 13:01:19 +00:00
35 lines
470 B
C++
35 lines
470 B
C++
#include "config.h"
|
|
|
|
#include "game.hpp"
|
|
|
|
#include "logger.hpp"
|
|
#include "window.hpp"
|
|
|
|
#include <exception>
|
|
|
|
int main(int, char *[])
|
|
{
|
|
|
|
engine::setupLog(PROJECT_NAME);
|
|
|
|
INFO("{} v{}", PROJECT_NAME, PROJECT_VERSION);
|
|
|
|
try {
|
|
playGame();
|
|
}
|
|
catch (const std::exception& e) {
|
|
|
|
CRITICAL("{}", e.what());
|
|
|
|
engine::Window::errorBox(e.what());
|
|
#ifndef NDEBUG
|
|
fputs(e.what(), stderr);
|
|
fputc('\n', stderr);
|
|
#endif
|
|
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|