Partial entity inspector

This commit is contained in:
2024-01-07 13:49:13 +01:00
parent 5dbc5ba15e
commit 9c745d2857
9 changed files with 276 additions and 56 deletions

View File

@@ -66,6 +66,19 @@ void _bzArrayDelN(void *arr, i32 idx, i32 n) {
head->size -= n;
}
void _bzArrayDelSwap(void *arr, i32 idx) {
BzArrayHead *head = ARRAY_HEAD(arr);
BZ_ASSERT(idx >= 0 && idx < head->size);
i32 lastIdx = head->size - 1;
if (idx != lastIdx) {
bzMemMove((u8 *) arr + idx * head->stride,
(u8 *) arr + (lastIdx) * head->stride,
head->stride);
}
head->size--;
}
i32 _bzArrayPush(void *arr) {
BzArrayHead *head = ARRAY_HEAD(arr);