start yaze_delta side project

This commit is contained in:
Justin Scofield
2022-09-10 18:48:47 -05:00
parent 1244e6855c
commit 3d2cd4dc79
6 changed files with 293 additions and 0 deletions

33
src/app/delta/delta.cc Normal file
View File

@@ -0,0 +1,33 @@
#if defined(_WIN32)
#define main SDL_main
#endif
#include "absl/debugging/failure_signal_handler.h"
#include "absl/debugging/symbolize.h"
#include "app/core/controller.h"
#include "app/delta/viewer.h"
int main(int argc, char** argv) {
absl::InitializeSymbolizer(argv[0]);
absl::FailureSignalHandlerOptions options;
absl::InstallFailureSignalHandler(options);
yaze::app::core::Controller controller;
yaze::app::delta::Viewer viewer;
auto entry_status = controller.onEntry();
if (!entry_status.ok()) {
// TODO(@scawful): log the specific error
return EXIT_FAILURE;
}
while (controller.isActive()) {
controller.onInput();
viewer.Update();
controller.doRender();
}
controller.onExit();
return EXIT_SUCCESS;
}