Reformat to folow style

This commit is contained in:
Nikola Petrov
2024-03-03 22:31:15 +01:00
parent 8b3eb1cb7e
commit 462f27aa26
4 changed files with 79 additions and 55 deletions

View File

@@ -1,19 +1,18 @@
#include "raylib.h";
#include "raylib.h"
#include <cstdint>
#include <vector>
#include <list>
#define MAX_DEPTH 11
struct branch
struct Branch
{
Color color;
uint8_t numOfBranches;
float lenghthRatio;
};
struct draw_args
struct DrawArgs
{
Vector2 start;
float angleDeg;
@@ -27,17 +26,18 @@ class Tree
public:
Tree(int size);
~Tree();
void Draw(Rectangle dest);
void new_tree();
void generate_tree();
void draw_tree(draw_args first);
void draw_branch(draw_args arg);
Vector2 draw_line(Vector2 start, float angleDeg, float lenghth, int dep);
void draw(Rectangle dest, float rotation);
void newTree();
private:
int size = 0;
RenderTexture2D target = {0};
Vector2 start = {0};
std::vector<branch> tree;
std::list<draw_args> draw_calls;
std::vector<Branch> branches;
std::list<DrawArgs> draw_calls;
void generateBranches();
void drawTree();
void drawBranch();
Vector2 drawLine();
};