8#ifndef GALAXY_CORE_APPLICATION_HPP_
9#define GALAXY_CORE_APPLICATION_HPP_
14#include <SDL3/SDL_events.h>
37 explicit App(
const std::string& config_file =
"config.json");
73 SDL_Event&
events() noexcept;
Base level class for any galaxy app.
void setup_config(std::string_view config_file)
void run()
Loads the default appdata file.
SDL_Event & events() noexcept
Get event data.
App(const std::string &config_file="config.json")
Default constructor.
SDL_Event m_events
Core event data.
void set_render_func(LoopFunc &&render)
Use a custom rendering step in game loop.
std::move_only_function< void(App *app)> LoopFunc
Defines a callback for update() or render() loops in app.run().
void set_update_func(LoopFunc &&update)
Use a custom update step in game loop.
LoopFunc m_render
Render step in gameloop.
LoopFunc m_update
Update step in gameloop.