diff --git a/src/gaemstone.ECS/Query.cs b/src/gaemstone.ECS/Query.cs index a215a74..0f9ff93 100644 --- a/src/gaemstone.ECS/Query.cs +++ b/src/gaemstone.ECS/Query.cs @@ -36,8 +36,8 @@ public unsafe class Query public class QueryDesc : FilterDesc { - public QueryDesc(string expression) : base(expression) { } public QueryDesc(params Term[] terms) : base(terms) { } + public QueryDesc(string expression) : base(expression) { } public new unsafe ecs_query_desc_t ToFlecs(IAllocator allocator) { diff --git a/src/gaemstone.ECS/System.cs b/src/gaemstone.ECS/System.cs index 43aa2c2..49999f5 100644 --- a/src/gaemstone.ECS/System.cs +++ b/src/gaemstone.ECS/System.cs @@ -30,25 +30,6 @@ public static class SystemExtensions callback(new Iterator(world, null, *iter)); } - // [UnmanagedCallersOnly] - // private static unsafe void Run(ecs_iter_t* flecsIter) - // { - // var (world, callback) = CallbackContextHelper - // .Get<(World, Action)>((nint)flecsIter->binding_ctx); - - // // This is what flecs does, so I guess we'll do it too! - // var type = (&flecsIter->next == (delegate*)&ecs_query_next) - // ? IteratorType.Query : (IteratorType?)null; - // using var iter = new Iterator(world, type, *flecsIter); - - // If the method is marked with [Source], set the $This variable. - // if (Method.Get()?.Type is Type sourceType) - // iter.SetThis(World.LookupOrThrow(sourceType)); - - // if (flecsIter->field_count == 0) callback(iter); - // else while (iter.Next()) callback(iter); - // } - [UnmanagedCallersOnly] private static unsafe void FreeContext(void* context) => CallbackContextHelper.Free((nint)context);