116 lines
11 KiB
TeX
116 lines
11 KiB
TeX
\hypertarget{game_8h_source}{}\doxysection{game.\+h}
|
|
\label{game_8h_source}\index{headers/game.h@{headers/game.h}}
|
|
\mbox{\hyperlink{game_8h}{Go to the documentation of this file.}}
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00001}00001 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00013}00013 \textcolor{preprocessor}{\#ifndef GUARD\_GAME\_H}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00014}00014 \textcolor{preprocessor}{\#define GUARD\_GAME\_H}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00015}00015 \textcolor{preprocessor}{\#include <vector>}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00016}00016 \textcolor{preprocessor}{\#include "{}mingl/mingl.h"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00017}00017 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{pixel_manager_8h}{pixelManager/pixelManager.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00018}00018 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{utils_8h}{utils.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00019}00019 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{player_def_8h}{playerDef.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00020}00020 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{player_8h}{player.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00021}00021 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{play_mode_8h}{playMode.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00022}00022 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{config_data_8h}{configData.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00023}00023 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{projectiles_8h}{projectiles.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00024}00024 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{scores_manager_8h}{scoresManager.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00025}00025 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{god_8h}{god.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00026}00026 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{invaders_grid_8h}{invadersGrid.h}}"{}}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00027}00027 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00028}00028 \textcolor{keyword}{using namespace }std;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00029}00029 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00034}\mbox{\hyperlink{class_game}{00034}} \textcolor{keyword}{class }\mbox{\hyperlink{class_game}{Game}} \{}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00035}00035 \textcolor{keyword}{private}:}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00036}00036 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00040}00040 MinGL window;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00041}00041 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00046}00046 unique\_ptr<PixelManager> pm;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00047}00047 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00051}00051 \mbox{\hyperlink{struct_config_data}{ConfigData}} confData;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00052}00052 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00056}00056 \mbox{\hyperlink{class_scores_manager}{ScoresManager}} sm;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00057}00057 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00061}00061 \mbox{\hyperlink{class_god}{God}} god;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00062}00062 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00066}00066 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} baseInvPos;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00067}00067 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00071}00071 \mbox{\hyperlink{class_invaders_grid}{InvadersGrid}} grid;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00072}00072 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00076}00076 \textcolor{keywordtype}{bool} direction;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00077}00077 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00081}00081 vector<missile> missiles;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00082}00082 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00086}00086 vector<Torpedo> torpedos;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00087}00087 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00091}00091 \mbox{\hyperlink{play_mode_8h_a188092ed559d356ade9a517d60ec3f34}{PlayMode}} playMode;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00092}00092 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00096}00096 vector<Player> players;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00097}00097 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00098}00098 \textcolor{comment}{// invaders related variables}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00099}00099 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00103}00103 \textcolor{keywordtype}{unsigned} fireCooldown=0;}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00104}00104 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00105}00105 \textcolor{comment}{// basic methods}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00106}00106 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00112}00112 \textcolor{keywordtype}{bool} areThereInvadersLeft();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00113}00113 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00118}00118 \textcolor{keywordtype}{void} handleScoreSaving();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00119}00119 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00127}00127 \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} invIndexToPos(\textcolor{keywordtype}{unsigned} x, \textcolor{keywordtype}{unsigned} y) \textcolor{keyword}{const};}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00128}00128 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00134}00134 \textcolor{keywordtype}{void} displayAll(\textcolor{keywordtype}{unsigned} fps) \textcolor{keyword}{const};}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00135}00135 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00140}00140 \textcolor{keywordtype}{void} displayGod() \textcolor{keyword}{const};}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00141}00141 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00148}00148 \textcolor{keywordtype}{void} displayInvader(\textcolor{keyword}{const} \mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}}\& basePos, \mbox{\hyperlink{invaders_grid_8h_a28be5c0c3bae3518d94b2ede3633e018}{InvaderType}} type) \textcolor{keyword}{const};}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00149}00149 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00154}00154 \textcolor{keywordtype}{void} displayHearts(\mbox{\hyperlink{utils_8h_a19f2f2312637b6ed67b6d24598b6f470}{playerID}}) \textcolor{keyword}{const};}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00155}00155 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00156}00156 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00157}00157 \textcolor{comment}{// managers}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00158}00158 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00163}00163 \textcolor{keywordtype}{void} managePlayers();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00164}00164 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00170}00170 \textcolor{keywordtype}{void} manageOnePlayer(\mbox{\hyperlink{utils_8h_a19f2f2312637b6ed67b6d24598b6f470}{playerID}} pID);}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00171}00171 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00177}00177 \textcolor{keywordtype}{bool} manageInvaders();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00178}00178 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00179}00179 \textcolor{comment}{// collision things}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00180}00180 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00185}00185 \textcolor{keywordtype}{void} remCollidingProjectiles();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00186}00186 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00191}00191 \textcolor{keywordtype}{void} moveMissiles();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00192}00192 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00197}00197 \textcolor{keywordtype}{void} moveTorpedos();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00198}00198 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00203}00203 \textcolor{keywordtype}{void} checkMissilesAndPlayers();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00204}00204 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00210}00210 \textcolor{keywordtype}{bool} checkTorpedosAndInvaders();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00211}00211 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00217}00217 \textcolor{keywordtype}{bool} invadersTouchPlayer() \textcolor{keyword}{const};}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00218}00218 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00223}00223 \textcolor{keywordtype}{void} tryAwakeGod();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00224}00224 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00230}00230 \textcolor{keywordtype}{bool} manageGod();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00231}00231 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00232}00232 \textcolor{keyword}{public}:}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00233}00233 \textcolor{comment}{// in case someone wants to mess with the code, here's a minimal public API, costs nothing to us}}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00234}00234 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00239}00239 \mbox{\hyperlink{class_game_ad59df6562a58a614fda24622d3715b65}{Game}}();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00240}00240 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00245}00245 \textcolor{keywordtype}{void} \mbox{\hyperlink{class_game_a185d2ce9845c75b62064dc6d60f79eab}{managedGames}}();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00246}00246 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00251}00251 \textcolor{keywordtype}{void} \mbox{\hyperlink{class_game_ab684b380c7d3f3577e2fb80006415297}{initGame}}();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00252}00252 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00258}00258 \mbox{\hyperlink{utils_8h_acd2eabcda2cfc7902077f1f9a9e318de}{WinValue}} \mbox{\hyperlink{class_game_a74570e2b1a4930b1ab1c957b5e60320e}{enterGameLoop}}();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00259}00259 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00265}00265 \textcolor{keywordtype}{bool} \mbox{\hyperlink{class_game_ac6c18f49964d49c3c5c826ef678f0792}{reloadConfig}}();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00266}00266 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00272}00272 \textcolor{keywordtype}{bool} \mbox{\hyperlink{class_game_aef8202b79983c3b0f8d6db6c01d17fa6}{arePlayersDead}}();}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00273}00273 \};}
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00274}00274 }
|
|
\DoxyCodeLine{\Hypertarget{game_8h_source_l00275}00275 \textcolor{preprocessor}{\#endif}}
|
|
|
|
\end{DoxyCode}
|