diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-01-14 18:17:54 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-01-14 18:17:54 -0500 |
| commit | 5a7b4a65a1d93744e4a5e6cc6df4244f61b81f68 (patch) | |
| tree | 4b59cb1d6e513c1caefdc7e4c35955741bcfe206 /src/ecs.cpp | |
| parent | 80a67230fe192287503092a3d256aea3a494409c (diff) | |
chore: fix compiler warnings + extra includes
Diffstat (limited to 'src/ecs.cpp')
| -rw-r--r-- | src/ecs.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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 <btBulletDynamicsCommon.h> @@ -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<InstanceBufferCopy> *bufferUpdatesPtr = pk_new<DynArray<InstanceBufferCopy>>(pkeSettings.mem.bkt); new (bufferUpdatesPtr) DynArray<InstanceBufferCopy>(0, pkeSettings.mem.bkt); DynArray<InstanceBufferCopy> &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 { |
