Setup ecs system scaffolding

This commit is contained in:
2026-07-02 13:09:11 +01:00
parent 821255a065
commit 4c53e5fee6
3 changed files with 25 additions and 1 deletions
+13 -1
View File
@@ -8,7 +8,8 @@
enum Type { IMAGE,
TEXT,
RECT };
RECT,
WORLD };
enum ClickMode { PASS,
BLOCK,
@@ -82,6 +83,17 @@ struct ERect : Element {
void render(uint64_t) override;
};
struct EWorld : Element {
#warning need to implement ecs system first before implementing this
uint64_t world_id = UINT64_MAX;
EWorld(uint64_t world_id) : Element(Type::WORLD), world_id(world_id) {}
Vec2<float> size() override;
void render(uint64_t) override;
};
inline Pool<Element> element_pool;
} // namespace app
+10
View File
@@ -0,0 +1,10 @@
#ifndef ECS_H
#define ECS_H
#include "utils.h"
struct Entity;
struct Component;
struct System;
#endif
+2
View File
@@ -320,3 +320,5 @@ Requirements v1:
- then specifics of what ill need to actually make this, like the libaries, languages & hardware ill use with reasons of why, can have a big section on stuff like explaining why i chose sdl3 for rendering, or mruby (mostly because of mruby precompiling and how i can prepack the engine into a single binary)
- and finally a rigid list of requirements of things it should be doing by the end with 2 priority levels and this time just the list and not any justifications this time
# REDO section on sdl3 and mruby again