display SDL
This commit is contained in:
16
function.h
16
function.h
@@ -1,9 +1,12 @@
|
||||
#ifndef FONCTION_H
|
||||
#define FONCTION_H
|
||||
|
||||
#include <SDL2/SDL_render.h>
|
||||
#include <SDL2/SDL_video.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#define EMPTY 0
|
||||
#define WALL 1
|
||||
@@ -27,14 +30,23 @@ typedef struct Score
|
||||
unsigned int move_box;
|
||||
} score;
|
||||
|
||||
typedef struct essential_sdl
|
||||
{
|
||||
SDL_Window *window ;
|
||||
SDL_Renderer *renderer;
|
||||
unsigned int size_window;
|
||||
unsigned int size_box;
|
||||
}dis;
|
||||
|
||||
unsigned short int **creatArea2D (const unsigned int N);
|
||||
void free2D (unsigned short int **tab, int N);
|
||||
void screenDisplay (unsigned short int **tab, int size);
|
||||
void inGameLoop (unsigned short int **tab2d, int N, vect *playerPos,
|
||||
vect *targets, int nbr_targets);
|
||||
bool isWin (unsigned short int **tab2d, vect *targets, int nbr_targets);
|
||||
bool islose (unsigned short int **tab2d, const int N);
|
||||
bool blockBox (unsigned short int **tab2d, vect box_coor);
|
||||
vect plusVect (vect one, vect two);
|
||||
void
|
||||
inGameLoop (unsigned short int **tab2d, int N, vect *playerPos, vect *targets,
|
||||
int nbr_targets, dis *display_user);
|
||||
|
||||
#endif // FONCTION_H
|
||||
|
||||
Reference in New Issue
Block a user