From c2391df946a07537363a192f097d2bafc2705294 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 5 May 2024 23:42:38 +0100 Subject: [PATCH] Update main.c --- src/main.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/main.c b/src/main.c index c088c42..df9fe69 100644 --- a/src/main.c +++ b/src/main.c @@ -31,9 +31,9 @@ struct point { u32 y; }; -Point point_from_index(u32 index, u32 w); -void write_debug_ppm6(const Image *img); -SDL_Texture *image_to_texture(SDL_Renderer *renderer, const Image *img); +internal void write_debug_ppm6(const Image *img); +internal SDL_Texture *image_to_texture(SDL_Renderer *renderer, + const Image *img); int main(int argc, char *argv[]) { int exit_code = EXIT_SUCCESS; @@ -125,17 +125,7 @@ MAIN_DESTROY_ARENA: return exit_code; } -Point point_from_index(u32 index, u32 w) { - Point out = {0}; - - out.x = index % w; - - out.y = (index - (index % w)) / w; - - return out; -} - -void write_debug_ppm6(const Image *img) { +internal void write_debug_ppm6(const Image *img) { FILE *out = fopen("test.ppm", "wb"); char magic[] = {'P', '6', '\n'}; @@ -156,7 +146,8 @@ void write_debug_ppm6(const Image *img) { fclose(out); } -SDL_Texture *image_to_texture(SDL_Renderer *renderer, const Image *img) { +internal SDL_Texture *image_to_texture(SDL_Renderer *renderer, + const Image *img) { SDL_Texture *output = NULL; if (!renderer || !img) { goto IMAGE_TO_TEXTURE_RETURN;