Formationg and comments
This commit is contained in:
parent
30980423eb
commit
53c333d46d
@ -145,7 +145,7 @@ void App::upTex(Liked liked)
|
|||||||
|
|
||||||
BeginTextureMode(canvasTexure[TOP]);
|
BeginTextureMode(canvasTexure[TOP]);
|
||||||
ClearBackground(BLACK);
|
ClearBackground(BLACK);
|
||||||
DrawText("NEXT GEN", 10, 10, 20, WHITE);
|
DrawText("NEXT GEN", 10, 10, screenWidth/10, WHITE);
|
||||||
EndTextureMode();
|
EndTextureMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
Dna *m_dna;
|
Dna *m_dna;
|
||||||
uint128 branchSeed;
|
uint128 branchSeed;
|
||||||
|
//Texture2D texBunny;
|
||||||
|
|
||||||
Vector2 start = {0};
|
Vector2 start = {0};
|
||||||
std::list<DrawArgs> drawCalls;
|
std::list<DrawArgs> drawCalls;
|
||||||
|
@ -45,6 +45,7 @@ struct Dna
|
|||||||
uint8_t colorSet;
|
uint8_t colorSet;
|
||||||
Branch branches[MAX_DEPTH];
|
Branch branches[MAX_DEPTH];
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace DNA
|
namespace DNA
|
||||||
{
|
{
|
||||||
void newDna(Dna *dna, uint128 *state);
|
void newDna(Dna *dna, uint128 *state);
|
||||||
|
@ -40,6 +40,7 @@ void Tree::init(int size)
|
|||||||
start.x = size / 2;
|
start.x = size / 2;
|
||||||
start.y = size;
|
start.y = size;
|
||||||
calculateLevels(size);
|
calculateLevels(size);
|
||||||
|
//texBunny = LoadTexture("dot.png"); // bug add deinit to unload texutre
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tree::draw(Dna *dna)
|
void Tree::draw(Dna *dna)
|
||||||
@ -91,10 +92,9 @@ void Tree::drawBranch()
|
|||||||
Vector2 point = Vector2Lerp(arg.start, end, i);
|
Vector2 point = Vector2Lerp(arg.start, end, i);
|
||||||
Color color = ColorLerp(colorStart, colorEnd, i);
|
Color color = ColorLerp(colorStart, colorEnd, i);
|
||||||
int size = Lerp(sizeStart, sizeEnd, i);
|
int size = Lerp(sizeStart, sizeEnd, i);
|
||||||
DrawCircleV(point, size, color); // Fester on the phone to call DrawCircle insted of the Circle shader
|
DrawCircleV(point, size, color);
|
||||||
// Circle::setColor(color);
|
//DrawTextureEx(texBunny, point,0, ((float)size) / texBunny.height, color);
|
||||||
// Circle::draw(point.x, point.y, thick); // TODO Change to BeginShaderMode and EndShaderMode only onece
|
|
||||||
|
|
||||||
// use
|
// use
|
||||||
// DrawRectangleGradientEx
|
// DrawRectangleGradientEx
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ namespace DNA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mutate(Dna *dna, uint32_t num, uint128 *state)
|
void mutate(Dna *dna, uint32_t num, uint128 *state)
|
||||||
{
|
{
|
||||||
uint8_t *array = (uint8_t *)dna;
|
uint8_t *array = (uint8_t *)dna;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user