Skip to content

Commit

Permalink
feat: new clone registry core function
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Nov 30, 2024
1 parent d7de0cc commit 50bc674
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ecsact/runtime/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ ECSACT_CORE_API_FN(void, ecsact_destroy_registry)
ecsact_registry_id registry
);

/**
* Creates a new registry from an existing one with all its entities and
* components intact.
*/
ECSACT_CORE_API_FN(void, ecsact_clone_registry)
( //
ecsact_registry_id registry,
const char* registry_name
);

/**
* Destroy all entities
*/
Expand Down Expand Up @@ -295,6 +305,7 @@ ECSACT_CORE_API_FN(ecsact_stream_error, ecsact_stream)
#else
# define FOR_EACH_ECSACT_CORE_API_FN(fn, ...) \
fn(ecsact_create_registry, __VA_ARGS__); \
fn(ecsact_clone_registry, __VA_ARGS__); \

Check failure on line 308 in ecsact/runtime/core.h

View workflow job for this annotation

GitHub Actions / check-module-headers

Out of date FOR_EACH macro for ecsact/runtime/core.h

When adding or removing an Ecsact function from the API headers you must also update the FOR_EACH_ macro.
fn(ecsact_destroy_registry, __VA_ARGS__); \
fn(ecsact_clear_registry, __VA_ARGS__); \
fn(ecsact_create_entity, __VA_ARGS__); \
Expand Down

0 comments on commit 50bc674

Please sign in to comment.