From 6a6f7be378bee10679e9e1ea61a70b00b4731589 Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Wed, 15 Jan 2025 18:12:03 +0300 Subject: Scuffed Resource System I am super proud of this one TBH --- Week1-Pacman/src/map.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'Week1-Pacman/src/map.c') diff --git a/Week1-Pacman/src/map.c b/Week1-Pacman/src/map.c index d5efc9d..9f426cb 100644 --- a/Week1-Pacman/src/map.c +++ b/Week1-Pacman/src/map.c @@ -3,11 +3,10 @@ #include #include #include "map.h" +#include "import_resources.h" #define TILE_SIDE 8 -SDL_Texture* map_texture = NULL; - void add_map_row(const char* string, struct map* map); void load_map(const char* filename, struct map* map) { @@ -121,14 +120,3 @@ void draw_map(struct demo* demo, struct map* map) { demo_rendercopy(demo, map_texture, &s, &d); } } - -void map_init(struct demo* demo) { - map_texture = - IMG_LoadTexture(demo->ren, "assets/Sprites/Tileset.png"); - - if(map_texture == NULL) { - printf("Failed to load map tileset, error: %s, exitting!\n", - SDL_GetError()); - exit(1); - } -} -- cgit v1.2.3