first
This commit is contained in:
81
source/nomi.h
Normal file
81
source/nomi.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*##############################################################################
|
||||
* project: nomi
|
||||
* file: nomi.h
|
||||
*
|
||||
* This file handles all of the nomi spesific action like creating and handling
|
||||
* Trunks and branches. As well as the data nessary for that it to run properly.
|
||||
*
|
||||
* Auther: PreacherDHM
|
||||
* Date: 10/30/2025
|
||||
*##############################################################################
|
||||
*/
|
||||
|
||||
|
||||
#ifndef NOMI_H
|
||||
#define NOMI_H
|
||||
|
||||
#define BRNACH 0x01
|
||||
#define TRUNK 0x00
|
||||
#define MAX_CHILDREN 5
|
||||
#define MAX_BRANCHES 30
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
typedef unsigned int branchId;
|
||||
|
||||
// All of the different notes
|
||||
typedef struct {
|
||||
char* text; // This is the data that is in that branch
|
||||
branchId children[MAX_CHILDREN]; // holds the branchIds of its children
|
||||
void* parent; // points the the branches parent
|
||||
char type; // holds the type as in if this struct is a branch or a trunk
|
||||
branchId id; // This holds the branch id.
|
||||
} branch;
|
||||
|
||||
// The Root of the tree structure
|
||||
typedef struct {
|
||||
branch branches[MAX_BRANCHES];
|
||||
const char* title;
|
||||
char* text;
|
||||
} trunk;
|
||||
|
||||
/*
|
||||
* This will Init Nomi
|
||||
*/
|
||||
void NomiInit();
|
||||
/*
|
||||
* This will create the truk of the note.
|
||||
* */
|
||||
trunk* CreateTrunk();
|
||||
|
||||
/*
|
||||
* This is a test
|
||||
* */
|
||||
void CreaetBranch(trunk* trunk);
|
||||
|
||||
/*
|
||||
* Locate Branch
|
||||
* */
|
||||
branch* LocateBranch();
|
||||
|
||||
/*
|
||||
* Draw Branch
|
||||
*/
|
||||
void DrawBranch(branch* branch);
|
||||
|
||||
/*
|
||||
* Create Nomi File
|
||||
*
|
||||
* name: the name of the file that will be created.
|
||||
*/
|
||||
FILE CreateNomiFile(const char* name);
|
||||
|
||||
/*
|
||||
* Save Nomi File
|
||||
*
|
||||
* file: the pointer to the nomi file.
|
||||
*/
|
||||
void SaveNomiFile(FILE* file);
|
||||
|
||||
|
||||
#endif // NOMI_H
|
||||
Reference in New Issue
Block a user