summaryrefslogtreecommitdiff
path: root/editor/editor.cpp
diff options
context:
space:
mode:
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]);
}
}