51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
#include <vector>
|
|
#include <raylib.h>
|
|
#include "values/RandBuffer.hpp"
|
|
|
|
struct Moon
|
|
{
|
|
float x;
|
|
float y;
|
|
float size;
|
|
};
|
|
|
|
class BackGround
|
|
{
|
|
|
|
public:
|
|
BackGround() = default;
|
|
~BackGround() = default;
|
|
void init(int size);
|
|
void newGen();
|
|
void draw();
|
|
|
|
private:
|
|
void drawStarts();
|
|
void drawMoon();
|
|
void drawMounten(size_t mountenSegments, int min, int max, Color color);
|
|
|
|
RandBuffer starBuff;
|
|
RandBuffer mountenBuff;
|
|
Moon m_moon;
|
|
|
|
int size = 0;
|
|
|
|
constexpr static size_t numOfStarts = 150;
|
|
constexpr static float moonXOffset = 0.1f;
|
|
constexpr static float minSizeOfMoon = 0.05f;
|
|
constexpr static float maxSizeOfMoon = 0.075f;
|
|
constexpr static float maxYPosOfMoon = 0.80f;
|
|
constexpr static float bigRingRatio = 0.5f;
|
|
constexpr static float smallRingRatio = 0.25f;
|
|
constexpr static float bigRingBlend = 0.02f;
|
|
constexpr static float smallRingBlend = 0.05f;
|
|
constexpr static float colorRatio1 = 0.3f;
|
|
constexpr static float colorRatio2 = 0.7f;
|
|
constexpr static float mounten1min = 0.78f;
|
|
constexpr static float mounten1max = 0.81f;
|
|
constexpr static float mounten2min = 0.83f;
|
|
constexpr static float mounten2max = 0.87;
|
|
constexpr static float mounten3min = 0.90f;
|
|
constexpr static float mounten3max = 0.95f;
|
|
};
|