From 80c74c80615693cf4b8a5090121dad8d14ccfb0f Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 11 Dec 2024 11:50:06 +0500 Subject: feat: mouse can control the world view --- src/star.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/star.c') 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; -- cgit v1.2.3