Add World.initMinimal

main
copygirl 1 year ago
parent 4b7be3e1f7
commit 1632e53eae
  1. 7
      src/world.zig

@ -32,6 +32,13 @@ pub fn World(comptime ctx: anytype) type {
return result; return result;
} }
pub fn initMinimal(alloc: Allocator) !*Self {
var result = try alloc.create(Self);
result.raw = c.ecs_mini().?;
result.allocator = alloc;
return result;
}
pub fn deinit(self: *Self) void { pub fn deinit(self: *Self) void {
_ = c.ecs_fini(self.raw); _ = c.ecs_fini(self.raw);
self.allocator.destroy(self); self.allocator.destroy(self);

Loading…
Cancel
Save