summaryrefslogtreecommitdiff
path: root/src/star.c
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-12-11 13:11:41 +0500
committerilotterytea <iltsu@alright.party>2024-12-11 13:11:41 +0500
commit493b668742ceb28a4e10ca5016e652f9638429aa (patch)
tree4f07933b5e71cc6d73d09d59cd14d202a629439a /src/star.c
parent80c74c80615693cf4b8a5090121dad8d14ccfb0f (diff)
feat: texture for stars
Diffstat (limited to 'src/star.c')
-rw-r--r--src/star.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/star.c b/src/star.c
index 24d2dd0..4676a8f 100644
--- a/src/star.c
+++ b/src/star.c
@@ -22,13 +22,13 @@ Vector3 Generate3DPosition() {
return v;
}
-Star StarCreate() {
+Star StarCreate(Texture *texture) {
double velocity =
rand() % (STAR_MAX_VELOCITY + 1 - STAR_MIN_VELOCITY) + STAR_MIN_VELOCITY;
velocity /= 100.0;
- return (Star){Generate3DPosition(), {1, 1}, {0, 0}, velocity, BLACK};
+ return (Star){Generate3DPosition(), {1, 1}, {0, 0}, velocity, WHITE, texture};
}
void StarUpdate(Star *star, float screen_center_x, float screen_center_y) {