diff --git a/zig-ecs/src/ecs.zig b/zig-ecs/src/ecs.zig index e8ac5aa..b4ecd4d 100644 --- a/zig-ecs/src/ecs.zig +++ b/zig-ecs/src/ecs.zig @@ -6,11 +6,13 @@ pub const ComponentStorage = @import("ecs/component_storage.zig").ComponentStora pub const Entity = @import("ecs/registry.zig").Entity; pub const Registry = @import("ecs/registry.zig").Registry; +pub const EntityHandles = @import("ecs/registry.zig").EntityHandles; pub const BasicView = @import("ecs/views.zig").BasicView; pub const BasicMultiView = @import("ecs/views.zig").BasicMultiView; pub const BasicGroup = @import("ecs/groups.zig").BasicGroup; pub const OwningGroup = @import("ecs/groups.zig").OwningGroup; pub const SparseSet = @import("ecs/sparse_set.zig").SparseSet; +pub const utils = @import("ecs/utils.zig"); // signals pub const Signal = @import("signals/signal.zig").Signal; diff --git a/zig-ecs/src/ecs/registry.zig b/zig-ecs/src/ecs/registry.zig index 1cc554d..d87388c 100644 --- a/zig-ecs/src/ecs/registry.zig +++ b/zig-ecs/src/ecs/registry.zig @@ -14,7 +14,7 @@ const root = @import("root"); pub const entity_traits = if (@hasDecl(root, "EntityTraits")) root.EntityTraits.init() else @import("entity.zig").EntityTraits.init(); // setup the Handles type based on the type set in EntityTraits -const EntityHandles = Handles(entity_traits.entity_type, entity_traits.index_type, entity_traits.version_type); +pub const EntityHandles = Handles(entity_traits.entity_type, entity_traits.index_type, entity_traits.version_type); pub const Entity = entity_traits.entity_type; const BasicView = @import("views.zig").BasicView; diff --git a/zig-ecs/src/ecs/views.zig b/zig-ecs/src/ecs/views.zig index 1afe904..c59c4da 100644 --- a/zig-ecs/src/ecs/views.zig +++ b/zig-ecs/src/ecs/views.zig @@ -142,7 +142,7 @@ pub fn MultiView(comptime n_includes: usize, comptime n_excludes: usize) type { utils.sortSub(usize, u32, sub_items[0..], self.type_ids[0..], asc_usize.sort); } - pub fn iterator(self: *Self) Iterator { + pub fn entityIterator(self: *Self) Iterator { self.sort(); return Iterator.init(self); }