Remove unnecessary variables

This commit is contained in:
Abdelrahman Said 2023-08-19 22:57:12 +01:00
parent 61681f5e62
commit 3ab2f14235
2 changed files with 5 additions and 8 deletions

View File

@ -71,11 +71,11 @@
"-x",
"c",
"-o",
"/tmp/main-118336.o",
"/tmp/main-77a7ba.o",
"main.c"
],
"directory": "/home/abdelrahman/Sources/programming/starfield",
"file": "/home/abdelrahman/Sources/programming/starfield/main.c",
"output": "/tmp/main-118336.o"
"output": "/tmp/main-77a7ba.o"
}
]

9
main.c
View File

@ -61,7 +61,7 @@ void init_starfield(vec3f_t *stars, u32 count, i32 spread);
void update_startfield(vec3f_t *stars, u32 count, i32 spread, u32 speed,
f64 delta);
void render_starfield(SDL_Surface *surface, vec3f_t *stars, u32 count,
i32 spread, f64 aov);
i32 spread);
int main(void) {
srand(time(NULL));
@ -100,10 +100,7 @@ int main(void) {
render_clear(canvas, BG_COLOR);
u32 scalar = 10;
vec2i_t pos;
render_starfield(canvas, stars, STAR_COUNT, STAR_SPREAD, 60.0);
render_starfield(canvas, stars, STAR_COUNT, STAR_SPREAD);
SDL_BlitSurface(canvas, NULL, surface, NULL);
@ -219,7 +216,7 @@ void update_startfield(vec3f_t *stars, u32 count, i32 spread, u32 speed,
}
void render_starfield(SDL_Surface *surface, vec3f_t *stars, u32 count,
i32 spread, f64 aov) {
i32 spread) {
vec2f_t projected[count];
vec2i_t coords;