light/modules/app/public/entrypoint.hpp
light7734 cd886aa8c9
Some checks reported errors
continuous-integration/drone/push Build was killed
refactor: flatten directory structure
2025-07-20 04:46:15 +03:30

27 lines
595 B
C++

#pragma once
#include <app/application.hpp>
int main(int argc, char *argv[]) // NOLINT
try
{
std::ignore = argc;
std::ignore = argv;
auto application = lt::Scope<lt::Application> {};
application = lt::create_application();
lt::ensure(application, "Failed to create application");
lt::ensure(application->sanity_check(), "Failed to verify the sanity of the application");
application->game_loop();
return EXIT_SUCCESS;
}
catch (const std::exception &exp)
{
log_crt("Terminating due to uncaught exception:");
log_crt("\texception.what(): {}", exp.what());
return EXIT_FAILURE;
}