#include "display.h" #include "function.h" #include "read.h" #include #include #include #include #include #define SIZE_PLAY 5 #define SIZE_MENU 200; int main () { dis display_user; display_user.size_menu = SIZE_MENU; display_user.size_box = SIZE_PLAY; display_user.size_window = getMaxSize (display_user); initSDL (&display_user); vect *playerPos = (vect *)malloc (sizeof (vect)); vect *targets; int nbr_targets; score playerScore; unsigned short int **tab2d = creatArea2D (SIZE_PLAY); playerScore.before = time (NULL); targets = fileToTab2D ("test3.txt", tab2d, SIZE_PLAY, playerPos, &nbr_targets); screenDisplayGameSDL (tab2d, &display_user); vect size = {100, 100}; vect pos = {900, 0}; displayTextSDL(&display_user, "213", pos, size, 24); screenDisplay (tab2d, SIZE_PLAY); inGameLoop (tab2d, SIZE_PLAY, playerPos, targets, nbr_targets, &display_user); playerScore.after = time (NULL); printf ("%ld\n", playerScore.after - playerScore.before); SDL_DestroyWindow (display_user.window); SDL_DestroyRenderer (display_user.renderer); free2D (tab2d, SIZE_PLAY); free (playerPos); free (targets); SDL_Quit (); return 0; }