Refractor headers and split code into program files for app & localization files.

Split keybinds from window.h file. General cleanup
This commit is contained in:
2026-06-01 23:20:07 +01:00
parent dcb8b46245
commit c24285b0af
11 changed files with 755 additions and 646 deletions
+33
View File
@@ -0,0 +1,33 @@
#ifndef SCENE_H
#define SCENE_H
#include "app/elements.h"
#include "bindings/ruby.h"
#include "utils.h"
#include "window/window.h"
namespace app {
struct Scene {
std::vector<uint64_t> element_ids;
Ruby::Block update;
~Scene();
void add_element(uint64_t element_id);
void delete_element(uint64_t element_id);
void update_scene(mrb_value dt_val);
void click(Vec2<float> position);
void render(uint64_t abs_time);
std::vector<uint64_t> elements_at(Vec2<float> position);
Vec2<float> world_to_local(Vec2<float> p, Element *e);
};
inline Pool<Scene> scene_pool;
} // namespace app
#endif