From 22614b68bfe71a5da9802449d92a8f3cb1291a8d Mon Sep 17 00:00:00 2001 From: VegOwOtenks Date: Sun, 2 Mar 2025 12:28:46 +0100 Subject: [PATCH] Made the galaxy more spirally --- src/spiral-galaxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spiral-galaxy.c b/src/spiral-galaxy.c index b8baf19..a0496b8 100644 --- a/src/spiral-galaxy.c +++ b/src/spiral-galaxy.c @@ -14,7 +14,7 @@ #define WINDOW_SIZE 600 #define SWIRLINESS 35 -#define ARM_COUNT 3 +#define ARM_COUNT 2 #define STAR_COUNT 2000 #include "../submodules/utilitiec/src/Vector/Vec2DF64.h" @@ -116,7 +116,7 @@ void GenerateStars() star->color = star_colors[color_index]; arm_distance = Galaxy_ArmDistance( - star->position.x / WINDOW_SIZE, + star->position.x / (WINDOW_SIZE * 0.75), star->position.y / WINDOW_SIZE, SWIRLINESS, ARM_COUNT @@ -151,7 +151,7 @@ void SDL_RenderArms() for (size_t y = 0; y < WINDOW_SIZE; y++) { double norm_y = (double) y / WINDOW_SIZE; for (size_t x = 0; x < WINDOW_SIZE; x++) { - double norm_x = (double) x / WINDOW_SIZE; + double norm_x = (double) x / (WINDOW_SIZE * 0.75); double distance = Galaxy_ArmDistance(norm_x, norm_y, SWIRLINESS, ARM_COUNT); uint progress = distance * 100; SDL_Color black = { 0, 0, 0, 255 };