preliminary work on ecs
This commit is contained in:
parent
d5d2f1b8d2
commit
7ce5902ec9
5 changed files with 147 additions and 102 deletions
|
|
@ -8,6 +8,8 @@ const math = @import("math.zig");
|
|||
const Parser = @import("mods/parse.zig");
|
||||
const vm = @import("mods/vm.zig");
|
||||
const wasm = @import("mods/wasm.zig");
|
||||
const components = @import("ecs/components.zig");
|
||||
const entities = @import("ecs/entities.zig");
|
||||
|
||||
pub fn main() !void {
|
||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
|
|
@ -23,10 +25,14 @@ pub fn main() !void {
|
|||
//defer runtime.deinit(allocator);
|
||||
|
||||
//var parameters = [_]usize{};
|
||||
//try runtime.callExternal(allocator, "fibonacci", ¶meters);
|
||||
//try runtime.callExternal(allocator, "calculate_fibonacci", ¶meters);
|
||||
const w = try window.Window.create(800, 600, "sideros");
|
||||
defer w.destroy();
|
||||
|
||||
var pool = try entities.Pool.init(allocator);
|
||||
_ = try pool.createEntity();
|
||||
//try pool.addComponent(entity, components.Speed{ .speed = 0.0 });
|
||||
|
||||
// TODO(luccie-cmd): Renderer.create shouldn't return an error
|
||||
var r = try Renderer.create(allocator, w);
|
||||
defer r.destroy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue