Stephen Gutekanst
f578e1f5e2
{module,ecs}: Mach ECS becomes the Mach' module system
...
This moves the bulk of the ECS code into `src/module`. It also makes
types like `mach.ecs.EntityID` accessible at the top-level `mach.EntityID`
instead.
The motivation of this change is to make the Mach module system a
first-class property of Mach.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
679a05faf4
ecs: refactor comptime.zig -> Archetype.zig
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
2115f5832a
module: write components using a struct pattern
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
17db5498ee
module: write module events using a struct pattern
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
a83f9d5be8
module: rename NamespacedComponents -> ComponentTypesByName
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
df263685ab
ecs: update tests
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
7e0b9dde68
module: components are written in the same style as events
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
0c3ae9a048
ecs: correctly update invalidated pointer post-allocation
...
Potentially fixes hexops/mach#1178
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-06 15:18:38 -07:00
Stephen Gutekanst
5f70579360
src/ecs: move mach-ecs@83a3ed801008a976dd79e10068157b02c3b76a36 package to here
...
Helps hexops/mach#1165
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-03-05 00:22:22 -07:00