<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.7" xml:lang="en-US">
  <compounddef id="d6/d0c/Engine_8cpp" kind="file" language="C++">
    <compoundname>Engine.cpp</compoundname>
    <includes refid="d3/d48/Engine_8hpp" local="yes">Engine.hpp</includes>
    <includes refid="da/da5/Sprite_8hpp" local="yes">Sprite.hpp</includes>
    <includes refid="de/d03/TileMap_8hpp" local="yes">TileMap.hpp</includes>
    <includes refid="d0/d32/ControllerComponent_8hpp" local="yes">ControllerComponent.hpp</includes>
    <includes refid="d5/d69/IPhysicsComponent_8hpp" local="yes">IPhysicsComponent.hpp</includes>
    <includes refid="d8/d16/RigidbodyComponent_8hpp" local="yes">RigidbodyComponent.hpp</includes>
    <includes refid="d2/dad/HealthComponent_8h" local="yes">HealthComponent.h</includes>
    <includes local="no">map</includes>
    <includes local="no">string</includes>
    <includes local="no">memory</includes>
    <includes local="no">iterator</includes>
    <incdepgraph>
      <node id="12">
        <label>Component.hpp</label>
        <link refid="df/d1f/Component_8hpp_source"/>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>ControllerComponent.hpp</label>
        <link refid="d0/d32/ControllerComponent_8hpp_source"/>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>Engine.hpp</label>
        <link refid="d3/d48/Engine_8hpp_source"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>GameMakerGUI.hpp</label>
        <link refid="df/d47/GameMakerGUI_8hpp_source"/>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>GameObject.hpp</label>
        <link refid="d4/db5/GameObject_8hpp_source"/>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>HealthComponent.h</label>
        <link refid="d2/dad/HealthComponent_8h_source"/>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>IGraphicsEngineRenderer.hpp</label>
        <link refid="d8/d4f/IGraphicsEngineRenderer_8hpp_source"/>
        <childnode refid="13" relation="include">
        </childnode>
      </node>
      <node id="19">
        <label>IPhysicsComponent.hpp</label>
        <link refid="d5/d69/IPhysicsComponent_8hpp_source"/>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="18">
        <label>PhysicsEngine.hpp</label>
        <link refid="d1/d20/PhysicsEngine_8hpp_source"/>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>RigidbodyComponent.hpp</label>
        <link refid="d8/d16/RigidbodyComponent_8hpp_source"/>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="25">
        <label>Sprite.hpp</label>
        <link refid="da/da5/Sprite_8hpp_source"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>TileMap.hpp</label>
        <link refid="de/d03/TileMap_8hpp_source"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="21">
        <label>TinyMath.hpp</label>
        <link refid="d9/dec/TinyMath_8hpp_source"/>
        <childnode refid="22" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>TransformComponent.hpp</label>
        <link refid="d9/da8/TransformComponent_8hpp_source"/>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>src/Engine.cpp</label>
        <link refid="d6/d0c/Engine_8cpp"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="32" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>SDL.h</label>
      </node>
      <node id="16">
        <label>algorithm</label>
      </node>
      <node id="22">
        <label>cmath</label>
      </node>
      <node id="6">
        <label>fstream</label>
      </node>
      <node id="10">
        <label>imgui.h</label>
      </node>
      <node id="14">
        <label>imgui_impl_sdl2.h</label>
      </node>
      <node id="15">
        <label>imgui_impl_sdlrenderer.h</label>
      </node>
      <node id="3">
        <label>iostream</label>
      </node>
      <node id="32">
        <label>iterator</label>
      </node>
      <node id="30">
        <label>map</label>
      </node>
      <node id="31">
        <label>memory</label>
      </node>
      <node id="23">
        <label>ostream</label>
      </node>
      <node id="5">
        <label>sstream</label>
      </node>
      <node id="7">
        <label>stdlib.h</label>
      </node>
      <node id="4">
        <label>string</label>
      </node>
      <node id="8">
        <label>time.h</label>
      </node>
      <node id="9">
        <label>vector</label>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="d6/d0c/Engine_8cpp_1accb4f6569575dcefe80738d28e0d35a0" prot="public" static="no">
        <name>CHARACTERS</name>
        <initializer>1</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/Engine.cpp" line="16" column="9" bodyfile="src/Engine.cpp" bodystart="16" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="d6/d0c/Engine_8cpp_1add76ec7eb0c8e9352e6cb94bfbd03f69" prot="public" static="no" mutable="no">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D cellSize</definition>
        <argsstring></argsstring>
        <name>cellSize</name>
        <initializer>= <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(64, 64)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="src/Engine.cpp" line="18" column="7" bodyfile="src/Engine.cpp" bodystart="18" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;Engine.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;Sprite.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;TileMap.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;ControllerComponent.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;IPhysicsComponent.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;RigidbodyComponent.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;ControllerComponent.hpp&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;HealthComponent.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="comment">//<sp/>I<sp/>recommend<sp/>a<sp/>map<sp/>for<sp/>filling<sp/>in<sp/>the<sp/>resource<sp/>manager</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;map&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;string&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;memory&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;iterator&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Try<sp/>toggling<sp/>this<sp/>number!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CHARACTERS<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>cellSize<sp/>=<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(64,<sp/>64);</highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Global<sp/>array<sp/>to<sp/>create<sp/>our<sp/>characters</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight><highlight class="comment">//<sp/>SpriteComponent<sp/>characterSpriteComponent[CHARACTERS];</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Initialization<sp/>function</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Returns<sp/>a<sp/>true<sp/>or<sp/>false<sp/>value<sp/>based<sp/>on<sp/>successful<sp/>completion<sp/>of<sp/>setup.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Takes<sp/>in<sp/>dimensions<sp/>of<sp/>window.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26" refid="d1/db6/classEngine_1a8c98683b0a3aa28d8ab72a8bcd0d52f2" refkind="member"><highlight class="normal"><ref refid="d1/db6/classEngine_1a8c98683b0a3aa28d8ab72a8bcd0d52f2" kindref="member">Engine::Engine</ref>()</highlight></codeline>
