From bb74873557f9823800441067cf7c73739526c27e Mon Sep 17 00:00:00 2001
From: Nikola Petrov <nikolape7@gmail.com>
Date: Sat, 9 Mar 2024 22:47:57 +0100
Subject: [PATCH] Fix starts to no be transperent

---
 src/BackGround.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/BackGround.cpp b/src/BackGround.cpp
index 99d2f35..8eec891 100644
--- a/src/BackGround.cpp
+++ b/src/BackGround.cpp
@@ -30,10 +30,12 @@ void BackGround::starts()
   {
     int x = GetRandomValue(0, size);
     int y = GetRandomValue(0, size);
-    int alph = GetRandomValue(10, 100);
     int weight = GetRandomValue(1, 3);
 
-    rlColor4ub(starColor.r, starColor.g, starColor.b, alph);
+    float alph = ((float)GetRandomValue(10, 200)) / 255.0f;
+    Color color = ColorLerp(backGroundColor, starColor, alph);
+
+    rlColor4ub(color.r, color.g, color.b, color.a);
 
     // topLeft
     rlTexCoord2f(0, 0);
@@ -56,7 +58,7 @@ void BackGround::starts()
 void BackGround::moon()
 {
   int xpos = GetRandomValue(100, size - 100);
-  int ypos = GetRandomValue(100, 300);
+  int ypos = GetRandomValue(100, maxYPosOfMoon);
   int r = GetRandomValue(minSizeOfMoon, maxSizeOfMoon);
 
   DrawCircle(xpos, ypos, r + 20, ColorLerp(backGroundColor, moonColor, 0.02f));