diff --git a/meson.build b/meson.build index 46e53a7..6e1f026 100644 --- a/meson.build +++ b/meson.build @@ -178,6 +178,13 @@ executable('arena', override_options: exe_defaults, dependencies: dependencies) +executable('storyboard', + sources + [ 'tools/storyboard.cpp' ], + cpp_args: cpp_args, + link_args: link_args, + override_options: exe_defaults, + dependencies: dependencies) + executable('icongen', [ 'palette.cpp', 'textures.cpp', 'config.cpp', 'dbc.cpp', 'tools/icongen.cpp' ], cpp_args: cpp_args, diff --git a/tools/storyboard.cpp b/tools/storyboard.cpp new file mode 100644 index 0000000..aea00dd --- /dev/null +++ b/tools/storyboard.cpp @@ -0,0 +1,43 @@ +#include "gui/fsm.hpp" +#include "textures.hpp" +#include "sound.hpp" +#include "autowalker.hpp" +#include "ai.hpp" +#include "animation.hpp" +#include +#include "shaders.hpp" +#include "backend.hpp" +#include "game_level.hpp" +#include "gui/fsm_events.hpp" +#include "events.hpp" +#include "constants.hpp" +#include "gui/event_router.hpp" +#include "camera.hpp" + +int main(int, char*[]) { + components::init(); + sfml::Backend backend; + guecs::init(&backend); + animation::init(); + cinematic::init(); + + sf::RenderWindow window(sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}), "Storyboard Editor"); + window.setVerticalSyncEnabled(VSYNC); + if(FRAME_LIMIT) window.setFramerateLimit(FRAME_LIMIT); + window.setPosition({0,0}); + + gui::routing::Router router; + + while(true) { + while(const auto ev = window.pollEvent()) { + auto gui_ev = router.process_event(ev); + + if(gui_ev == gui::Event::QUIT) { + return 0; + } + } + window.display(); + } + + return 0; +}