ecs: remove half-baked system implementation

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-06-25 18:33:11 -07:00 committed by Stephen Gutekanst
parent f74faf90df
commit 98ec7f5190
2 changed files with 4 additions and 68 deletions

View file

@ -51,13 +51,13 @@ test "example" {
const modules = Modules(.{
.physics = Module(.{
.components = .{
.id = u16,
.id = u32,
},
.globals = struct{
.globals = struct {
pointer: u8,
},
}),
.geometry = Module(.{
.renderer = Module(.{
.components = .{
.id = u16,
},
@ -77,35 +77,8 @@ test "example" {
const player2 = try world.entities.new();
const player3 = try world.entities.new();
try world.entities.setComponent(player1, .physics, .id, 1234);
try world.entities.setComponent(player1, .geometry, .id, 1234);
try world.entities.setComponent(player1, .renderer, .id, 1234);
try world.entities.setComponent(player2, .physics, .id, 1234);
try world.entities.setComponent(player3, .physics, .id, 1234);
// TODO: integrate systems with modules.
// const physics = (struct {
// pub fn physics(adapter: *Adapter(modules)) void {
// var iter = adapter.query(&.{"physics"});
// std.debug.print("\nphysics ran\n", .{});
// while (iter.next()) |row| {
// std.debug.print("found entity: {}\n", .{row.entity});
// defer row.unlock();
// }
// }
// }).physics;
// try world.register("physics", physics);
// const rendering = (struct {
// pub fn rendering(adapter: *Adapter(modules)) void {
// var iter = adapter.query(&.{"geometry"});
// std.debug.print("\nrendering ran\n", .{});
// while (iter.next()) |row| {
// std.debug.print("found entity: {}\n", .{row.entity});
// defer row.unlock();
// }
// }
// }).rendering;
// try world.register("rendering", rendering);
world.tick();
}