8#ifndef GALAXY_CORE_APPLICATION_HPP_
9#define GALAXY_CORE_APPLICATION_HPP_
35 explicit App(
const std::string& config_file =
"config.json");
App(const App &)=delete
Copy constructor.
void setup_config(std::string_view config_file)
void run()
Main game loop.
App(const std::string &config_file="config.json")
Default constructor.
void load()
Loads the default appdata file.
App & operator=(const App &)=delete
Copy assignment operator.
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.
App & operator=(App &&)=delete
Move assignment operator.
LoopFunc m_render
Render step in gameloop.
App(App &&)=delete
Move constructor.
LoopFunc m_update
Update step in gameloop.