(UNDER CONSTRUCTION) implementing general child nodes

bifurcation was limited and I needed something more powerful
This commit is contained in:
Emile Clark-Boman 2025-09-15 17:11:06 +10:00
parent fa97c73522
commit 6b5bcff1a4
3 changed files with 97 additions and 14 deletions

View file

@ -6,7 +6,7 @@
/*
*/
static inline struct ct_node *__root_node(void) {
return new_node(termdims(), NULL);
return new_node(termdims(), bounds_none(), NULL);
}
int init_tree(struct ct_tree **const tree) {
@ -27,8 +27,8 @@ void resize_tree(struct ct_tree *const tree, struct ct_dims *const dims) {
void switch_nodes(struct ct_node **const node0, struct ct_node **const node1) {
struct ct_node *const node0ptr = *node0;
struct ct_dims *const node0dims = dup_dims((*node0)->dims);
struct ct_dims *const node1dims = dup_dims((*node1)->dims);
struct ct_dims *const node0dims = dup_dims((*node0)->surface->dims);
struct ct_dims *const node1dims = dup_dims((*node1)->surface->dims);
*node0 = *node1;
resize_node(*node0, node1dims);