summaryrefslogtreecommitdiff
path: root/src/ecs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ecs.cpp')
-rw-r--r--src/ecs.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ecs.cpp b/src/ecs.cpp
index 1ffd9f2..de8b0cd 100644
--- a/src/ecs.cpp
+++ b/src/ecs.cpp
@@ -269,7 +269,7 @@ void ECS_Tick(double delta) {
Entity_Base *ent = ecs.bc.entityPtrs[arr_obj_data->entity_handle];
if (pk_arr_find_first_index(&entitiesYetToBeRemoved, ent, ecs_pk_arr_find_first_matching_pointer) != uint32_t(-1)) {
pk_ev_destroy_mgr(arr_obj_data->ev_mgr_id);
- pk_bkt_arr_free_handle(&ecs.bc.ev_mgrs, arr_obj_data->pke_ev_mgr_handle);
+ pk_bkt_arr_free_handle(&ecs.bc.ev_mgrs, arr_obj_data->pke_event_handle);
}
};
if (entityRemovalCount > 0) {
@@ -573,14 +573,14 @@ pk_bkt_arr *ECS_GetInstances() {
return &ecs.bc.instances;
}
-pke_component_event *ECS_CreateEvManager(Entity_Base *entity, pk_uuid uuid) {
+pke_component_event *ECS_CreateEv(Entity_Base *entity, pk_uuid uuid) {
assert(entity != nullptr && entity != CAFE_BABE(Entity_Base));
- PkeEventMgrHandle ev_mgr_handle { pk_bkt_arr_new_handle(&ecs.bc.ev_mgrs) };
- auto *comp = &ecs.bc.ev_mgrs[ev_mgr_handle];
+ PkeEventHandle pke_ev_handle { pk_bkt_arr_new_handle(&ecs.bc.ev_mgrs) };
+ auto *comp = &ecs.bc.ev_mgrs[pke_ev_handle];
new (comp) pke_component_event{};
comp->entity_handle = entity->handle;
- comp->pke_ev_mgr_handle = ev_mgr_handle;
+ comp->pke_event_handle = pke_ev_handle;
comp->uuid = uuid;
if (comp->uuid == pk_uuid_zed || comp->uuid == pk_uuid_max) {
comp->uuid = pk_uuid_new_v7();
@@ -591,7 +591,7 @@ pke_component_event *ECS_CreateEvManager(Entity_Base *entity, pk_uuid uuid) {
return comp;
}
-pke_component_event *ECS_GetEvManager(PkeEventMgrHandle handle) {
+pke_component_event *ECS_GetEv(PkeEventHandle handle) {
if (handle == PkeEventMgrHandle_MAX) return nullptr;
assert(pk_bkt_arr_handle_validate(&ecs.bc.ev_mgrs, handle) == PK_BKT_ARR_HANDLE_VALIDATION_VALID);
@@ -600,7 +600,7 @@ pke_component_event *ECS_GetEvManager(PkeEventMgrHandle handle) {
return ev_mgr;
}
-void ECS_GetEvManagers(Entity_Base *entity, pk_arr_t<pke_component_event *> &arr) {
+void ECS_GetEvs(Entity_Base *entity, pk_arr_t<pke_component_event *> &arr) {
if (entity == nullptr) return;
// 2025-05-29 JCB PERF
@@ -618,7 +618,7 @@ void ECS_GetEvManagers(Entity_Base *entity, pk_arr_t<pke_component_event *> &arr
pk_bkt_arr_iterate(&ecs.bc.ev_mgrs, &CompEvMgrIterFn::invoke, &inst_iter_cb);
}
-pk_bkt_arr *ECS_GetEvManagers() {
+pk_bkt_arr *ECS_GetEvs() {
return &ecs.bc.ev_mgrs;
}