Sokoban
Chargement...
Recherche...
Aucune correspondance
include
function.h
1
#ifndef FONCTION_H
2
#define FONCTION_H
3
4
#include <SDL2/SDL.h>
5
#include <SDL2/SDL_render.h>
6
#include <SDL2/SDL_video.h>
7
#include <stdbool.h>
8
#include <stdlib.h>
9
#include <time.h>
10
11
#define EMPTY 0
12
#define WALL 1
13
#define BOX 2
14
#define TARGET 3
15
#define BOX_ON_TARGET 4
16
#define PLAYER 5
17
#define PLAYER_ON_TARGET 6
18
19
typedef
struct
Vecteur
20
{
21
int
x;
22
int
y;
23
}
vect
;
24
25
typedef
struct
Score
26
{
27
time_t before;
28
time_t after;
29
unsigned
int
move_player;
30
unsigned
int
move_box;
31
}
score
;
32
33
typedef
struct
essential_sdl
34
{
35
SDL_Window *window;
36
SDL_Renderer *renderer;
37
unsigned
int
size_window;
38
unsigned
int
size_box;
39
unsigned
int
size_menu;
40
}
dis
;
41
42
char
**creatArea2D (
const
unsigned
int
N);
43
void
free2D (
char
**tab,
int
N);
44
void
screenDisplay (
char
**tab,
int
size);
45
bool
isWin (
char
**tab2d,
vect
*targets,
int
nbr_targets);
46
bool
islose (
char
**tab2d,
const
int
N);
47
bool
blockBox (
char
**tab2d,
vect
box_coor);
48
vect
plusVect (
vect
one,
vect
two);
49
void
inGameLoop (
char
**tab2d,
int
N,
vect
*playerPos,
50
vect
*targets,
int
nbr_targets,
dis
*display_user,
score
*score_user);
51
char
*timeToText(time_t time);
52
53
#endif
// FONCTION_H
Score
Definition
function.h:26
Vecteur
Definition
function.h:20
essential_sdl
Definition
function.h:34
Généré par
1.12.0