diff options
Diffstat (limited to 'Week1-Pacman/src/main.c')
-rw-r--r-- | Week1-Pacman/src/main.c | 7 |
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; - } |