|
|
|
@ -14,22 +14,18 @@ pub const MAX_ENTITIES = 256; |
|
|
|
|
pub const MAX_INVOCATIONS = 1024; |
|
|
|
|
|
|
|
|
|
pub const Probe = struct { |
|
|
|
|
system: c.ecs_entity_t, |
|
|
|
|
event: c.ecs_entity_t, |
|
|
|
|
eventId: c.ecs_id_t, |
|
|
|
|
offset: usize, |
|
|
|
|
count: usize, |
|
|
|
|
invoked: usize, |
|
|
|
|
termCount: usize, |
|
|
|
|
termIndex: usize, |
|
|
|
|
e: [MAX_ENTITIES]c.ecs_entity_t, |
|
|
|
|
c: [MAX_SYS_COLUMNS][MAX_INVOCATIONS]c.ecs_entity_t, |
|
|
|
|
s: [MAX_SYS_COLUMNS][MAX_INVOCATIONS]c.ecs_entity_t, |
|
|
|
|
param: ?*anyopaque, |
|
|
|
|
|
|
|
|
|
pub fn init() Probe { |
|
|
|
|
return std.mem.zeroes(Probe); |
|
|
|
|
} |
|
|
|
|
system: c.ecs_entity_t = 0, |
|
|
|
|
event: c.ecs_entity_t = 0, |
|
|
|
|
eventId: c.ecs_id_t = 0, |
|
|
|
|
offset: usize = 0, |
|
|
|
|
count: usize = 0, |
|
|
|
|
invoked: usize = 0, |
|
|
|
|
termCount: usize = 0, |
|
|
|
|
termIndex: usize = 0, |
|
|
|
|
e: [MAX_ENTITIES]c.ecs_entity_t = .{0} ** MAX_ENTITIES, |
|
|
|
|
c: [MAX_SYS_COLUMNS][MAX_INVOCATIONS]c.ecs_entity_t = .{.{0} ** MAX_INVOCATIONS} ** MAX_SYS_COLUMNS, |
|
|
|
|
s: [MAX_SYS_COLUMNS][MAX_INVOCATIONS]c.ecs_entity_t = .{.{0} ** MAX_INVOCATIONS} ** MAX_SYS_COLUMNS, |
|
|
|
|
param: ?*anyopaque = null, |
|
|
|
|
|
|
|
|
|
pub fn probeSystemWithContext(ctx: *Probe, it: Iter) !void { |
|
|
|
|
ctx.param = it.raw.param; |
|
|
|
|