summaryrefslogtreecommitdiff
path: root/src/star.c
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-12-11 11:50:06 +0500
committerilotterytea <iltsu@alright.party>2024-12-11 11:50:06 +0500
commit80c74c80615693cf4b8a5090121dad8d14ccfb0f (patch)
tree35eded3126e68e182b51314ed80407da099352e5 /src/star.c
parentcbeb0314a90edb5ce28df2a8892160c0023320cb (diff)
feat: mouse can control the world view
Diffstat (limited to 'src/star.c')
-rw-r--r--src/star.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/star.c b/src/star.c
index a92e63f..24d2dd0 100644
--- a/src/star.c
+++ b/src/star.c
@@ -31,10 +31,7 @@ Star StarCreate() {
return (Star){Generate3DPosition(), {1, 1}, {0, 0}, velocity, BLACK};
}
-void StarUpdate(Star *star) {
- float screen_center_x = GetScreenWidth() / 2.0;
- float screen_center_y = GetScreenHeight() / 2.0;
-
+void StarUpdate(Star *star, float screen_center_x, float screen_center_y) {
float x = star->position.x / star->position.z + screen_center_x;
float y = star->position.y / star->position.z + screen_center_y;