summaryrefslogtreecommitdiff
path: root/editor/editor.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-03-20 15:30:13 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-03-21 11:06:05 -0400
commite6e7f56c9bba3b2191583c4c1d0599370d1f00c7 (patch)
tree27476da693d9e75d920a698d57b74699f9f81c7a /editor/editor.cpp
parent9b39b4c8eab360e087423f06ecffb694a3b98b23 (diff)
pke: replace PkeArray with pk_arr_t
Diffstat (limited to 'editor/editor.cpp')
-rw-r--r--editor/editor.cpp17
1 files changed, 8 insertions, 9 deletions
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<CompGrBinds *> entGrBinds;
- static PkeArray<CompInstance *> entInstances;
+ static pk_arr_t<CompGrBinds *> entGrBinds;
+ static pk_arr_t<CompInstance *> 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]);
}
}