Update node struct to know about noodle connected to it

This commit is contained in:
2024-02-28 23:52:04 +00:00
parent 46a4802ce6
commit f419378183
2 changed files with 62 additions and 19 deletions

View File

@@ -9,6 +9,7 @@
#define OP_INPUT_COUNT 2
#define EMPTY_NODE 0
#define NODE_START 1
#define CONNECTION_START 1
typedef i32 (*node_func)(i32 a, i32 b);
typedef enum node_type node_type;
@@ -31,6 +32,7 @@ union node_data {
struct noodle {
line ln;
u64 connected_node;
u64 connection_idx;
};
struct node {
@@ -39,7 +41,9 @@ struct node {
node_type type;
node_data data;
u64 inputs;
u64 connected;
noodle *noodles;
noodle **connected_noodles;
};
#endif // !NODES_H