Update node struct to know about noodle connected to it
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user