\doxysection{function.\+h} \label{function_8h_source}\index{function.h@{function.h}} \begin{DoxyCode}{0} \DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ FONCTION\_H}} \DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ FONCTION\_H}} \DoxyCodeLine{00003\ } \DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00010\ } \DoxyCodeLine{00011\ \textcolor{preprocessor}{\#define\ EMPTY\ 1}} \DoxyCodeLine{00012\ \textcolor{preprocessor}{\#define\ WALL\ 0}} \DoxyCodeLine{00013\ \textcolor{preprocessor}{\#define\ BOX\ 2}} \DoxyCodeLine{00014\ \textcolor{preprocessor}{\#define\ TARGET\ 3}} \DoxyCodeLine{00015\ \textcolor{preprocessor}{\#define\ BOX\_ON\_TARGET\ 4}} \DoxyCodeLine{00016\ \textcolor{preprocessor}{\#define\ PLAYER\ 5}} \DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ PLAYER\_ON\_TARGET\ 6}} \DoxyCodeLine{00018\ \textcolor{preprocessor}{\#define\ BUTTON\ 7}} \DoxyCodeLine{00019\ \textcolor{preprocessor}{\#define\ PLAYER\_ON\_BUTTON\ 8}} \DoxyCodeLine{00020\ \textcolor{preprocessor}{\#define\ BUTTON\_CUSTOM\ 9}} \DoxyCodeLine{00021\ } \DoxyCodeLine{00022\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }Vecteur} \DoxyCodeLine{00023\ \{} \DoxyCodeLine{00024\ \ \ \ \ \textcolor{keywordtype}{int}\ x;} \DoxyCodeLine{00025\ \ \ \ \ \textcolor{keywordtype}{int}\ y;} \DoxyCodeLine{00026\ \}\ vect;} \DoxyCodeLine{00027\ } \DoxyCodeLine{00028\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }Score} \DoxyCodeLine{00029\ \{} \DoxyCodeLine{00030\ \ \ \ \ time\_t\ before;} \DoxyCodeLine{00031\ \ \ \ \ time\_t\ after;} \DoxyCodeLine{00032\ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ move\_player;} \DoxyCodeLine{00033\ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ move\_box;} \DoxyCodeLine{00034\ \}\ score;} \DoxyCodeLine{00035\ } \DoxyCodeLine{00036\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }essential\_sdl} \DoxyCodeLine{00037\ \{} \DoxyCodeLine{00038\ \ \ \ \ SDL\_Window\ *window;} \DoxyCodeLine{00039\ \ \ \ \ SDL\_Renderer\ *renderer;} \DoxyCodeLine{00040\ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ size\_window;} \DoxyCodeLine{00041\ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ size\_box;} \DoxyCodeLine{00042\ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ size\_menu;} \DoxyCodeLine{00043\ \}\ dis;} \DoxyCodeLine{00044\ } \DoxyCodeLine{00045\ \textcolor{keywordtype}{char}\ **creatArea2D\ (\textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ x,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ y);} \DoxyCodeLine{00046\ \textcolor{keywordtype}{void}\ free2D\ (\textcolor{keywordtype}{char}\ **tab,\ \textcolor{keywordtype}{int}\ x);} \DoxyCodeLine{00047\ \textcolor{keywordtype}{bool}\ isWin\ (\textcolor{keywordtype}{char}\ **tab2d,\ vect\ *targets,\ \textcolor{keywordtype}{int}\ nbr\_targets);} \DoxyCodeLine{00048\ \textcolor{keywordtype}{bool}\ islose\ (\textcolor{keywordtype}{char}\ **tab2d,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ N);} \DoxyCodeLine{00049\ \textcolor{keywordtype}{bool}\ blockBox\ (\textcolor{keywordtype}{char}\ **tab2d,\ vect\ box\_coor);} \DoxyCodeLine{00050\ vect\ plusVect\ (vect\ one,\ vect\ two);} \DoxyCodeLine{00051\ } \DoxyCodeLine{00052\ \textcolor{keywordtype}{int}\ inGameLoop\ (\textcolor{keywordtype}{char}\ **tab2d,\ vect\ *dim\_tab,\ vect\ *playerPos,\ vect\ *targets,} \DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ nbr\_targets,\ dis\ *display\_user,\ score\ *score\_user,\ \textcolor{keywordtype}{bool}\ menu);} \DoxyCodeLine{00054\ \textcolor{keywordtype}{char}\ *timeToText(time\_t\ time);} \DoxyCodeLine{00055\ \textcolor{keywordtype}{void}\ nullScore(score\ *player\_score);} \DoxyCodeLine{00056\ \textcolor{keywordtype}{void}\ winOrLoseLoop(dis\ *display\_user,score\ *score\_user,\ \textcolor{keywordtype}{bool}\ win);} \DoxyCodeLine{00057\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ scoreCalculator(score\ *score\_user,\ \textcolor{keywordtype}{bool}\ win);} \DoxyCodeLine{00058\ \textcolor{keywordtype}{int}\ inEditorLoop\ (\textcolor{keywordtype}{char}\ **tab2d,\ vect\ *dim\_tab,\ vect\ *playerPos,\ dis\ *display\_user,score\ *score\_user,\ \textcolor{keywordtype}{int}\ num\_fichier);} \DoxyCodeLine{00059\ \textcolor{keywordtype}{int}\ titleScreen\ (dis\ *display\_user);} \DoxyCodeLine{00060\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ FONCTION\_H}} \end{DoxyCode}