SuperSpaceInvaderTurboApoca.../doc/SAE102-SpaceInvaders/latex/db/d86/display_8cpp_source.tex
Thomas R 8849d1b66c
hey
2022-01-13 10:23:26 +01:00

167 lines
24 KiB
TeX

\hypertarget{display_8cpp_source}{}\doxysection{display.\+cpp}
\label{display_8cpp_source}\index{src/game/display.cpp@{src/game/display.cpp}}
\mbox{\hyperlink{display_8cpp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00001}00001 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00012}00012 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{game_8h}{game.h}}"{}}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00013}00013 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00014}00014 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00018}00018 \textcolor{keywordtype}{void} Game::displayAll(\textcolor{keywordtype}{unsigned} fps)\textcolor{keyword}{ const }\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00019}00019 pm-\/>drawSprite(pm-\/>gameBackground, \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(0, 0));}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00020}00020 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{unsigned} i = 0; i < this-\/>grid.size(); ++i)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00021}00021 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{unsigned} j = 0; j < this-\/>grid[i].size(); ++j)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00022}00022 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} vec(}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00023}00023 baseInvPos.getX() + i * confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}} + i * confData.\mbox{\hyperlink{struct_config_data_aadc245edaf3b28d82f9ce7b17c655943}{invadersDistance}},}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00024}00024 baseInvPos.getY() + j * confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}} + j * confData.\mbox{\hyperlink{struct_config_data_aadc245edaf3b28d82f9ce7b17c655943}{invadersDistance}}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00025}00025 );}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00026}00026 displayInvader(vec, grid[i][j]);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00027}00027 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00028}00028 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00030}00030 \textcolor{keywordflow}{for}(\textcolor{keyword}{const} \mbox{\hyperlink{projectiles_8h_a70d09d41f7da1bfd52c58011c59b9d7e}{missile}}\& miss : missiles)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00031}00031 pm-\/>drawMissile(miss, confData.\mbox{\hyperlink{struct_config_data_a4f8e7615d2619a3b37e97465ac143fee}{missilesWidth}}, confData.\mbox{\hyperlink{struct_config_data_abb41165730c7e25dffe63d2fb08022f4}{missilesColor}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00032}00032 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00033}00033 \textcolor{keywordflow}{for}(\textcolor{keyword}{const} \mbox{\hyperlink{class_torpedo}{Torpedo}}\& tor : torpedos)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00034}00034 pm-\/>drawTorpedo(tor, confData.\mbox{\hyperlink{struct_config_data_aec2b163d49271a1a1654c903de9e45ff}{torpedosWidth}}, confData.\mbox{\hyperlink{struct_config_data_a7edb4693b5fb5036b09b95d314d29495}{torpedosColor}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00035}00035 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00036}00036 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00038}00038 displayGod();}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00040}00040 \mbox{\hyperlink{utils_8h_ac9476fcfc18faf6d47d13b9774eea2a4}{DEBUG\_INSTR}}(}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00041}00041 pm-\/>drawText(\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(pm-\/>getScreenWidth()-\/200, 20), \textcolor{stringliteral}{"{}FPS : "{}}+to\_string(fps), nsGraphics::KWhite, Font::BITMAP\_8\_BY\_13);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00042}00042 )}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00044}00044 \textcolor{keywordtype}{unsigned} margin = 0;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00045}00045 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{unsigned} i=0;i<players.size();++i)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00046}00046 pm-\/>drawText(\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(0,10+margin),\textcolor{stringliteral}{"{}player "{}}+to\_string(i+1)+\textcolor{stringliteral}{"{} :"{}},nsGraphics::KWhite,Font::BITMAP\_8\_BY\_13);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00047}00047 pm-\/>drawText(\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(100,10+margin),to\_string(players[i].score) ,nsGraphics::KWhite,Font::BITMAP\_8\_BY\_13);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00048}00048 margin +=15;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00050}00050 \textcolor{keywordflow}{if}(!players[i].isEliminated())\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00051}00051 \textcolor{keywordflow}{if}(players[i].deathAnimCounter\%2==0)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00052}00052 pm-\/>drawPlayer(i, players[i].x, confData.\mbox{\hyperlink{struct_config_data_ad8c5d2876699ea9e451e6b3a15618707}{playersWidth}}, confData.\mbox{\hyperlink{struct_config_data_a909ad90d692e87b2c93c3966d07ecc16}{playerDefs}}[i].color);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00053}00053 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00054}00054 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00055}00055 \textcolor{comment}{// out of the condition, because we still need to display the falling heart}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00056}00056 displayHearts(i);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00057}00057 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00058}00058 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00060}00060 \textcolor{keywordtype}{void} Game::displayHearts(\mbox{\hyperlink{utils_8h_a19f2f2312637b6ed67b6d24598b6f470}{playerID}} pID)\textcolor{keyword}{ const }\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00062}00062 \textcolor{comment}{// As said before, the player loop is an illusion, 2 players max}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00063}00063 \textcolor{keywordtype}{unsigned} x;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00064}00064 \textcolor{keywordflow}{if}(pID==\mbox{\hyperlink{utils_8h_aff32b2add5186520b5ae86864ebaf51a}{PLAYER1}})x = 0;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00065}00065 \textcolor{keywordflow}{else} x = pm-\/>getScreenWidth()-\/\mbox{\hyperlink{pixel_manager_8h_adb86102dc8f7eb1fdae1c185fd6f07f6}{HEART\_LENGTH}};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00067}00067 \textcolor{keywordtype}{unsigned} y = \mbox{\hyperlink{god_8h_a321d9614200c924cf991c5b08808be80}{GOD\_BENCH\_SIZE}}+5;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00068}00068 \textcolor{keywordflow}{for}(\textcolor{keywordtype}{unsigned} i=0;i<players[pID].lives;++i)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00069}00069 pm-\/>drawHeart(\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(x, y));}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00070}00070 y+=\mbox{\hyperlink{pixel_manager_8h_adb86102dc8f7eb1fdae1c185fd6f07f6}{HEART\_LENGTH}}+5;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00071}00071 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00072}00072 \textcolor{keywordflow}{if}(players[pID].hasDeathAnimation())\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00073}00073 pm-\/>drawHeart(\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(x, y+players[pID].deathAnimCounter*5));}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00074}00074 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00075}00075 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00077}00077 \textcolor{keywordtype}{void} Game::displayInvader(\textcolor{keyword}{const} \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}\& pos, \mbox{\hyperlink{invaders_grid_8h_a28be5c0c3bae3518d94b2ede3633e018}{InvaderType}} type)\textcolor{keyword}{ const }\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00078}00078 \textcolor{keywordflow}{if}(type==\mbox{\hyperlink{invaders_grid_8h_a28be5c0c3bae3518d94b2ede3633e018ab50339a10e1de285ac99d4c3990b8693}{InvaderType::NONE}})\textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00079}00079 \textcolor{keyword}{const} \mbox{\hyperlink{struct_invader_type_def}{InvaderTypeDef}}\& invDef = confData.\mbox{\hyperlink{struct_config_data_af0c88560ab28fe51ef1743219633cfdc}{invadersDef}}.at(type);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00080}00080 \textcolor{keywordflow}{switch}(type)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00081}00081 \textcolor{keywordflow}{case} \mbox{\hyperlink{invaders_grid_8h_a28be5c0c3bae3518d94b2ede3633e018af9cc5a6eeda802023cbbfb4809d4ae0c}{InvaderType::TYPEA}}:\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00082}00082 pm-\/>drawInvaderA(pos, confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}}, invDef.\mbox{\hyperlink{struct_invader_type_def_ad690c29255570978ede9da7c1c31ba8d}{color}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00083}00083 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00084}00084 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00085}00085 \textcolor{keywordflow}{case} \mbox{\hyperlink{invaders_grid_8h_a28be5c0c3bae3518d94b2ede3633e018a3d00348b8aeb5f4f889899e4100bd753}{InvaderType::TYPEB}}:\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00086}00086 pm-\/>drawInvaderB(pos, confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}}, invDef.\mbox{\hyperlink{struct_invader_type_def_ad690c29255570978ede9da7c1c31ba8d}{color}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00087}00087 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00088}00088 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00089}00089 \textcolor{keywordflow}{case} \mbox{\hyperlink{invaders_grid_8h_a28be5c0c3bae3518d94b2ede3633e018a9c813ba69982157b4552ff797f00c3b7}{InvaderType::TYPEC}}:\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00090}00090 pm-\/>drawInvaderC(pos, confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}}, invDef.\mbox{\hyperlink{struct_invader_type_def_ad690c29255570978ede9da7c1c31ba8d}{color}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00091}00091 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00092}00092 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00093}00093 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00094}00094 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00096}\mbox{\hyperlink{display_8cpp_a72e79615fef9e4505aad10d5b4fb4b5e}{00096}} \textcolor{keywordtype}{void} \mbox{\hyperlink{display_8cpp_a72e79615fef9e4505aad10d5b4fb4b5e}{applyBezierCurbe}}(\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}\& pos, \textcolor{keyword}{const} \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}\& point, \textcolor{keyword}{const} \textcolor{keywordtype}{double} percent) \{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00097}00097 pos += (point-\/pos)*percent;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00098}00098 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00100}00100 \textcolor{keywordtype}{void} Game::displayGod()\textcolor{keyword}{ const }\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00101}00101 \textcolor{keywordflow}{switch} (god.\mbox{\hyperlink{class_god_aa509fa274d956215aa439de1c8e2e290}{state}}) \{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00102}00102 \textcolor{keywordflow}{case} \mbox{\hyperlink{god_8h_af1459ba6e17d6a2aef2bf5f4f56f6355ab50339a10e1de285ac99d4c3990b8693}{GodState::NONE}}:}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00103}00103 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00104}00104 \textcolor{keywordflow}{case} \mbox{\hyperlink{god_8h_af1459ba6e17d6a2aef2bf5f4f56f6355afca549f3541c801906abc34b45e8953e}{GodState::AWAKE}}: \{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00105}00105 pm-\/>drawGodBench(god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}} -\/ \mbox{\hyperlink{god_8h_a321d9614200c924cf991c5b08808be80}{GOD\_BENCH\_SIZE}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00107}00107 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} leftHand(\mbox{\hyperlink{god_8h_a0b3ad1c15e80936f3ee35f4ff91f243c}{GOD\_HAND\_DISTANCE}}, god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}}-\/\mbox{\hyperlink{god_8h_a321d9614200c924cf991c5b08808be80}{GOD\_BENCH\_SIZE}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00108}00108 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} rightHand(pm-\/>getScreenWidth()-\/\mbox{\hyperlink{god_8h_a0b3ad1c15e80936f3ee35f4ff91f243c}{GOD\_HAND\_DISTANCE}}-\/\mbox{\hyperlink{god_8h_a59e44f12d6c2f40c10bb249db0a3b3d6}{GOD\_HAND\_SIZE}}, god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}}-\/\mbox{\hyperlink{god_8h_a321d9614200c924cf991c5b08808be80}{GOD\_BENCH\_SIZE}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00109}00109 pm-\/>drawSprite(pm-\/>leftHand, leftHand);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00110}00110 pm-\/>drawSprite(pm-\/>rightHand, rightHand);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00111}00111 pm-\/>drawGodFace(god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}} -\/ \mbox{\hyperlink{god_8h_a321d9614200c924cf991c5b08808be80}{GOD\_BENCH\_SIZE}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00112}00112 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00113}00113 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00114}00114 \textcolor{keywordflow}{case} \mbox{\hyperlink{god_8h_af1459ba6e17d6a2aef2bf5f4f56f6355ad5cc6a0064b5c25ba37826aa3fda910c}{GodState::WAIT}}:\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00115}00115 pm-\/>drawGodBench(0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00116}00116 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} leftHand(\mbox{\hyperlink{god_8h_a0b3ad1c15e80936f3ee35f4ff91f243c}{GOD\_HAND\_DISTANCE}}, 0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00117}00117 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} rightHand(god.\mbox{\hyperlink{class_god_a64e48ec11bf4039c9204ead815809ec1}{getRightHandPos}}(pm-\/>getScreenWidth()));}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00118}00118 pm-\/>drawSprite(pm-\/>leftHand, leftHand);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00119}00119 pm-\/>drawSprite(pm-\/>rightHand, rightHand);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00120}00120 pm-\/>drawGodFace(0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00121}00121 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00122}00122 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00123}00123 \textcolor{keywordflow}{case} \mbox{\hyperlink{god_8h_af1459ba6e17d6a2aef2bf5f4f56f6355a478d22fab8e360f3af57895f113f1f0f}{GodState::RETRIEVE1}}:}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00124}00124 \textcolor{keywordflow}{case} \mbox{\hyperlink{god_8h_af1459ba6e17d6a2aef2bf5f4f56f6355a047051c1710157600a077e72054333e1}{GodState::RETRIEVE2}}:\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00125}00125 \textcolor{comment}{// Bezier curve}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00126}00126 \textcolor{comment}{// counter goes [0-\/100]}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00127}00127 pm-\/>drawGodBench(0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00128}00128 pm-\/>drawSprite(pm-\/>leftHand, \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(\mbox{\hyperlink{god_8h_a0b3ad1c15e80936f3ee35f4ff91f243c}{GOD\_HAND\_DISTANCE}}, 0));}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00129}00129 pm-\/>drawGodFace(0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00131}00131 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} pos(god.\mbox{\hyperlink{class_god_a64e48ec11bf4039c9204ead815809ec1}{getRightHandPos}}(pm-\/>getScreenWidth()));}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00132}00132 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} endPos = invIndexToPos(god.\mbox{\hyperlink{class_god_ae7ed525f130083f511728c791c35a95d}{thrownInvPosX}}, god.\mbox{\hyperlink{class_god_a26fbb775dff480eaa6a19d4a3ef9731c}{thrownInvPosY}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00134}00134 \mbox{\hyperlink{display_8cpp_a72e79615fef9e4505aad10d5b4fb4b5e}{applyBezierCurbe}}(pos, god.\mbox{\hyperlink{class_god_a41b9ceec78e403a54cf8afaf6e50519a}{thrownTransition}}, god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}} / 100.0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00135}00135 \mbox{\hyperlink{display_8cpp_a72e79615fef9e4505aad10d5b4fb4b5e}{applyBezierCurve}}(pos, endPos, god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}} / 100.0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00137}00137 \textcolor{comment}{// pos is now the position we need to draw our hand to}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00138}00138 pm-\/>drawSprite(pm-\/>rightHand, pos);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00139}00139 \textcolor{keywordflow}{if}(god.\mbox{\hyperlink{class_god_ad41071cd3e9f51419411e4fd1a0c63c5}{thrownInvType}}!=\mbox{\hyperlink{invaders_grid_8h_a28be5c0c3bae3518d94b2ede3633e018ab50339a10e1de285ac99d4c3990b8693}{InvaderType::NONE}})\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00141}00141 pos+=\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(\mbox{\hyperlink{god_8h_a59e44f12d6c2f40c10bb249db0a3b3d6}{GOD\_HAND\_SIZE}}/2, \mbox{\hyperlink{god_8h_a59e44f12d6c2f40c10bb249db0a3b3d6}{GOD\_HAND\_SIZE}}/2);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00142}00142 pos-\/=\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}}/2, confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}}/2);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00143}00143 displayInvader(pos, god.\mbox{\hyperlink{class_god_ad41071cd3e9f51419411e4fd1a0c63c5}{thrownInvType}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00144}00144 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00145}00145 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00146}00146 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00147}00147 \textcolor{keywordflow}{case} \mbox{\hyperlink{god_8h_af1459ba6e17d6a2aef2bf5f4f56f6355a655474de4674aba7a436a73cd8d9a906}{GodState::THROW}}:\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00148}00148 pm-\/>drawGodBench(0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00149}00149 pm-\/>drawSprite(pm-\/>leftHand, \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}(\mbox{\hyperlink{god_8h_a0b3ad1c15e80936f3ee35f4ff91f243c}{GOD\_HAND\_DISTANCE}}, 0));}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00150}00150 pm-\/>drawGodFace(0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00151}00151 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00152}00152 \textcolor{comment}{// compute start position (not sure if we should store it or compute it each time ?)}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00153}00153 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} handPos = god.\mbox{\hyperlink{class_god_a64e48ec11bf4039c9204ead815809ec1}{getRightHandPos}}(pm-\/>getScreenWidth());}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00155}00155 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} invaderPos = handPos;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00156}00156 \mbox{\hyperlink{utils_8h_a984f84273044b866085f08117f942b8f}{applyTransformation}}(invaderPos, \mbox{\hyperlink{god_8h_a59e44f12d6c2f40c10bb249db0a3b3d6}{GOD\_HAND\_SIZE}}, confData.\mbox{\hyperlink{struct_config_data_ada929ea4a462c0bde376adf9fa3f4810}{invadersSize}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00157}00157 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} a = god.\mbox{\hyperlink{class_god_a87f1d2986cfd375910aa7908c8976451}{thrownVector}} * (god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}} / 100.0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00158}00158 invaderPos = invaderPos + a;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00160}00160 displayInvader(invaderPos, god.\mbox{\hyperlink{class_god_ad41071cd3e9f51419411e4fd1a0c63c5}{thrownInvType}});}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00161}00161 \textcolor{keywordflow}{if}(god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}}<30)\{}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00162}00162 \textcolor{comment}{// handling hand retraction}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00163}00163 \textcolor{keywordtype}{unsigned} handCounter;}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00164}00164 \textcolor{keywordflow}{if}(god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}}<15)handCounter = god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00165}00165 \textcolor{keywordflow}{else} handCounter = 30-\/god.\mbox{\hyperlink{class_god_a1000165e05f6719539b7702ab3f09a66}{counter}};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00166}00166 handPos = handPos + god.\mbox{\hyperlink{class_god_a87f1d2986cfd375910aa7908c8976451}{thrownVector}} * (handCounter / 100.0);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00167}00167 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00168}00168 pm-\/>drawSprite(pm-\/>rightHand, handPos);}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00170}00170 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00171}00171 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00172}00172 \}}
\DoxyCodeLine{\Hypertarget{display_8cpp_source_l00173}00173 \}}
\end{DoxyCode}