From 5a7b4a65a1d93744e4a5e6cc6df4244f61b81f68 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 14 Jan 2025 18:17:54 -0500 Subject: chore: fix compiler warnings + extra includes --- src/ecs.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/ecs.cpp') diff --git a/src/ecs.cpp b/src/ecs.cpp index 7f3410d..09eb725 100644 --- a/src/ecs.cpp +++ b/src/ecs.cpp @@ -6,7 +6,6 @@ #include "game-settings.hpp" #include "math-helpers.hpp" #include "physics.hpp" -#include "vendor-glm-include.hpp" #include "window.hpp" #include @@ -97,6 +96,7 @@ void ECS_MarkForRemoval(Entity_Base *entity) { void ECS_Tick_Early(double delta) { // these reserves might happen 1 tick early, but that's fine + (void)delta; bool shouldRun = entitiesMarkedForRemoval.Count() > 0 || EntitiesToBeRemoved.Count() > 0 || entitiesYetToBeRemoved.Count() > 0; entitiesYetToBeRemoved.Reserve(entitiesMarkedForRemoval.Count()); EntitiesToBeRemoved.Resize(entitiesMarkedForRemoval.Count()); @@ -239,6 +239,7 @@ struct InstanceBufferCopy { }; void ECS_Tick_Late(double delta) { // using a pointer here avoids calling the destructor when the object goes out of scope + (void)delta; DynArray *bufferUpdatesPtr = pk_new>(pkeSettings.mem.bkt); new (bufferUpdatesPtr) DynArray(0, pkeSettings.mem.bkt); DynArray &bufferUpdates = *bufferUpdatesPtr; @@ -283,6 +284,8 @@ void ECS_Tick_Late(double delta) { bfrUpdate->chunks->Push({ .startingIndex = inst.index, .endingIndex = inst.index, + .mats = nullptr, + .dstBufferCopy = {}, }); chunk = &(*bfrUpdate->chunks)[bfrUpdate->chunks->Count() - 1]; chunk->dstBufferCopy.dstOffset = sizeof(glm::mat4) * inst.index; @@ -424,7 +427,7 @@ uint64_t ECS_GetGrBinds_BucketCount() { return ecs.bc.grBinds.pkeHandle.bucketIndex + 1; } -CompGrBinds *ECS_GetGrBinds(uint64_t bucketIndex, uint64_t &itemCount) { +CompGrBinds *ECS_GetGrBinds(pk_handle_bucket_index_T bucketIndex, pk_handle_item_index_T &itemCount) { if (bucketIndex == ecs.bc.grBinds.pkeHandle.bucketIndex) { itemCount = ecs.bc.grBinds.pkeHandle.itemIndex; } else { @@ -497,7 +500,7 @@ uint64_t ECS_GetInstances_BucketCount() { return ecs.bc.instances.pkeHandle.bucketIndex + 1; } -CompInstance *ECS_GetInstances(uint64_t bucketIndex, uint64_t &itemCount) { +CompInstance *ECS_GetInstances(pk_handle_bucket_index_T bucketIndex, pk_handle_item_index_T &itemCount) { if (bucketIndex == ecs.bc.instances.pkeHandle.bucketIndex) { itemCount = ecs.bc.instances.pkeHandle.itemIndex; } else { -- cgit v1.2.3