summaryrefslogtreecommitdiff
path: root/Week1-Pacman/src/main.c
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-01-02 10:53:09 +0300
committerBoredGuy <osome3717@gmail.com>2025-01-02 10:53:09 +0300
commit1d1554652888fa4f0cd12a51fda8d9bd54dbcee6 (patch)
tree200b6c77e9097d91aeed45cb5712ba2d4022207a /Week1-Pacman/src/main.c
parentdd83126b20122915ca673f0f385d089743f8bc4b (diff)
Movement Finished
- Smooth edge turning means that movement is now convincingly (pacmanny)
Diffstat (limited to 'Week1-Pacman/src/main.c')
-rw-r--r--Week1-Pacman/src/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Week1-Pacman/src/main.c b/Week1-Pacman/src/main.c
index 5d2439a..66e1278 100644
--- a/Week1-Pacman/src/main.c
+++ b/Week1-Pacman/src/main.c
@@ -9,6 +9,8 @@
#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600
+const Uint8* keyboard;
+
int main(int argc, char** argv) {
(void)argc;
(void)argv;
@@ -35,7 +37,7 @@ int main(int argc, char** argv) {
struct map map = {0};
load_map("assets/Maps/maze.csv", &map);
- const char* keyboard =
+ keyboard =
SDL_GetKeyboardState(NULL);
for(int i = 0; i < 4; i++)
@@ -80,8 +82,6 @@ int main(int argc, char** argv) {
}
}
- handle_pacman_input(keyboard, &pacman, &map);
-
int now = SDL_GetTicks();
float dt = (float)(now - then) / 1000;
then = now;
@@ -98,5 +98,4 @@ int main(int argc, char** argv) {
SDL_DestroyWindow(demo.win);
SDL_Quit();
return 0;
-
}