#include "Engine/Application.h" #include using namespace SiegeDeck; int main(const int argc, char** argv) { auto config = Engine::AppConfig::FromArgs(argc, argv); if (!config) { spdlog::error("{}", config.error()); spdlog::info("usage: {} [--frames N] [--seed N] [--fullscreen]", argv[0]); return 2; } // Fatal errors (startup, broken invariants) are exceptions and end up here. Recoverable // ones (assets, scripts) are std::expected and are handled where they happen. try { Engine::Application app { std::move(*config) }; return app.Run(); } catch (const std::exception& e) { spdlog::critical("{}", e.what()); return 1; } }