diff options
| author | ilotterytea <iltsu@alright.party> | 2024-12-11 11:50:06 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-12-11 11:50:06 +0500 |
| commit | 80c74c80615693cf4b8a5090121dad8d14ccfb0f (patch) | |
| tree | 35eded3126e68e182b51314ed80407da099352e5 /src/star.c | |
| parent | cbeb0314a90edb5ce28df2a8892160c0023320cb (diff) | |
feat: mouse can control the world view
Diffstat (limited to 'src/star.c')
| -rw-r--r-- | src/star.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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; |
