added branch selection

This commit is contained in:
2025-11-06 15:04:01 -08:00
parent 98a190eb5e
commit 99c46cec29
3 changed files with 207 additions and 54 deletions

View File

@@ -40,19 +40,25 @@ typedef struct {
// All of the different notes
typedef struct {
char* text; // This is the data that is in that branch
branchId id; // This holds the branch id.
branchId navId[MAX_BRANCHES];
branchId depth;
branchId children[MAX_CHILDREN]; // holds the branchIds of its children
branchId childrenCount;
struct tart_cell cell;
void* parent; // points the the branches parent
char type; // holds the type as in if this struct is a branch or a trunk
float angle;
nomi_vec2 startPos; // the starting position of the branch
nomi_curve curve;
branchId id; // This holds the branch id.
} branch;
// The Root of the tree structure
typedef struct {
branch branches[MAX_BRANCHES];
branchId branchCount;
const char* title;
char* text;
} trunk;
@@ -60,21 +66,23 @@ typedef struct {
/*
* This will Init Nomi
*/
void NomiInit();
void NomiInit(trunk* tr);
branchId* NomiNavigation(char input);
/*
* This will create the truk of the note.
* */
trunk* CreateTrunk();
trunk CreateTrunk(char* title, branch root);
void DrawTrunk(trunk* tr, struct tart_window* w, tart_byte b);
/*
* This is a test
* */
void CreaetBranch(trunk* trunk);
void AddBranch(trunk* t, branch br);
/*
* Locate Branch
* */
branch* LocateBranch();
branchId* LocateBranch(trunk* t);
branch create_branch(branch* parent, nomi_vec2 d, unsigned char percent, unsigned char b);
/*