Struct in ldk_ecs.h

LDKGroupingDesc

typedef struct LDKGroupingDesc{
  u64 id;
  const char *name;
  const u32 *component_types;
  u32 component_count;
}LDKGroupingDesc;
Function in ldk_ecs.h

ldk_ecs_initialize

Initialize the ECS.

LDK_API bool ldk_ecs_initialize(
 LDKECS *context,
 u32 entity_page_capacity,
 u32 entity_initial_pages
);

Parameters

LDKECS *context
Context used by this operation.
u32 entity_page_capacity
Entities allocated per page.
u32 entity_initial_pages
Number of entity pages initially allocated.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_terminate

Shut down the ECS.

LDK_API void ldk_ecs_terminate(void);
Function in ldk_ecs.h

ldk_ecs_entity_create

Create the ECS entity.

LDK_API LDKEntity ldk_ecs_entity_create(void);

Returns

The requested value.

Function in ldk_ecs.h

ldk_ecs_entity_destroy

Destroy the ECS entity.

LDK_API void ldk_ecs_entity_destroy(LDKEntity entity);

Parameters

LDKEntity entity
Entity to inspect or modify.
Function in ldk_ecs.h

ldk_ecs_component_add

Add the ECS component.

LDK_API void * ldk_ecs_component_add(
 LDKEntity entity,
 u32 component_type,
 const void *initial_value
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u32 component_type
Registered ECS component type identifier.
const void *initial_value
Initial value used by this operation.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_component_get

Get the ECS component.

LDK_API void * ldk_ecs_component_get(
 LDKEntity entity,
 u32 component_type
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u32 component_type
Registered ECS component type identifier.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_component_get_const

Get read-only access to the ECS component.

LDK_API const void * ldk_ecs_component_get_const(
 LDKEntity entity,
 u32 component_type
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u32 component_type
Registered ECS component type identifier.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_component_remove

Remove the ECS component.

LDK_API bool ldk_ecs_component_remove(
 LDKEntity entity,
 u32 component_type
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u32 component_type
Registered ECS component type identifier.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_component_register

Register the ECS component.

LDK_API bool ldk_ecs_component_register(const LDKComponentDesc *desc);

Parameters

const LDKComponentDesc *desc
Description or configuration for this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_id

Zero means an empty requirement set (or an invalid declaration). Hashes count and sorted unique u32 IDs in fixed little-endian byte order.

LDK_API u64 ldk_ecs_grouping_id(
 const u32 *component_types,
 u32 component_count
);

Parameters

const u32 *component_types
Array of registered ECS component type identifiers.
u32 component_count
Number of component identifiers in the array.

Returns

Computed identifier or hash.

Function in ldk_ecs.h

ldk_ecs_component_is_enabled

Check whether the ECS component is enabled.

LDK_API bool ldk_ecs_component_is_enabled(
 LDKEntity entity,
 u32 component_type
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u32 component_type
Registered ECS component type identifier.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_component_enabled_set

Enable or disable one component instance.

LDK_API bool ldk_ecs_component_enabled_set(
 LDKEntity entity,
 u32 component_type,
 bool enabled
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u32 component_type
Registered ECS component type identifier.
bool enabled
Enabled used by this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_register

Register the ECS grouping.

LDK_API bool ldk_ecs_grouping_register(const LDKGroupingDesc *desc);

Parameters

const LDKGroupingDesc *desc
Description or configuration for this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_unregister

Unregister the ECS grouping.

LDK_API bool ldk_ecs_grouping_unregister(u64 id);

Parameters

u64 id
Identifier of the target object.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_find_by_id

Find a registered ECS grouping by its stable ID.

LDK_API bool ldk_ecs_grouping_find_by_id(
 u64 id,
 LDKGroupingDesc *out
);

Parameters

u64 id
Identifier of the target object.
LDKGroupingDesc *out
Output object or buffer receiving the result.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_count

Count the registered ECS group descriptions.

LDK_API u32 ldk_ecs_grouping_count(void);

Returns

Number of matching entries.

Function in ldk_ecs.h

ldk_ecs_grouping_at

Get a registered ECS grouping by index.

LDK_API bool ldk_ecs_grouping_at(
 u32 index,
 LDKGroupingDesc *out
);

Parameters

u32 index
Zero-based index of the selected item.
LDKGroupingDesc *out
Output object or buffer receiving the result.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_get

Get the runtime entity group matching a registered grouping ID.

LDK_API const LDKEntityGroup * ldk_ecs_grouping_get(u64 id);

Parameters

u64 id
Identifier of the target object.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_grouping_configure_file

Legacy compatibility no-op. Project [groupings] sections are ignored.

LDK_API bool ldk_ecs_grouping_configure_file(const char *ini_path);

Parameters

const char *ini_path
Path to the INI configuration.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_is_config_defined

True when a grouping originated in the current configuration file.

LDK_API bool ldk_ecs_grouping_is_config_defined(u64 id);

Parameters

u64 id
Identifier of the target object.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_register

Register the ECS system.

LDK_API bool ldk_ecs_system_register(const LDKSystemDesc *desc);

Parameters

const LDKSystemDesc *desc
Description or configuration for this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_unregister

Unregister the ECS system.

LDK_API bool ldk_ecs_system_unregister(u64 id);

Parameters

u64 id
Identifier of the target object.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_start

Start/stop an individual registered system without changing the catalog.

LDK_API bool ldk_ecs_system_start(u64 id);

Parameters

u64 id
Identifier of the target object.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_stop

Stop the ECS system.

LDK_API bool ldk_ecs_system_stop(u64 id);

Parameters

u64 id
Identifier of the target object.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_is_started

Check whether the ECS system is started.

LDK_API bool ldk_ecs_system_is_started(u64 id);

Parameters

u64 id
Identifier of the target object.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_pause

Suspend/resume execution without destroying individual system state.

LDK_API bool ldk_ecs_system_pause(void);

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_resume

Resume the ECS system.

LDK_API bool ldk_ecs_system_resume(void);

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_is_paused

Check whether the ECS system is paused.

LDK_API bool ldk_ecs_system_is_paused(void);

Returns

True when the queried condition holds; false otherwise.

Typedef in ldk_ecs.h

LDKECSEntityIterFn

Callback visiting an ECS entity during iteration.

typedef bool(*LDKECSEntityIterFn)(LDKEntity entity, void *user);

Parameters

entity
Entity to inspect or modify.
user
Opaque caller-supplied data passed to the callback.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_entity_foreach

Visit active ECS entities using a caller-provided callback.

LDK_API bool ldk_ecs_entity_foreach(
 LDKECSEntityIterFn fn,
 void *user
);

Parameters

LDKECSEntityIterFn fn
Callback invoked by this operation.
void *user
Opaque caller-supplied data passed to the callback.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_entity_component_count

Count components attached to an ECS entity.

LDK_API u32 ldk_ecs_entity_component_count(LDKEntity entity);

Parameters

LDKEntity entity
Entity to inspect or modify.

Returns

Number of matching entries.

Function in ldk_ecs.h

ldk_ecs_entity_component_type_at

Read the type ID of an entity component by index.

LDK_API bool ldk_ecs_entity_component_type_at(
 LDKEntity entity,
 u32 component_index,
 u32 *out_component_type
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u32 component_index
Zero-based index of the component entry.
u32 *out_component_type
Receives the resulting component type.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_entity_name_get

Get the ECS entity name.

LDK_API const char * ldk_ecs_entity_name_get(LDKEntity entity);

Parameters

LDKEntity entity
Entity to inspect or modify.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_entity_name_set

Set the ECS entity name.

LDK_API bool ldk_ecs_entity_name_set(
 LDKEntity entity,
 const char *name
);

Parameters

LDKEntity entity
Entity to inspect or modify.
const char *name
Name identifying the object or setting.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_entity_name_hash_get

Get the stored hash of an entity name.

LDK_API u64 ldk_ecs_entity_name_hash_get(LDKEntity entity);

Parameters

LDKEntity entity
Entity to inspect or modify.

Returns

Computed identifier or hash.

Function in ldk_ecs.h

ldk_ecs_entity_name_hash_set

Assign the stored hash of an entity name.

LDK_API bool ldk_ecs_entity_name_hash_set(
 LDKEntity entity,
 u64 hash
);

Parameters

LDKEntity entity
Entity to inspect or modify.
u64 hash
Hash used by this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_entity_registry_get

Get the ECS entity registry.

LDK_API LDKEntityRegistry * ldk_ecs_entity_registry_get(void);

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_component_registry_get

Get the ECS component registry.

LDK_API LDKComponentRegistry * ldk_ecs_component_registry_get(void);

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_system_registry_get

Get the ECS system registry.

LDK_API LDKSystemRegistry * ldk_ecs_system_registry_get(void);

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_ecs.h

ldk_ecs_system_registry_start

Start the ECS system registry.

LDK_API bool ldk_ecs_system_registry_start(LDKECS *context);

Parameters

LDKECS *context
Context used by this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_bucket_run

Execute the ECS system bucket.

LDK_API bool ldk_ecs_system_bucket_run(
 LDKECS *context,
 LDKSystemBucket bucket,
 float delta_time
);

Parameters

LDKECS *context
Context used by this operation.
LDKSystemBucket bucket
Bucket used by this operation.
float delta_time
Elapsed time since the preceding update, in seconds.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_system_registry_stop

Stop the ECS system registry.

LDK_API bool ldk_ecs_system_registry_stop(LDKECS *context);

Parameters

LDKECS *context
Context used by this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_ecs.h

ldk_ecs_grouping_runtime_reset

Clear all runtime membership state for registered Entity Groups while preserving their definitions. Intended for full scene/ECS entity resets.

LDK_API bool ldk_ecs_grouping_runtime_reset(void);

Returns

True if the operation succeeds; false otherwise.