summaryrefslogtreecommitdiff
path: root/Week1-Pacman/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'Week1-Pacman/src/main.c')
-rw-r--r--Week1-Pacman/src/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Week1-Pacman/src/main.c b/Week1-Pacman/src/main.c
index 6ae2fde..b36286e 100644
--- a/Week1-Pacman/src/main.c
+++ b/Week1-Pacman/src/main.c
@@ -5,6 +5,7 @@
#include "pacman.h"
#include "map.h"
#include "collision.h"
+#include "resources.h"
#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600
@@ -28,19 +29,17 @@ int main(int argc, char** argv) {
-1,
SDL_RENDERER_PRESENTVSYNC |
SDL_RENDERER_ACCELERATED);
+ load_resources(&demo);
bool running = true;
SDL_Event e;
struct pacman pacman = {0};
- map_init(&demo);
-
struct map map = {0};
load_map("assets/Maps/maze.csv", &map);
keyboard =
SDL_GetKeyboardState(NULL);
- load_pacman_spritesheet(&demo);
init_pacman(&pacman, &(struct pacman_init) {
.initial_xpos = 100,
.initial_ypos = 200,