From 9a285cc3bdb8d5870fea5f07235a3e44786a0317 Mon Sep 17 00:00:00 2001 From: Johnny Richard Date: Tue, 13 Apr 2021 02:23:22 +0200 Subject: Add controller to its own header file Signed-off-by: Johnny Richard --- src/main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 022a888..4f685b2 100644 --- a/src/main.c +++ b/src/main.c @@ -3,16 +3,11 @@ #include #include +#include "controller.h" + const int SCREEN_WIDTH = 640; const int SCREEN_HEIGHT = 480; -typedef struct Controller { - bool up; - bool down; - bool left; - bool right; -} Controller; - int main (int argc, char *args[]) @@ -41,7 +36,7 @@ main (int argc, SDL_Rect rect = { .x = 0, .y = 0, .w = 20, .h = 20 }; bool quit = false; - Controller controller = {0}; + controller_t controller = {0}; while (!quit) { screenSurface = SDL_GetWindowSurface(window); -- cgit v1.2.3