Fix compile errors due to changes in flecs-cs

main
copygirl 2 years ago
parent 063fb40c5c
commit 5600a6f0ee
  1. 8
      src/gaemstone.ECS/EntityBuilder.cs
  2. 2
      src/gaemstone.ECS/EntityPath.cs
  3. 2
      src/gaemstone.ECS/Filter.cs
  4. 2
      src/gaemstone.ECS/Term.cs

@ -109,11 +109,11 @@ public class EntityBuilder<TContext>
using var alloc = TempAllocator.Use();
var desc = new ecs_entity_desc_t {
id = Id,
name = (Path != null) ? alloc.AllocateCString(Path.Name.AsSpan()) : default,
symbol = alloc.AllocateCString(_symbol),
add_expr = alloc.AllocateCString(Expression),
_name = (Path != null) ? alloc.AllocateCString(Path.Name.AsSpan()) : default,
_symbol = alloc.AllocateCString(_symbol),
_add_expr = alloc.AllocateCString(Expression),
use_low_id = UseLowId,
sep = CStringExtensions.ETX,
_sep = CStringExtensions.ETX,
};
var add = desc.add; var index = 0;

@ -197,7 +197,7 @@ public class EntityPath
foreach (var part in path)
fixed (byte* ptr = part.AsSpan())
if (skipLookup || (parent = new(ecs_lookup_child(world, parent, ptr))).IsNone) {
var desc = new ecs_entity_desc_t { name = ptr, sep = CStringExtensions.ETX };
var desc = new ecs_entity_desc_t { _name = ptr, _sep = CStringExtensions.ETX };
if (parent.IsSome) desc.add[0] = Id.Pair(FlecsBuiltIn.ChildOf, parent);
parent = new(ecs_entity_init(world, &desc));
skipLookup = true;

@ -77,7 +77,7 @@ public class FilterDesc
public unsafe ecs_filter_desc_t ToFlecs(IAllocator allocator)
{
var desc = new ecs_filter_desc_t {
expr = allocator.AllocateCString(Expression),
_expr = allocator.AllocateCString(Expression),
instanced = Instanced,
entity = Entity,
};

@ -80,7 +80,7 @@ public class TermId
public ecs_term_id_t ToFlecs(IAllocator allocator) => new() {
id = Id,
name = allocator.AllocateCString(Name),
_name = allocator.AllocateCString(Name),
trav = Traverse,
flags = (ecs_flags32_t)(uint)Flags
};

Loading…
Cancel
Save