1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <stdint.h> #include <SDL2/SDL.h> typedef struct { SDL_Window* window; SDL_Renderer* renderer; uint8_t input; void (*update)(void); void (*render)(void); } App; typedef struct { SDL_Rect rect; int dx; int dy; float timer; } game_object;