summaryrefslogtreecommitdiff
path: root/Week1-Pacman/src/main.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/main.c
parent5f7e0d8cf88d0adb9739e2cc7e26ba26243975f8 (diff)
Scuffed Resource SystemHEADmaster
I am super proud of this one TBH
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,