This commit is contained in:
2026-02-16 19:35:41 +01:00
parent 6ff4a66551
commit 29230f4d07
11 changed files with 189 additions and 239 deletions

View File

@@ -13,7 +13,6 @@ public:
void newGen(RenderTexture2D &target, Dna *dna);
bool tick(RenderTexture2D &target);
private:
BackGround backGround;
Tree tree;
};

View File

@@ -23,6 +23,7 @@ public:
void init(int size);
void draw(Dna *dna);
bool tick();
uint64_t circles;
private:
Dna *m_dna;
@@ -34,7 +35,8 @@ private:
void calculateBranch();
void drawBranch(Vector2 startPoint, Vector2 endPoint, Color startColor, Color endColor, float startThickness, float endThickness);
void drawBranch_rlTriangle(Vector2 startPoint, Vector2 endPoint, Color startColor, Color endColor, float startThickness, float endThickness, float length);
void drawBranch_circles(Vector2 startPoint, Vector2 endPoint, Color startColor, Color endColor, float startThickness, float endThickness, float length);
inline size_t getNumOfBranches(int dep);
inline Color getStartColor(DrawArgs &arg);
inline Color getEndColor(int dep, Color &start);

18
shared/inc/timing.hpp Normal file
View File

@@ -0,0 +1,18 @@
#include <chrono>
struct Timer
{
std::chrono::steady_clock::time_point start_t;
std::chrono::steady_clock::time_point end_t;
std::chrono::nanoseconds dur;
void start();
void stop();
void reset();
void print(const char * str);
void stop_and_print(const char * str);
void reset_and_start();
};