<codeline lineno="27"><highlight class="normal">{</highlight></codeline>
<codeline lineno="28"><highlight class="normal">}</highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Proper<sp/>shutdown<sp/>and<sp/>destroy<sp/>initialized<sp/>objects</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31" refid="d1/db6/classEngine_1a8ef7030a089ecb30bbfcb9e43094717a" refkind="member"><highlight class="normal"><ref refid="d1/db6/classEngine_1a8ef7030a089ecb30bbfcb9e43094717a" kindref="member">Engine::~Engine</ref>()</highlight></codeline>
<codeline lineno="32"><highlight class="normal">{</highlight></codeline>
<codeline lineno="33"><highlight class="normal">}</highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Return<sp/>Input</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36" refid="d1/db6/classEngine_1a8420fafe78a3742a451fac2fcedef50c" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1a8420fafe78a3742a451fac2fcedef50c" kindref="member">Engine::Input</ref>(</highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>*quit,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>*runnin)</highlight></codeline>
<codeline lineno="37"><highlight class="normal">{</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Event<sp/>handler<sp/>that<sp/>handles<sp/>various<sp/>events<sp/>in<sp/>SDL</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>that<sp/>are<sp/>related<sp/>to<sp/>input<sp/>and<sp/>output</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_Event<sp/>e;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Enable<sp/>text<sp/>input</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_StartTextInput();</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Handle<sp/>events<sp/>on<sp/>queue</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(SDL_PollEvent(&amp;e)<sp/>!=<sp/>0)</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a9e8b2e9834b4ea54e780e00333ef749e" kindref="member">mGUI</ref>-&gt;<ref refid="d5/d3b/classGameMakerGUI_1ae5d7cd973b4ae98b6bb53a780eb5065a" kindref="member">Input</ref>(e);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>User<sp/>posts<sp/>an<sp/>event<sp/>to<sp/>quit</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>An<sp/>example<sp/>is<sp/>hitting<sp/>the<sp/>&quot;x&quot;<sp/>in<sp/>the<sp/>corner<sp/>of<sp/>the<sp/>window.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(e.type<sp/>==<sp/>SDL_QUIT)</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*quit<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="55"><highlight class="normal">}</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Update<sp/>SDL</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58" refid="d1/db6/classEngine_1ac84eefe06226f430a2448306e6fd2579" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1ac84eefe06226f430a2448306e6fd2579" kindref="member">Engine::Update</ref>()</highlight></codeline>
<codeline lineno="59"><highlight class="normal">{</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>frame<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Increment<sp/>the<sp/>frame<sp/>that</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>the<sp/>sprite<sp/>is<sp/>playing</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/>frame<sp/>+=<sp/>0.25f;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_Event<sp/>e;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_PollEvent(&amp;e);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Vector<sp/>storing<sp/>messages<sp/>from<sp/>components<sp/>meant<sp/>to<sp/>be<sp/>broadcast<sp/>to<sp/>all<sp/>other<sp/>objects</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/>std::vector&lt;std::string&gt;<sp/>broadcastList;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>iterate<sp/>through<sp/>each<sp/>of<sp/>our<sp/>characters</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>for<sp/>(int<sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>CHARACTERS;<sp/>i++)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>characterSpriteComponent[i].Update(e,<sp/>frame);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>.size();<sp/>i++)</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>[i]-&gt;Update(e,<sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)frame,<sp/>broadcastList);</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a4ec8c2b90b6421647f6da9c30ecc2bca" kindref="member">mPhysics</ref>-&gt;<ref refid="db/df5/classPhysicsEngine_1a30d283b6067980e42765340dea6eb62a" kindref="member">Update</ref>();</highlight></codeline>
<codeline lineno="83"><highlight class="normal">}</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Render</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight><highlight class="comment">//<sp/>The<sp/>render<sp/>function<sp/>gets<sp/>called<sp/>once<sp/>per<sp/>loop</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="87" refid="d1/db6/classEngine_1acde70aed0043e2e2091d0bb6cce8e3c1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1acde70aed0043e2e2091d0bb6cce8e3c1" kindref="member">Engine::Render</ref>()</highlight></codeline>
<codeline lineno="88"><highlight class="normal">{</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Set<sp/>the<sp/>color<sp/>of<sp/>the<sp/>empty<sp/>framebuffer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>-&gt;<ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1a91b29bf19986c6ad8710238778312277" kindref="member">SetRenderDrawColor</ref>(110,<sp/>130,<sp/>170,<sp/>0xFF);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Clear<sp/>the<sp/>screen<sp/>to<sp/>the<sp/>color<sp/>of<sp/>the<sp/>empty<sp/>framebuffer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>-&gt;<ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1ae6edfc67a39076c0c12101ad85be4f6a" kindref="member">RenderClear</ref>();</highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>NOTE:<sp/>We<sp/>have<sp/>to<sp/>dynamic_cast<sp/>here,<sp/>because<sp/>we<sp/>do<sp/>not<sp/>exactly<sp/>know<sp/>the<sp/>type</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>of<sp/>the<sp/>renderer<sp/>that<sp/>is<sp/>going<sp/>to<sp/>&apos;render&apos;<sp/>our<sp/>character.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>Polymorphism<sp/>is<sp/>being<sp/>used<sp/>for<sp/>our<sp/>renderer,<sp/>and<sp/>we<sp/>need<sp/>to<sp/>thus</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>determine<sp/>using<sp/>dynamic_cast<sp/>if<sp/>we<sp/>can<sp/>make<sp/>a<sp/>successful<sp/>cast<sp/>to<sp/>find</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>a<sp/>matching<sp/>member<sp/>function<sp/>that<sp/>can<sp/>retrieve<sp/>a<sp/>&apos;renderer&apos;<sp/>suitable.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>NOTE:<sp/>The<sp/>very<sp/>fact<sp/>that<sp/>I<sp/>am<sp/>storing<sp/>an<sp/>SDL_Renderer*<sp/>below<sp/>completely</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>defeats<sp/>the<sp/>purpose<sp/>of<sp/>using<sp/>the<sp/>dynamic_cast.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>The<sp/>whole<sp/>point<sp/>of<sp/>the<sp/>dynamic_cast<sp/>is<sp/>so<sp/>that<sp/>at<sp/>run-time<sp/>we<sp/>can<sp/>retrieve<sp/>a</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>renderer<sp/>to<sp/>draw<sp/>our<sp/>characters.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>That<sp/>said,<sp/>it&apos;s<sp/>just<sp/>more<sp/>readable<sp/>for<sp/>you<sp/>to<sp/>see<sp/>the<sp/>dynamic<sp/>cast<sp/>here.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>NOTE:<sp/>If<sp/>dynamic_cast<sp/>fails,<sp/>you<sp/>can<sp/>check<sp/>at<sp/>run-time<sp/>and<sp/>handle<sp/>through<sp/>either<sp/>an</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>assertion<sp/>or<sp/>exception<sp/>the<sp/>behavior.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_Renderer<sp/>*renderer<sp/>=<sp/></highlight><highlight class="keyword">dynamic_cast&lt;</highlight><highlight class="normal"><ref refid="d1/d7f/classSDLGraphicsEngineRenderer" kindref="compound">SDLGraphicsEngineRenderer</ref><sp/>*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(<ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>)-&gt;GetRenderer();</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Render<sp/>each<sp/>of<sp/>the<sp/>character(s)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>for<sp/>(int<sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>CHARACTERS;<sp/>i++)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/>characterSpriteComponent[i].Render(renderer);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>}</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/>characterSpriteComponent-&gt;Render(renderer);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Render<sp/>the<sp/>tile<sp/>map</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>myTileMapComponent-&gt;Render(renderer);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>.size();<sp/>i++)</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>[i]-&gt;Render(renderer);</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a9e8b2e9834b4ea54e780e00333ef749e" kindref="member">mGUI</ref>-&gt;<ref refid="d5/d3b/classGameMakerGUI_1a2cc6da97c0f4b45175ddc9683308866e" kindref="member">RenderEditor</ref>(<ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>,<sp/>&amp;<ref refid="d1/db6/classEngine_1a03d6c0fcad1696c5b232c862cb1dafb1" kindref="member">runGame</ref>);</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Flip<sp/>the<sp/>buffer<sp/>to<sp/>render</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>-&gt;<ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1acddd7c456e4311d71fc1d43f29343d81" kindref="member">RenderPresent</ref>();</highlight></codeline>
<codeline lineno="124"><highlight class="normal">}</highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Loops<sp/>forever!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="127" refid="d1/db6/classEngine_1a9ec9d3d7dc0f9e79032dd83801778eaf" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1a9ec9d3d7dc0f9e79032dd83801778eaf" kindref="member">Engine::MainGameLoop</ref>()</highlight></codeline>
<codeline lineno="128"><highlight class="normal">{</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Wait<sp/>until<sp/>we<sp/>start<sp/>playing<sp/>the<sp/>game<sp/>to<sp/>load<sp/>up<sp/>all<sp/>the<sp/>objects<sp/>into<sp/>the<sp/>physics<sp/>engine</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a2e3d93df96db6361330d3a41f7b5892b" kindref="member">InitializePhysicsSubsystem</ref>();</highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Main<sp/>loop<sp/>flag</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>If<sp/>this<sp/>is<sp/>quit<sp/>=<sp/>&apos;true&apos;<sp/>then<sp/>the<sp/>program<sp/>terminates.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>quit<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>While<sp/>application<sp/>is<sp/>running</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(!quit)</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Uint32<sp/>startTicks<sp/>=<sp/>SDL_GetTicks();</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Get<sp/>user<sp/>input</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a8420fafe78a3742a451fac2fcedef50c" kindref="member">Input</ref>(&amp;quit,<sp/>&amp;<ref refid="d1/db6/classEngine_1a03d6c0fcad1696c5b232c862cb1dafb1" kindref="member">runGame</ref>);</highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="d1/db6/classEngine_1a03d6c0fcad1696c5b232c862cb1dafb1" kindref="member">runGame</ref>)</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a2e3d93df96db6361330d3a41f7b5892b" kindref="member">InitializePhysicsSubsystem</ref>();</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1ac84eefe06226f430a2448306e6fd2579" kindref="member">Update</ref>();</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1acde70aed0043e2e2091d0bb6cce8e3c1" kindref="member">Render</ref>();</highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Uint32<sp/>endTicks<sp/>=<sp/>SDL_GetTicks();</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>frameTime<sp/>=<sp/>(endTicks<sp/>-<sp/>startTicks)<sp/>/<sp/>1000.0f;</highlight></codeline>
<codeline lineno="153"><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>SDL_Delay(floor(16.666f<sp/>-<sp/>frameTime));</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>endTicks<sp/>=<sp/>SDL_GetTicks();</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>frameTime<sp/>=<sp/>(endTicks<sp/>-<sp/>startTicks)<sp/>/<sp/>1000.0f;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Disable<sp/>text<sp/>input</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_StopTextInput();</highlight></codeline>
<codeline lineno="160"><highlight class="normal">}</highlight></codeline>
<codeline lineno="161"><highlight class="normal"></highlight></codeline>
<codeline lineno="162" refid="d1/db6/classEngine_1a1fbe9f5cb4abc3572e432cae1f154817" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1a1fbe9f5cb4abc3572e432cae1f154817" kindref="member">Engine::Start</ref>()</highlight></codeline>
<codeline lineno="163"><highlight class="normal">{</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Report<sp/>which<sp/>subsystems<sp/>are<sp/>being<sp/>initialized</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref><sp/>!=<sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Initializing<sp/>Graphics<sp/>Subsystem\n&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;No<sp/>Graphics<sp/>Subsystem<sp/>initialized\n&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref><sp/>*player<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref>(</highlight><highlight class="stringliteral">&quot;Player&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref><sp/>*playerLocation<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(0,<sp/>0);</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d6/d77/classSpriteComponent" kindref="compound">SpriteComponent</ref><sp/>*playerSprite<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d6/d77/classSpriteComponent" kindref="compound">SpriteComponent</ref>(playerLocation);</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref><sp/>*playerRigidBody<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d87/classRigidbodyComponent" kindref="compound">RigidbodyComponent</ref>(playerLocation,<sp/>cellSize,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(0,<sp/>0),<sp/>1,<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/ddc/classControllerComponent" kindref="compound">ControllerComponent</ref><sp/>*playerController<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d1/ddc/classControllerComponent" kindref="compound">ControllerComponent</ref>(playerLocation,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(10,<sp/>10));</highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/>playerSprite-&gt;<ref refid="d6/d77/classSpriteComponent_1a70bc3139c9721612b1cdb3e514d4dd46" kindref="member">LoadImage</ref>(</highlight><highlight class="stringliteral">&quot;./images/Froggo-SheetV2.bmp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">dynamic_cast&lt;</highlight><highlight class="normal"><ref refid="d1/d7f/classSDLGraphicsEngineRenderer" kindref="compound">SDLGraphicsEngineRenderer</ref><sp/>*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(<ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>)-&gt;GetRenderer(),<sp/>32,<sp/>32,<sp/>14,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(128,<sp/>128));</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/>player-&gt;<ref refid="de/d1c/classGameObject_1a0d33d826d709a1e4496e568193fb9c57" kindref="member">AddComponent</ref>(playerLocation);</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/>player-&gt;<ref refid="de/d1c/classGameObject_1a0d33d826d709a1e4496e568193fb9c57" kindref="member">AddComponent</ref>(playerSprite);</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/>player-&gt;<ref refid="de/d1c/classGameObject_1a0d33d826d709a1e4496e568193fb9c57" kindref="member">AddComponent</ref>(playerRigidBody);</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/>player-&gt;<ref refid="de/d1c/classGameObject_1a0d33d826d709a1e4496e568193fb9c57" kindref="member">AddComponent</ref>(playerController);</highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>our<sp/>TileMapComponent</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>This<sp/>tile<sp/>map<sp/>is<sp/>20x11<sp/>in<sp/>our<sp/>game</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>It<sp/>is<sp/>using<sp/>a<sp/>&apos;reference&apos;<sp/>tilemap<sp/>with<sp/>8x8<sp/>tiles</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>that<sp/>are<sp/>each<sp/>64x64<sp/>pixels.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d56/classTileMapComponent" kindref="compound">TileMapComponent</ref><sp/>*myTileMapComponent<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d9/d56/classTileMapComponent" kindref="compound">TileMapComponent</ref>(</highlight><highlight class="stringliteral">&quot;./images/TileMapFrog.bmp&quot;</highlight><highlight class="normal">,<sp/>5,<sp/>5,<sp/>64,<sp/>64,<sp/>20,<sp/>12,<sp/></highlight><highlight class="keyword">dynamic_cast&lt;</highlight><highlight class="normal"><ref refid="d1/d7f/classSDLGraphicsEngineRenderer" kindref="compound">SDLGraphicsEngineRenderer</ref><sp/>*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(<ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>)-&gt;GetRenderer());</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Generate<sp/>a<sp/>a<sp/>simple<sp/>tilemap</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/>myTileMapComponent-&gt;<ref refid="d9/d56/classTileMapComponent_1abda1e3f6a76380b3628e69f33ad730bc" kindref="member">GenerateSimpleMap</ref>();</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Print<sp/>out<sp/>the<sp/>map<sp/>to<sp/>the<sp/>console</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>so<sp/>we<sp/>can<sp/>see<sp/>what<sp/>was<sp/>created.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/>myTileMapComponent-&gt;<ref refid="d9/d56/classTileMapComponent_1ad74bd890fb494d89958b4bc67686bdc6" kindref="member">PrintMap</ref>();</highlight></codeline>
<codeline lineno="197"><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref><sp/>*tileMap<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref>(</highlight><highlight class="stringliteral">&quot;TileMap&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/>tileMap-&gt;<ref refid="de/d1c/classGameObject_1a0d33d826d709a1e4496e568193fb9c57" kindref="member">AddComponent</ref>(myTileMapComponent);</highlight></codeline>
<codeline lineno="200"><highlight class="normal"></highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>.push_back(player);</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>.push_back(<ref refid="d1/db6/classEngine_1a0a1b174ad072878adc6dff75d40b8dd9" kindref="member">createFly</ref>(<ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(300,<sp/>20)));</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>.push_back(tileMap);</highlight></codeline>
<codeline lineno="204"><highlight class="normal">}</highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight></codeline>
<codeline lineno="206" refid="d1/db6/classEngine_1a0a1b174ad072878adc6dff75d40b8dd9" refkind="member"><highlight class="normal"><ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref><sp/>*<ref refid="d1/db6/classEngine_1a0a1b174ad072878adc6dff75d40b8dd9" kindref="member">Engine::createFly</ref>(<ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>spawnPos)</highlight></codeline>
<codeline lineno="207"><highlight class="normal">{</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref><sp/>*fly<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref>(</highlight><highlight class="stringliteral">&quot;Fly<sp/>#<sp/>&quot;</highlight><highlight class="normal"><sp/>+<sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>.size());</highlight></codeline>
<codeline lineno="209"><highlight class="normal"></highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref><sp/>*flyLocation<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d2/d0a/classTransformComponent" kindref="compound">TransformComponent</ref>(spawnPos.x,<sp/>spawnPos.y);</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d6/d77/classSpriteComponent" kindref="compound">SpriteComponent</ref><sp/>*flySprite<sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d6/d77/classSpriteComponent" kindref="compound">SpriteComponent</ref>(flyLocation);</highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/>flySprite-&gt;<ref refid="d6/d77/classSpriteComponent_1a70bc3139c9721612b1cdb3e514d4dd46" kindref="member">LoadImage</ref>(</highlight><highlight class="stringliteral">&quot;./images/Fly-Sheet.bmp&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">dynamic_cast&lt;</highlight><highlight class="normal"><ref refid="d1/d7f/classSDLGraphicsEngineRenderer" kindref="compound">SDLGraphicsEngineRenderer</ref><sp/>*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(<ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>)-&gt;GetRenderer(),<sp/>32,<sp/>32,<sp/>12,<sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(64,<sp/>64));</highlight></codeline>
<codeline lineno="214"><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/>fly-&gt;<ref refid="de/d1c/classGameObject_1a0d33d826d709a1e4496e568193fb9c57" kindref="member">AddComponent</ref>(flyLocation);</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/>fly-&gt;<ref refid="de/d1c/classGameObject_1a0d33d826d709a1e4496e568193fb9c57" kindref="member">AddComponent</ref>(flySprite);</highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>fly;</highlight></codeline>
<codeline lineno="219"><highlight class="normal">}</highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight></codeline>
<codeline lineno="221" refid="d1/db6/classEngine_1a3dbd2c0a65e642baa7eaa97caa6e4e64" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1a3dbd2c0a65e642baa7eaa97caa6e4e64" kindref="member">Engine::Shutdown</ref>()</highlight></codeline>
<codeline lineno="222"><highlight class="normal">{</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Shut<sp/>down<sp/>our<sp/>Tile<sp/>Systems</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">nullptr</highlight><highlight class="normal"><sp/>!=<sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>)</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="228"><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Destroy<sp/>our<sp/>gmae<sp/>objects</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>.size();<sp/>i++)</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/>&amp;<ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>[i];</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="234"><highlight class="normal">}</highlight></codeline>
<codeline lineno="235"><highlight class="normal"></highlight></codeline>
<codeline lineno="236" refid="d1/db6/classEngine_1a7f07811f5bfae8943d5530057b1dc822" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1a7f07811f5bfae8943d5530057b1dc822" kindref="member">Engine::InitializeGraphicsSubSystem</ref>()</highlight></codeline>
<codeline lineno="237"><highlight class="normal">{</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>our<sp/>Renderer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref><sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d1/d7f/classSDLGraphicsEngineRenderer" kindref="compound">SDLGraphicsEngineRenderer</ref>(1280,<sp/>720);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">nullptr</highlight><highlight class="normal"><sp/>==<sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>)</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>exit(1);<sp/></highlight><highlight class="comment">//<sp/>Terminate<sp/>program<sp/>if<sp/>renderer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>cannot<sp/>be<sp/>created.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>(Optional)<sp/>TODO:<sp/><sp/><sp/>Could<sp/>put<sp/>an<sp/>error</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>messeage,<sp/>or<sp/>try<sp/>to</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>reinitialize<sp/>the<sp/>engine</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>with<sp/>a<sp/>different<sp/>render</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="249"><highlight class="normal">}</highlight></codeline>
<codeline lineno="250"><highlight class="normal"></highlight></codeline>
<codeline lineno="251" refid="d1/db6/classEngine_1a2e3d93df96db6361330d3a41f7b5892b" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1a2e3d93df96db6361330d3a41f7b5892b" kindref="member">Engine::InitializePhysicsSubsystem</ref>()</highlight></codeline>
<codeline lineno="252"><highlight class="normal">{</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Find<sp/>all<sp/>Physics<sp/>components<sp/>and<sp/>send<sp/>them<sp/>to<sp/>the<sp/>physics<sp/>engine</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a4ec8c2b90b6421647f6da9c30ecc2bca" kindref="member">mPhysics</ref><sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="db/df5/classPhysicsEngine" kindref="compound">PhysicsEngine</ref>();</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="de/d1c/classGameObject" kindref="compound">GameObject</ref><sp/>*g<sp/>:<sp/><ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>)</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="d8/d6b/classComponent" kindref="compound">Component</ref><sp/>*c<sp/>:<sp/>g-&gt;ListComponents())</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>NOTE:<sp/>this<sp/>will<sp/>break<sp/>if<sp/>the<sp/>Physics<sp/>tag<sp/>is<sp/>ever<sp/>applied<sp/>to<sp/>something<sp/>that<sp/>isn&apos;t<sp/>an<sp/>IPhysicsComponent</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>I&apos;ll<sp/>try<sp/>to<sp/>find<sp/>a<sp/>better<sp/>way<sp/>but<sp/>I<sp/>think<sp/>this<sp/>will<sp/>be<sp/>future<sp/>proof<sp/>as<sp/>long<sp/>as<sp/>we&apos;re<sp/>careful</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strcmp(c-&gt;ComponentTypeName(),<sp/></highlight><highlight class="stringliteral">&quot;Rigidbody<sp/>Component&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a4ec8c2b90b6421647f6da9c30ecc2bca" kindref="member">mPhysics</ref>-&gt;<ref refid="db/df5/classPhysicsEngine_1aaa69a81964d980456a6ac48816d2f756" kindref="member">AddComponent</ref>(</highlight><highlight class="keyword">dynamic_cast&lt;</highlight><highlight class="normal"><ref refid="d9/d15/classIPhysicsComponent" kindref="compound">IPhysicsComponent</ref><sp/>*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(c));</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="267"><highlight class="normal">}</highlight></codeline>
<codeline lineno="268"><highlight class="normal"></highlight></codeline>
<codeline lineno="269" refid="d1/db6/classEngine_1ab03f0933af2767764d2e05f56fa44fd7" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/db6/classEngine_1ab03f0933af2767764d2e05f56fa44fd7" kindref="member">Engine::InitializeGUI</ref>()</highlight></codeline>
<codeline lineno="270"><highlight class="normal">{</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d1/db6/classEngine_1a9e8b2e9834b4ea54e780e00333ef749e" kindref="member">mGUI</ref><sp/>=<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="d5/d3b/classGameMakerGUI" kindref="compound">GameMakerGUI</ref>(<ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>-&gt;<ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1abd24deb029577fc237b47a3cbf30c121" kindref="member">GetWindow</ref>(),<sp/><ref refid="d1/db6/classEngine_1a871acf97123e6fb628a4e16a60be1f7d" kindref="member">mRenderer</ref>-&gt;<ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1a93e5f435d003933cf3304e44c5aa7324" kindref="member">GetRenderer</ref>(),<sp/>&amp;<ref refid="d1/db6/classEngine_1ab9e9061aa9c4bc7d2d94e5693bebde21" kindref="member">m_gameobjects</ref>);</highlight></codeline>
<codeline lineno="272"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="src/Engine.cpp"/>
  </compounddef>
</doxygen>
