#define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h" // 4 load
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb/stb_image_write.h" // 4 save
#include "hostGLFW.hpp"
#include "a83/terminal.hpp"
#include <iostream>
int main(int argc, char** argv) {
  using namespace a83;
  using namespace std;
  try {
    HostGLFW::init(argc, argv);
    HostGLFW::loop();
    HostGLFW::free();
  }
  catch (CN(exception) ex) {
    terminal_color(term_col::RED);
    #pragma omp critical
    cerr << "Error: " << ex.what() << endl;
    terminal_color(term_col::LIGHT_GRAY);
    return EXIT_FAILURE;
  }
  catch (...) {
    terminal_color(term_col::RED);
    #pragma omp critical
    cerr << "unknown error" << endl;
    terminal_color(term_col::LIGHT_GRAY);
    return EXIT_FAILURE;
  }
  return EXIT_SUCCESS;
}