summaryrefslogtreecommitdiff
path: root/Week1-Pacman/src/map.c
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-01-15 18:12:03 +0300
committerBoredGuy <osome3717@gmail.com>2025-01-15 18:12:03 +0300
commit6a6f7be378bee10679e9e1ea61a70b00b4731589 (patch)
tree8017237147d72e455d6479734579df39eefd2853 /Week1-Pacman/src/map.c
parent5f7e0d8cf88d0adb9739e2cc7e26ba26243975f8 (diff)
Scuffed Resource SystemHEADmaster
I am super proud of this one TBH
Diffstat (limited to 'Week1-Pacman/src/map.c')
-rw-r--r--Week1-Pacman/src/map.c14
1 files changed, 1 insertions, 13 deletions
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 <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#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);
- }
-}