mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
rename voxel_engine.cpp to main.cpp
This commit is contained in:
parent
3e01a399f9
commit
27acc1d8b1
3 changed files with 3 additions and 3 deletions
33
src/main.cpp
Normal file
33
src/main.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#include "engine.hpp"
|
||||
#include "files/engine_paths.hpp"
|
||||
#include "util/platform.hpp"
|
||||
#include "util/command_line.hpp"
|
||||
#include "debug/Logger.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
static debug::Logger logger("main");
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
debug::Logger::init("latest.log");
|
||||
|
||||
EnginePaths paths;
|
||||
if (!parse_cmdline(argc, argv, paths))
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
platform::configure_encoding();
|
||||
try {
|
||||
Engine(paths).mainloop();
|
||||
}
|
||||
catch (const initialize_error& err) {
|
||||
logger.error() << "could not to initialize engine\n" << err.what();
|
||||
}
|
||||
#ifdef NDEBUG
|
||||
catch (const std::exception& err) {
|
||||
logger.error() << "uncaught exception: " << err.what();
|
||||
debug::Logger::flush();
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue