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));