\hypertarget{TileMap_8hpp_source}{}\doxysection{Tile\+Map.\+hpp}
\label{TileMap_8hpp_source}\index{include/TileMap.hpp@{include/TileMap.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ TILE\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ TILE\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <string>}}
\DoxyCodeLine{00005\ }
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}IGraphicsEngineRenderer.hpp"{}}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}Component.hpp"{}}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <string>}}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classTileMapComponent}{TileMapComponent}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{classComponent}{Component}}\ \{}
\DoxyCodeLine{00014\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00018\ \ \ \ \ \mbox{\hyperlink{classTileMapComponent}{TileMapComponent}}(std::string\ tileSheetFileName,\ \textcolor{keywordtype}{int}\ rows,\ \textcolor{keywordtype}{int}\ cols,\ \textcolor{keywordtype}{int}\ \_TileWidth,\ \textcolor{keywordtype}{int}\ \_TileHeight,\ \textcolor{keywordtype}{int}\ \_mapX,}
\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ \_mapY,\ SDL\_Renderer\ *ren);}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00024\ \ \ \ \ \mbox{\hyperlink{classTileMapComponent_a3d8289074c6943aee6194df04a28cd5b}{\string~TileMapComponent}}();}
\DoxyCodeLine{00025\ }
\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classTileMapComponent_abda1e3f6a76380b3628e69f33ad730bc}{GenerateSimpleMap}}();}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classTileMapComponent_ad74bd890fb494d89958b4bc67686bdc6}{PrintMap}}();}
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classTileMapComponent_aa663981f62c649650617475c2d2e03e3}{SetTile}}(\textcolor{keywordtype}{int}\ x,\ \textcolor{keywordtype}{int}\ y,\ \textcolor{keywordtype}{int}\ type);}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{classTileMapComponent_adb24ff5494a792ccefb9b2cf95bc9f28}{GetTileType}}(\textcolor{keywordtype}{int}\ x,\ \textcolor{keywordtype}{int}\ y);}
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classTileMapComponent_a767f1d52ce56bde32a2366f18e6dcd50}{Update}}(SDL\_Event\ e,\ \textcolor{keywordtype}{int}\ frame,\ std::vector<std::string>\ broadcastList)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00052\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classTileMapComponent_a76dc9312b1d3c4b0193598e55661749f}{Render}}(SDL\_Renderer\ *ren)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00054\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classTileMapComponent_a93f28aae22fc29581cd56cc710760ce5}{ShowComponentEditor}}(\textcolor{keywordtype}{bool}*\ showEditor)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ \mbox{\hyperlink{classTileMapComponent_a4883b607bd0e6aec69e1d6a95e572eac}{ComponentTypeName}}()\textcolor{keyword}{\ override\ }\{\textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}Tile\ Map\ Component"{}};\}}
\DoxyCodeLine{00057\ }
\DoxyCodeLine{00058\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00059\ \ \ \ \ \textcolor{comment}{//\ Dimensions\ of\ our\ TileMapComponent\ and\ individual\ tiles.}}
\DoxyCodeLine{00060\ \ \ \ \ \textcolor{comment}{//\ Used\ for\ spiltting\ up\ the\ sprite\ sheet}}
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keywordtype}{int}\ m\_Rows;}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keywordtype}{int}\ m\_Cols;}
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{comment}{//\ How\ big\ each\ tile\ is.}}
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keywordtype}{int}\ m\_TileWidth;}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordtype}{int}\ m\_TileHeight;}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{comment}{//\ size\ of\ our\ tilemap}}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keywordtype}{int}\ m\_MapX;}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{int}\ m\_MapY;}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{comment}{//\ Where\ our\ TileMapComponent\ is\ rendered}}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{comment}{//\ An\ SDL\ Surface\ contains\ pixel\ data\ to\ draw\ our\ TileMapComponent}}
\DoxyCodeLine{00071\ \ \ \ \ SDL\_Surface\ *m\_TileSpriteSheet;}
\DoxyCodeLine{00072\ \ \ \ \ SDL\_Texture\ *m\_Texture;}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{comment}{//\ Stores\ our\ tile\ types}}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordtype}{int}\ *m\_Tiles;}
\DoxyCodeLine{00075\ \};}
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00077\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
