Hook Particle to the other systems

Had to manually merge a change set for this
This commit is contained in:
2024-03-26 12:17:21 +08:00
parent 8bf4d95384
commit 19895363a3
9 changed files with 87 additions and 36 deletions

View File

@ -174,3 +174,13 @@ tree_Node *tree_Node_Previous(tree_Node *node) {
return result->father;
}
}
size_t tree_Count(tree_Tree *tree) {
size_t cnt = 0;
for (tree_Node *i = tree_FirstNode(tree);
i != NULL;
i = tree_Node_Next(i))
cnt++;
return cnt;
}

View File

@ -69,6 +69,9 @@ tree_Node *tree_Node_Next(tree_Node *node);
// Node_Previous returns the previous node. Returns NULL if first.
tree_Node *tree_Node_Previous(tree_Node *node);
// Count walks the tree and counts how many nodes are there in the tree.
size_t tree_Count(tree_Tree *tree);
#ifdef __cplusplus
}