From e6e7f56c9bba3b2191583c4c1d0599370d1f00c7 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 20 Mar 2025 15:30:13 -0400 Subject: pke: replace PkeArray with pk_arr_t --- editor/editor.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'editor/editor.cpp') diff --git a/editor/editor.cpp b/editor/editor.cpp index 14b2777..685d402 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -2,7 +2,6 @@ #include "editor.hpp" #include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h" -#include "array.hpp" #include "asset-manager.hpp" #include "camera.hpp" #include "ecs.hpp" @@ -1662,22 +1661,22 @@ void RecordImGuiSceneEditor() { ImGui::Spacing(); if (selectedEntity != nullptr) { - static PkeArray entGrBinds; - static PkeArray entInstances; + static pk_arr_t entGrBinds; + static pk_arr_t entInstances; static EntityType *entType; bool reset = false; if (entGrBinds.next > 0) { - if (entGrBinds.data[0]->entHandle != selectedEntity->entHandle) { + if (entGrBinds[0]->entHandle != selectedEntity->entHandle) { reset = true; } } else if (entInstances.next > 0) { - if (entInstances.data[0]->entHandle != selectedEntity->entHandle) { + if (entInstances[0]->entHandle != selectedEntity->entHandle) { reset = true; } } if (reset) { - PkeArray_SoftReset(&entGrBinds); - PkeArray_SoftReset(&entInstances); + pk_arr_clear(&entGrBinds); + pk_arr_clear(&entInstances); entType = nullptr; } if (entGrBinds.next == 0) @@ -1699,10 +1698,10 @@ void RecordImGuiSceneEditor() { } ImGui::Text("%s: %08x %08x", "Entity Handle: ", selectedEntity->entHandle.bucketIndex, selectedEntity->entHandle.itemIndex); for (int64_t i = 0; i < entGrBinds.next; ++i) { - RecordImGui_CompGrBinds(true, entGrBinds.data[i]); + RecordImGui_CompGrBinds(true, entGrBinds[i]); } for (int64_t i = 0; i < entInstances.next; ++i) { - RecordImGui_CompInstPos(false, entInstances.data[i]); + RecordImGui_CompInstPos(false, entInstances[i]); } } -- cgit v1.2.3