37 lines
993 B
C++
37 lines
993 B
C++
#include <spdlog/spdlog.h>
|
|
#include <spdlog/sinks/stdout_color_sinks.h>
|
|
#include "gui/window.hpp"
|
|
#include "gui/menu/menu_data.hpp"
|
|
#include "gui/gui_data.hpp"
|
|
#include "gui/gui.hpp"
|
|
#include "controller.hpp"
|
|
#include "character_sheet.hpp"
|
|
|
|
int main() {
|
|
std::ios::sync_with_stdio(false);
|
|
spdlog::set_default_logger(spdlog::stdout_color_st("BillySheet"));
|
|
|
|
try {
|
|
gui::Window window;
|
|
character::CharacterSheet billy;
|
|
gui::GuiData gui_data(billy);
|
|
gui::menu::MenuData menu_data(billy);
|
|
Controller controller(billy, menu_data);
|
|
gui::Gui gui(window, gui_data, menu_data);
|
|
|
|
while (!window.should_close()) {
|
|
glfwPollEvents();
|
|
controller.control_sheet();
|
|
|
|
gui.render_gui(controller);
|
|
gui.render_gpu();
|
|
|
|
window.swap_buffers();
|
|
}
|
|
} catch (const std::exception &e) {
|
|
SPDLOG_CRITICAL(e.what());
|
|
return EXIT_FAILURE;
|
|
}
|
|
return EXIT_SUCCESS;
|
|
}
|