Add DNA to background

This commit is contained in:
2024-12-20 23:51:42 +01:00
parent 8ad328eb1e
commit ee7b674c6d
7 changed files with 107 additions and 55 deletions

View File

@@ -1,39 +1,33 @@
#include <vector>
#include "canvas/Sun.hpp"
#include "values/Dna.hpp"
#include <raylib.h>
struct Moon
{
float x;
float y;
float size;
};
class BackGround
{
public:
BackGround() = default;
~BackGround() = default;
void init(int size);
void init(int canvasSize);
void deinit();
void newGen();
void draw();
void draw(Dna *dna);
private:
void drawStars();
void drawSun();
void drawMounten(size_t mountenSegments, int min, int max, Color color);
Dna *m_dna;
uint128 mountenSeed;
uint128 starSeed;
Sun sun;
Moon m_moon;
int colorSet;
int time;
int size = 0;
int canvasSize = 0;
constexpr static size_t numOfStarts = 150;
constexpr static float moonXOffset = 0.1f;