module: refactor: pass modules through Entities comptime logic

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-05-04 18:45:36 -07:00
parent 95c9ae5278
commit 2075959dad
5 changed files with 29 additions and 26 deletions

View file

@ -10,6 +10,7 @@ const testing = std.testing;
const assert = std.debug.assert;
const builtin = @import("builtin");
const StringTable = @import("StringTable.zig");
const ComponentTypesByName = @import("module.zig").ComponentTypesByName;
const Archetype = @This();
@ -271,7 +272,8 @@ pub inline fn debugAssertRowType(storage: *Archetype, row: anytype) void {
}
// TODO: comptime refactor
pub fn Slicer(comptime component_types_by_name: anytype) type {
pub fn Slicer(comptime modules: anytype) type {
const component_types_by_name = ComponentTypesByName(modules){};
return struct {
archetype: *Archetype,