Made the rtb only use 1 string and made the Nomai Branches have a start pos and use a beter cordent system

This commit is contained in:
2025-11-03 13:05:45 -08:00
parent ae02fcae71
commit 2daecbf7c0
3 changed files with 49 additions and 40 deletions

View File

@@ -50,13 +50,21 @@ void DrawBranch(branch* branch, struct tart_window* w, tart_byte b) {
cell.display = '*';
struct nomiSpirel spirel;
int SizeOfFile = 600;
char cellChart[] = {'%','*','\\','/','l','&','b','+','=','^',':'};
char cellChart[] = {'%','*','\\','/','l','&','7','+','=','^',':'};
unsigned int iderations = 0;
struct tart_vec2 pos0 = {15+30, 0/2};
struct tart_vec2 c0 = { 0+30,30/2}; // controle point 0
struct tart_vec2 c1 = {30+30,19/2}; // controle point 1
struct tart_vec2 pos1 = {17+30,11/2};
struct tart_vec2 pos0 = {
(( 3) * -1)+branch->startPos.x,
(( 0/2) * -1)+branch->startPos.y};
struct tart_vec2 c0 = {
(( 25) * -1)+branch->startPos.x,
((35/2) * -1)+branch->startPos.y}; // controle point 0
struct tart_vec2 c1 = {
(( -10) * -1)+branch->startPos.x,
((35/2) * -1)+branch->startPos.y}; // controle point 1
struct tart_vec2 pos1 = {
(( 3) * -1)+branch->startPos.x,
((10/2) * -1)+branch->startPos.y};
struct tart_vec2 dpos = {0,0};
float count = 0;
@@ -74,10 +82,10 @@ void DrawBranch(branch* branch, struct tart_window* w, tart_byte b) {
cell.display = cellChart[rand_r(&iderations)%11];
dpos = (struct tart_vec2){
(1-count)*((1-count)*((1-count)*pos0.x + count * c0.x) + count *
((1-count)*c0.x + count*c1.x)) +
count *((1-count)*((1-count)*c0.x + count * c1.x) +
count * ((1-count)*c1.x + pos1.x)),
(1-count)*((1-count)*((1-count)*pos0.x + count * c0.x) +
count * ((1-count)*c0.x + count*c1.x)) +
count * ((1-count)*((1-count)*c0.x + count * c1.x) +
count * ((1-count)*c1.x + pos1.x)),
(1-count)*((1-count)*((1-count)*pos0.y + count * c0.y) + count *
((1-count)*c0.y + count*c1.y)) +
count *((1-count)*((1-count)*c0.y + count * c1.y) +