\hypertarget{utils_8h}{}\doxysection{headers/utils.h File Reference} \label{utils_8h}\index{headers/utils.h@{headers/utils.h}} utilies for the game {\ttfamily \#include $<$vector$>$}\newline {\ttfamily \#include \char`\"{}mingl/mingl.\+h\char`\"{}}\newline Include dependency graph for utils.\+h\+: \nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=216pt]{db/d29/utils_8h__incl} \end{center} \end{figure} This graph shows which files directly or indirectly include this file\+: \nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{d9/d4c/utils_8h__dep__incl} \end{center} \end{figure} \doxysubsection*{Macros} \begin{DoxyCompactItemize} \item \#define \mbox{\hyperlink{utils_8h_a2712b06fd52f25adca031d05c3e0c09b}{PLAYER\+\_\+\+HEIGHT}}~100 \item \#define \mbox{\hyperlink{utils_8h_a1f75c733009cd39459a13c7cdbb5410d}{PROJ\+\_\+\+LENGTH\+\_\+\+FACTOR}}~2 \item \#define \mbox{\hyperlink{utils_8h_a815cc3532f834befd1c85e0e8d3bc9f7}{INV\+\_\+\+GET\+\_\+\+POS}}(i)~conf\+Data.\+invaders\+Size$\ast$(i)+conf\+Data.\+invaders\+Distance$\ast$(i) \item \#define \mbox{\hyperlink{utils_8h_aa1bc11933ce4506010028d354b3364b4}{DEBUG\+\_\+\+MSG}}(X) \item \#define \mbox{\hyperlink{utils_8h_ac9476fcfc18faf6d47d13b9774eea2a4}{DEBUG\+\_\+\+INSTR}}(X) \item \#define \mbox{\hyperlink{utils_8h_aff32b2add5186520b5ae86864ebaf51a}{PLAYER1}}~0 \item \#define \mbox{\hyperlink{utils_8h_a7a2041512655fbd01e15d4516f7fb7cc}{PLAYER2}}~1 \end{DoxyCompactItemize} \doxysubsection*{Typedefs} \begin{DoxyCompactItemize} \item typedef ns\+Graphics\+::\+Vec2D \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} \item typedef unsigned \mbox{\hyperlink{utils_8h_a19f2f2312637b6ed67b6d24598b6f470}{player\+ID}} \end{DoxyCompactItemize} \doxysubsection*{Enumerations} \begin{DoxyCompactItemize} \item enum class \mbox{\hyperlink{utils_8h_acd2eabcda2cfc7902077f1f9a9e318de}{Win\+Value}} \{ \mbox{\hyperlink{utils_8h_acd2eabcda2cfc7902077f1f9a9e318deab0a805cee749933cf3e707de70a80dbf}{NOBODY}} , \mbox{\hyperlink{utils_8h_acd2eabcda2cfc7902077f1f9a9e318deae334ea4bb6fd38968f6809b091120ad8}{PLAYERS}} , \mbox{\hyperlink{utils_8h_acd2eabcda2cfc7902077f1f9a9e318dea6c5e2f894ce45b3f0b6c6a9f35165354}{INVADERS}} , \mbox{\hyperlink{utils_8h_acd2eabcda2cfc7902077f1f9a9e318dea0d28cba0bd4f26e16d766000d27e49fa}{GOD}} \} \begin{DoxyCompactList}\small\item\em list of win values \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item bool \mbox{\hyperlink{utils_8h_a8d01e61a45fe7072e45f22044013e358}{are\+Lines\+Colliding}} (unsigned start1, unsigned end1, unsigned start2, unsigned end2) \begin{DoxyCompactList}\small\item\em tells if 2 lines are colliding in a 1 dimentionnal space \end{DoxyCompactList}\item void \mbox{\hyperlink{utils_8h_a984f84273044b866085f08117f942b8f}{apply\+Transformation}} (\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} \&pos, unsigned size\+From, unsigned size\+To) \begin{DoxyCompactList}\small\item\em change the size of a Position object \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} utilies for the game \begin{DoxyAuthor}{Author} RUBINI Thomas \end{DoxyAuthor} \begin{DoxyDate}{Date} January 2022 \end{DoxyDate} \begin{DoxyVersion}{Version} 1.\+0 \end{DoxyVersion} Definition in file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \doxysubsection{Macro Definition Documentation} \mbox{\Hypertarget{utils_8h_ac9476fcfc18faf6d47d13b9774eea2a4}\label{utils_8h_ac9476fcfc18faf6d47d13b9774eea2a4}} \index{utils.h@{utils.h}!DEBUG\_INSTR@{DEBUG\_INSTR}} \index{DEBUG\_INSTR@{DEBUG\_INSTR}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{DEBUG\_INSTR}{DEBUG\_INSTR}} {\footnotesize\ttfamily \#define DEBUG\+\_\+\+INSTR(\begin{DoxyParamCaption}\item[{}]{X }\end{DoxyParamCaption})} Definition at line \mbox{\hyperlink{utils_8h_source_l00035}{35}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \mbox{\Hypertarget{utils_8h_aa1bc11933ce4506010028d354b3364b4}\label{utils_8h_aa1bc11933ce4506010028d354b3364b4}} \index{utils.h@{utils.h}!DEBUG\_MSG@{DEBUG\_MSG}} \index{DEBUG\_MSG@{DEBUG\_MSG}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{DEBUG\_MSG}{DEBUG\_MSG}} {\footnotesize\ttfamily \#define DEBUG\+\_\+\+MSG(\begin{DoxyParamCaption}\item[{}]{X }\end{DoxyParamCaption})} Definition at line \mbox{\hyperlink{utils_8h_source_l00034}{34}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \mbox{\Hypertarget{utils_8h_a815cc3532f834befd1c85e0e8d3bc9f7}\label{utils_8h_a815cc3532f834befd1c85e0e8d3bc9f7}} \index{utils.h@{utils.h}!INV\_GET\_POS@{INV\_GET\_POS}} \index{INV\_GET\_POS@{INV\_GET\_POS}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{INV\_GET\_POS}{INV\_GET\_POS}} {\footnotesize\ttfamily \#define INV\+\_\+\+GET\+\_\+\+POS(\begin{DoxyParamCaption}\item[{}]{i }\end{DoxyParamCaption})~conf\+Data.\+invaders\+Size$\ast$(i)+conf\+Data.\+invaders\+Distance$\ast$(i)} Definition at line \mbox{\hyperlink{utils_8h_source_l00024}{24}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \mbox{\Hypertarget{utils_8h_aff32b2add5186520b5ae86864ebaf51a}\label{utils_8h_aff32b2add5186520b5ae86864ebaf51a}} \index{utils.h@{utils.h}!PLAYER1@{PLAYER1}} \index{PLAYER1@{PLAYER1}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{PLAYER1}{PLAYER1}} {\footnotesize\ttfamily \#define PLAYER1~0} Definition at line \mbox{\hyperlink{utils_8h_source_l00055}{55}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \mbox{\Hypertarget{utils_8h_a7a2041512655fbd01e15d4516f7fb7cc}\label{utils_8h_a7a2041512655fbd01e15d4516f7fb7cc}} \index{utils.h@{utils.h}!PLAYER2@{PLAYER2}} \index{PLAYER2@{PLAYER2}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{PLAYER2}{PLAYER2}} {\footnotesize\ttfamily \#define PLAYER2~1} Definition at line \mbox{\hyperlink{utils_8h_source_l00056}{56}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \mbox{\Hypertarget{utils_8h_a2712b06fd52f25adca031d05c3e0c09b}\label{utils_8h_a2712b06fd52f25adca031d05c3e0c09b}} \index{utils.h@{utils.h}!PLAYER\_HEIGHT@{PLAYER\_HEIGHT}} \index{PLAYER\_HEIGHT@{PLAYER\_HEIGHT}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{PLAYER\_HEIGHT}{PLAYER\_HEIGHT}} {\footnotesize\ttfamily \#define PLAYER\+\_\+\+HEIGHT~100} Definition at line \mbox{\hyperlink{utils_8h_source_l00018}{18}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \mbox{\Hypertarget{utils_8h_a1f75c733009cd39459a13c7cdbb5410d}\label{utils_8h_a1f75c733009cd39459a13c7cdbb5410d}} \index{utils.h@{utils.h}!PROJ\_LENGTH\_FACTOR@{PROJ\_LENGTH\_FACTOR}} \index{PROJ\_LENGTH\_FACTOR@{PROJ\_LENGTH\_FACTOR}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{PROJ\_LENGTH\_FACTOR}{PROJ\_LENGTH\_FACTOR}} {\footnotesize\ttfamily \#define PROJ\+\_\+\+LENGTH\+\_\+\+FACTOR~2} Definition at line \mbox{\hyperlink{utils_8h_source_l00019}{19}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \doxysubsection{Typedef Documentation} \mbox{\Hypertarget{utils_8h_a19f2f2312637b6ed67b6d24598b6f470}\label{utils_8h_a19f2f2312637b6ed67b6d24598b6f470}} \index{utils.h@{utils.h}!playerID@{playerID}} \index{playerID@{playerID}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{playerID}{playerID}} {\footnotesize\ttfamily typedef unsigned \mbox{\hyperlink{utils_8h_a19f2f2312637b6ed67b6d24598b6f470}{player\+ID}}} Definition at line \mbox{\hyperlink{utils_8h_source_l00054}{54}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \mbox{\Hypertarget{utils_8h_aaa06d516441b519f8892f37adafeade2}\label{utils_8h_aaa06d516441b519f8892f37adafeade2}} \index{utils.h@{utils.h}!Position@{Position}} \index{Position@{Position}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{Position}{Position}} {\footnotesize\ttfamily typedef ns\+Graphics\+::\+Vec2D \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}} Definition at line \mbox{\hyperlink{utils_8h_source_l00053}{53}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \doxysubsection{Enumeration Type Documentation} \mbox{\Hypertarget{utils_8h_acd2eabcda2cfc7902077f1f9a9e318de}\label{utils_8h_acd2eabcda2cfc7902077f1f9a9e318de}} \index{utils.h@{utils.h}!WinValue@{WinValue}} \index{WinValue@{WinValue}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{WinValue}{WinValue}} {\footnotesize\ttfamily enum class \mbox{\hyperlink{utils_8h_acd2eabcda2cfc7902077f1f9a9e318de}{Win\+Value}}\hspace{0.3cm}{\ttfamily [strong]}} list of win values \begin{DoxyEnumFields}{Enumerator} \raisebox{\heightof{T}}[0pt][0pt]{\index{NOBODY@{NOBODY}!utils.h@{utils.h}}\index{utils.h@{utils.h}!NOBODY@{NOBODY}}}\mbox{\Hypertarget{utils_8h_acd2eabcda2cfc7902077f1f9a9e318deab0a805cee749933cf3e707de70a80dbf}\label{utils_8h_acd2eabcda2cfc7902077f1f9a9e318deab0a805cee749933cf3e707de70a80dbf}} NOBODY&\\ \hline \raisebox{\heightof{T}}[0pt][0pt]{\index{PLAYERS@{PLAYERS}!utils.h@{utils.h}}\index{utils.h@{utils.h}!PLAYERS@{PLAYERS}}}\mbox{\Hypertarget{utils_8h_acd2eabcda2cfc7902077f1f9a9e318deae334ea4bb6fd38968f6809b091120ad8}\label{utils_8h_acd2eabcda2cfc7902077f1f9a9e318deae334ea4bb6fd38968f6809b091120ad8}} PLAYERS&\\ \hline \raisebox{\heightof{T}}[0pt][0pt]{\index{INVADERS@{INVADERS}!utils.h@{utils.h}}\index{utils.h@{utils.h}!INVADERS@{INVADERS}}}\mbox{\Hypertarget{utils_8h_acd2eabcda2cfc7902077f1f9a9e318dea6c5e2f894ce45b3f0b6c6a9f35165354}\label{utils_8h_acd2eabcda2cfc7902077f1f9a9e318dea6c5e2f894ce45b3f0b6c6a9f35165354}} INVADERS&\\ \hline \raisebox{\heightof{T}}[0pt][0pt]{\index{GOD@{GOD}!utils.h@{utils.h}}\index{utils.h@{utils.h}!GOD@{GOD}}}\mbox{\Hypertarget{utils_8h_acd2eabcda2cfc7902077f1f9a9e318dea0d28cba0bd4f26e16d766000d27e49fa}\label{utils_8h_acd2eabcda2cfc7902077f1f9a9e318dea0d28cba0bd4f26e16d766000d27e49fa}} GOD&\\ \hline \end{DoxyEnumFields} Definition at line \mbox{\hyperlink{utils_8h_source_l00045}{45}} of file \mbox{\hyperlink{utils_8h_source}{utils.\+h}}. \doxysubsection{Function Documentation} \mbox{\Hypertarget{utils_8h_a984f84273044b866085f08117f942b8f}\label{utils_8h_a984f84273044b866085f08117f942b8f}} \index{utils.h@{utils.h}!applyTransformation@{applyTransformation}} \index{applyTransformation@{applyTransformation}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{applyTransformation()}{applyTransformation()}} {\footnotesize\ttfamily void apply\+Transformation (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} \&}]{pos, }\item[{unsigned}]{size\+From, }\item[{unsigned}]{size\+To }\end{DoxyParamCaption})} change the size of a Position object \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in,out}} & {\em pos} & \+: Position object \\ \hline \mbox{\texttt{ in}} & {\em size\+From} & current size of the objet \\ \hline \mbox{\texttt{ in}} & {\em size\+To} & \+: new size of the object \\ \hline \end{DoxyParams} Definition at line \mbox{\hyperlink{utils_8cpp_source_l00008}{8}} of file \mbox{\hyperlink{utils_8cpp_source}{utils.\+cpp}}. \mbox{\Hypertarget{utils_8h_a8d01e61a45fe7072e45f22044013e358}\label{utils_8h_a8d01e61a45fe7072e45f22044013e358}} \index{utils.h@{utils.h}!areLinesColliding@{areLinesColliding}} \index{areLinesColliding@{areLinesColliding}!utils.h@{utils.h}} \doxysubsubsection{\texorpdfstring{areLinesColliding()}{areLinesColliding()}} {\footnotesize\ttfamily bool are\+Lines\+Colliding (\begin{DoxyParamCaption}\item[{unsigned}]{start1, }\item[{unsigned}]{end1, }\item[{unsigned}]{start2, }\item[{unsigned}]{end2 }\end{DoxyParamCaption})} tells if 2 lines are colliding in a 1 dimentionnal space \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em start1} & \+: position of the first point of the first line \\ \hline \mbox{\texttt{ in}} & {\em end1} & posision of the last point of the first line \\ \hline \mbox{\texttt{ in}} & {\em start2} & \+: position of the first point of the seconde line \\ \hline \mbox{\texttt{ in}} & {\em end2} & posision of the last point of the second line \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} true if they are olliding, false elsewise \end{DoxyReturn} Definition at line \mbox{\hyperlink{utils_8cpp_source_l00003}{3}} of file \mbox{\hyperlink{utils_8cpp_source}{utils.\+cpp}}.