commencement menu + addaptatif

This commit is contained in:
2024-12-21 11:45:49 +01:00
parent 40640698f7
commit 7f9433f505
12 changed files with 95 additions and 27 deletions

View File

@@ -5,7 +5,7 @@
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
void screenDisplay (char **tab, int size);
void screenDisplay (char **tab, int x, int y);
int getMaxSize (dis display_user);
void displayImage (SDL_Renderer *renderer, SDL_Texture *texture, vect pos,
int size);

View File

@@ -8,13 +8,14 @@
#include <stdlib.h>
#include <time.h>
#define EMPTY 0
#define WALL 1
#define EMPTY 1
#define WALL 0
#define BOX 2
#define TARGET 3
#define BOX_ON_TARGET 4
#define PLAYER 5
#define PLAYER_ON_TARGET 6
#define BUTTON 7
typedef struct Vecteur
{
@@ -39,9 +40,8 @@ typedef struct essential_sdl
unsigned int size_menu;
} dis;
char **creatArea2D (const unsigned int N);
void free2D (char **tab, int N);
void screenDisplay (char **tab, int size);
char **creatArea2D (const int x, const int y);
void free2D (char **tab, int x);
bool isWin (char **tab2d, vect *targets, int nbr_targets);
bool islose (char **tab2d, const int N);
bool blockBox (char **tab2d, vect box_coor);

View File

@@ -3,4 +3,6 @@
#include "function.h"
vect *fileToTab2D (const char *name_file, char **tab,
const unsigned N, vect *player, int *nbr_targets);
int countCustomMaps(char *name_directory);
char ** generatorMenu(char *name_directory, int *x , int *y);
#endif // !READ_H