Skip to content

Commit

Permalink
Update flecs submodule to 4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
BeanCheeseBurrito committed Nov 13, 2024
1 parent 7971f1a commit 4c0c617
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 15 deletions.
2 changes: 1 addition & 1 deletion native/flecs
Submodule flecs updated 119 files
4 changes: 4 additions & 0 deletions native/flecs_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ extern void* EcsDocBrief;
extern void* EcsDocColor;
extern void* EcsDocDetail;
extern void* EcsDocLink;
extern void* EcsDocUuid;
extern void* EcsDontInherit;
extern void* EcsDuration;
extern void* EcsElectricCurrent;
Expand Down Expand Up @@ -501,6 +502,9 @@ BINDGEN_API void* EcsDocDetail_BindgenGetExtern() {
BINDGEN_API void* EcsDocLink_BindgenGetExtern() {
return &EcsDocLink;
}
BINDGEN_API void* EcsDocUuid_BindgenGetExtern() {
return &EcsDocUuid;
}
BINDGEN_API void* EcsDontInherit_BindgenGetExtern() {
return &EcsDontInherit;
}
Expand Down
34 changes: 30 additions & 4 deletions src/Flecs.NET.Bindings/Flecs.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public static unsafe partial class flecs
[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_doc_get_name", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern byte* ecs_doc_get_name(ecs_world_t* world, ulong entity);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_doc_get_uuid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern byte* ecs_doc_get_uuid(ecs_world_t* world, ulong entity);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_doc_set_brief", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void ecs_doc_set_brief(ecs_world_t* world, ulong entity, byte* description);

Expand All @@ -169,6 +172,9 @@ public static unsafe partial class flecs
[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_doc_set_name", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void ecs_doc_set_name(ecs_world_t* world, ulong entity, byte* name);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_doc_set_uuid", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void ecs_doc_set_uuid(ecs_world_t* world, ulong entity, byte* uuid);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_each_id", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern ecs_iter_t ecs_each_id(ecs_world_t* world, ulong id);

Expand Down Expand Up @@ -314,7 +320,7 @@ public static unsafe partial class flecs
public static extern byte* ecs_get_path_w_sep(ecs_world_t* world, ulong parent, ulong child, byte* sep, byte* prefix);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_get_path_w_sep_buf", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void ecs_get_path_w_sep_buf(ecs_world_t* world, ulong parent, ulong child, byte* sep, byte* prefix, ecs_strbuf_t* buf);
public static extern void ecs_get_path_w_sep_buf(ecs_world_t* world, ulong parent, ulong child, byte* sep, byte* prefix, ecs_strbuf_t* buf, byte escape);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_get_pipeline", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern ulong ecs_get_pipeline(ecs_world_t* world);
Expand Down Expand Up @@ -940,6 +946,9 @@ public static unsafe partial class flecs
[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_query_fini", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void ecs_query_fini(ecs_query_t* query);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_query_get_cache_query", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern ecs_query_t* ecs_query_get_cache_query(ecs_query_t* query);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_query_get_group_ctx", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void* ecs_query_get_group_ctx(ecs_query_t* query, ulong group_id);

Expand Down Expand Up @@ -1348,6 +1357,9 @@ public static unsafe partial class flecs
[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_table_add_id", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern ecs_table_t* ecs_table_add_id(ecs_world_t* world, ecs_table_t* table, ulong id);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_table_clear_entities", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void ecs_table_clear_entities(ecs_world_t* world, ecs_table_t* table);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_table_column_count", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern int ecs_table_column_count(ecs_table_t* table);

Expand Down Expand Up @@ -1573,6 +1585,9 @@ public static unsafe partial class flecs
[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_world_from_json_file", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern byte* ecs_world_from_json_file(ecs_world_t* world, byte* filename, ecs_from_json_desc_t* desc);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_world_get_flags", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern uint ecs_world_get_flags(ecs_world_t* world);

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ecs_world_stats_copy_last", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static extern void ecs_world_stats_copy_last(ecs_world_stats_t* dst, ecs_world_stats_t* src);

Expand Down Expand Up @@ -12027,7 +12042,9 @@ public enum ecs_type_kind_t : uint

public const uint EcsObserverIsParentDisabled = 16;

public const uint EcsObserverYieldOnDelete = 64;
public const uint EcsObserverYieldOnCreate = 64;

public const uint EcsObserverYieldOnDelete = 128;

public const uint EcsOsApiHighResolutionTimer = 1;

Expand Down Expand Up @@ -12079,6 +12096,8 @@ public enum ecs_type_kind_t : uint

public const uint EcsQueryMatchWildcards = 16384;

public const uint EcsQueryNested = 268435456;

public const uint EcsQueryTableOnly = 128;

public const ulong EcsSelf = 9223372036854775808;
Expand Down Expand Up @@ -12239,13 +12258,13 @@ public enum ecs_type_kind_t : uint

public const int FLECS_VARIABLE_COUNT_MAX = 64;

public const string FLECS_VERSION = "4.0.1";
public const string FLECS_VERSION = "4.0.3";

public const int FLECS_VERSION_MAJOR = 4;

public const int FLECS_VERSION_MINOR = 0;

public const int FLECS_VERSION_PATCH = 1;
public const int FLECS_VERSION_PATCH = 3;

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "ECS_AUTO_OVERRIDE_BindgenGetExtern", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
private static extern void* ECS_AUTO_OVERRIDE_BindgenGetExtern();
Expand Down Expand Up @@ -12451,6 +12470,9 @@ public enum ecs_type_kind_t : uint
[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsDocLink_BindgenGetExtern", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
private static extern void* EcsDocLink_BindgenGetExtern();

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsDocUuid_BindgenGetExtern", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
private static extern void* EcsDocUuid_BindgenGetExtern();

[System.Runtime.InteropServices.DllImport(BindgenInternal.DllImportPath, EntryPoint = "EcsDontInherit_BindgenGetExtern", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
private static extern void* EcsDontInherit_BindgenGetExtern();

Expand Down Expand Up @@ -13265,6 +13287,8 @@ public enum ecs_type_kind_t : uint

private static void* EcsDocLink_Ptr;

private static void* EcsDocUuid_Ptr;

private static void* EcsDontInherit_Ptr;

private static void* EcsDuration_Ptr;
Expand Down Expand Up @@ -13853,6 +13877,8 @@ public enum ecs_type_kind_t : uint

public static ref ulong EcsDocLink => ref *(ulong*)(EcsDocLink_Ptr == null ? EcsDocLink_Ptr = EcsDocLink_BindgenGetExtern() : EcsDocLink_Ptr);

public static ref ulong EcsDocUuid => ref *(ulong*)(EcsDocUuid_Ptr == null ? EcsDocUuid_Ptr = EcsDocUuid_BindgenGetExtern() : EcsDocUuid_Ptr);

public static ref ulong EcsDontInherit => ref *(ulong*)(EcsDontInherit_Ptr == null ? EcsDontInherit_Ptr = EcsDontInherit_BindgenGetExtern() : EcsDontInherit_Ptr);

public static ref ulong EcsDuration => ref *(ulong*)(EcsDuration_Ptr == null ? EcsDuration_Ptr = EcsDuration_BindgenGetExtern() : EcsDuration_Ptr);
Expand Down
2 changes: 1 addition & 1 deletion src/Flecs.NET.Examples/Prefabs/Override.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void Main()
world.Component<Attack>().Entity.Add(Ecs.OnInstantiate, Ecs.Inherit);
world.Component<Defense>().Entity.Add(Ecs.OnInstantiate, Ecs.Inherit);

// Attack and Damage are properties that can be shared across many
// Attack and Defense are properties that can be shared across many
// spaceships. This saves memory, and speeds up prefab creation as we don't
// have to copy the values of Attack and Defense to private components.
Entity spaceShip = world.Prefab("SpaceShip")
Expand Down
1 change: 1 addition & 0 deletions src/Flecs.NET.Examples/Queries/Hierarchy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static void Main()
// Create a hierarchical query to compute the global position from the
// local position and the parent position.
using Query<Position, Position, Position> q = world.QueryBuilder<Position, Position, Position>()
.Cached() // Cascade queries must be cached.
// Modify terms from template to make sure the query selects the
// local, world and parent position components.
.TermAt(0).Second<Local>() // Self local position
Expand Down
18 changes: 9 additions & 9 deletions src/Flecs.NET.Native/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const src_files = [_][]const u8{

"../../native/flecs/src/bootstrap.c",
"../../native/flecs/src/each.c",
"../../native/flecs/src/entity.c",
"../../native/flecs/src/entity_name.c",
"../../native/flecs/src/entity.c",
"../../native/flecs/src/id.c",
"../../native/flecs/src/iter.c",
"../../native/flecs/src/misc.c",
Expand All @@ -38,15 +38,15 @@ const src_files = [_][]const u8{
"../../native/flecs/src/addons/rest.c",
"../../native/flecs/src/addons/timer.c",
"../../native/flecs/src/addons/units.c",
"../../native/flecs/src/addons/json/deserialize.c",
"../../native/flecs/src/addons/json/deserialize_value.c",
"../../native/flecs/src/addons/json/deserialize.c",
"../../native/flecs/src/addons/json/json.c",
"../../native/flecs/src/addons/json/serialize_entity.c",
"../../native/flecs/src/addons/json/serialize_field_info.c",
"../../native/flecs/src/addons/json/serialize_iter.c",
"../../native/flecs/src/addons/json/serialize_iter_result.c",
"../../native/flecs/src/addons/json/serialize_iter_result_query.c",
"../../native/flecs/src/addons/json/serialize_iter_result_table.c",
"../../native/flecs/src/addons/json/serialize_iter_result.c",
"../../native/flecs/src/addons/json/serialize_iter.c",
"../../native/flecs/src/addons/json/serialize_query_info.c",
"../../native/flecs/src/addons/json/serialize_type_info.c",
"../../native/flecs/src/addons/json/serialize_value.c",
Expand All @@ -71,10 +71,10 @@ const src_files = [_][]const u8{
"../../native/flecs/src/addons/script/template.c",
"../../native/flecs/src/addons/script/tokenizer.c",
"../../native/flecs/src/addons/script/vars.c",
"../../native/flecs/src/addons/script/visit.c",
"../../native/flecs/src/addons/script/visit_eval.c",
"../../native/flecs/src/addons/script/visit_free.c",
"../../native/flecs/src/addons/script/visit_to_str.c",
"../../native/flecs/src/addons/script/visit.c",
"../../native/flecs/src/addons/stats/monitor.c",
"../../native/flecs/src/addons/stats/pipeline_monitor.c",
"../../native/flecs/src/addons/stats/stats.c",
Expand All @@ -97,13 +97,12 @@ const src_files = [_][]const u8{
"../../native/flecs/src/query/api.c",
"../../native/flecs/src/query/util.c",
"../../native/flecs/src/query/validator.c",
"../../native/flecs/src/query/compiler/compiler.c",
"../../native/flecs/src/query/compiler/compiler_term.c",
"../../native/flecs/src/query/engine/cache.c",
"../../native/flecs/src/query/compiler/compiler.c",
"../../native/flecs/src/query/engine/cache_iter.c",
"../../native/flecs/src/query/engine/cache_order_by.c",
"../../native/flecs/src/query/engine/cache.c",
"../../native/flecs/src/query/engine/change_detection.c",
"../../native/flecs/src/query/engine/eval.c",
"../../native/flecs/src/query/engine/eval_iter.c",
"../../native/flecs/src/query/engine/eval_member.c",
"../../native/flecs/src/query/engine/eval_pred.c",
Expand All @@ -112,15 +111,16 @@ const src_files = [_][]const u8{
"../../native/flecs/src/query/engine/eval_union.c",
"../../native/flecs/src/query/engine/eval_up.c",
"../../native/flecs/src/query/engine/eval_utils.c",
"../../native/flecs/src/query/engine/eval.c",
"../../native/flecs/src/query/engine/trav_cache.c",
"../../native/flecs/src/query/engine/trav_down_cache.c",
"../../native/flecs/src/query/engine/trav_up_cache.c",
"../../native/flecs/src/query/engine/trivial_iter.c",
"../../native/flecs/src/storage/entity_index.c",
"../../native/flecs/src/storage/id_index.c",
"../../native/flecs/src/storage/table.c",
"../../native/flecs/src/storage/table_cache.c",
"../../native/flecs/src/storage/table_graph.c",
"../../native/flecs/src/storage/table.c",
};

pub fn compileFlecs(b: *Build, options: anytype) void {
Expand Down

0 comments on commit 4c0c617

Please sign in to comment.