added stars to gameplay grid

This commit is contained in:
2025-11-30 14:00:32 +01:00
parent 55c40f0516
commit 9ea0183339
6 changed files with 54 additions and 14 deletions

View File

@ -13,7 +13,7 @@ public:
void init(int width, int height, int starCount = 160);
void update(float deltaTime);
void draw(SDL_Renderer* renderer);
void draw(SDL_Renderer* renderer, float offsetX = 0.0f, float offsetY = 0.0f, float alphaScale = 1.0f, bool grayscale = false);
void resize(int width, int height);
private:
@ -32,7 +32,7 @@ private:
void setRandomDirection(Star3D& star);
float randomFloat(float min, float max);
int randomRange(int min, int max);
void drawStar(SDL_Renderer* renderer, float x, float y, int type);
void drawStar(SDL_Renderer* renderer, float x, float y, SDL_Color color, float alphaScale);
std::vector<Star3D> stars;
int width{0}, height{0};