test pour menu

This commit is contained in:
2024-12-24 15:51:26 +01:00
parent 7f9433f505
commit c50388def9
8 changed files with 67 additions and 27 deletions

View File

@@ -10,9 +10,10 @@
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_render.h>
#include <stdio.h>
#include <string.h>
#define SIZE_PLAY 19
#define SIZE_MENU 200;
#define SIZE_PLAY 20
#define SIZE_MENU 200
int main ()
{
@@ -31,15 +32,17 @@ int main ()
score score_user = {0, 0, 0,0};
int x,y;
char**menu = generatorMenu("maps", &x, &y);
vect *pos = malloc(sizeof(vect));
char**menu = generatorMenu("maps", &x, &y, pos);
screenDisplay(menu, x, y);
targets
= fileToTab2D ("maps/original_1.txt", tab2d, SIZE_PLAY, playerPos, &nbr_targets);
screenDisplayGameSDL (tab2d, &display_user);
screenDisplayGameSDL (tab2d, &display_user, NULL, -1);
inGameLoop (tab2d, SIZE_PLAY, playerPos, targets, nbr_targets,
&display_user, &score_user);
//screenDisplay(tab2d, SIZE_PLAY, SIZE_PLAY);
SDL_DestroyWindow (display_user.window);
SDL_DestroyRenderer (display_user.renderer);