Skip to content

Commit

Permalink
micro optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
durkisneer1 committed Jan 10, 2024
1 parent 0d2ad5f commit d2dc680
Show file tree
Hide file tree
Showing 47 changed files with 315 additions and 706 deletions.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/reference/draw.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/entity.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/font.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/texture_cache.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/reference/tile_map.doctree
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,19 +211,19 @@ <h1 id="index">Index</h1>
<h2>K</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference/draw.html#_CPPv4N2kn4draw4rectER12RenderWindowR4RectK9SDL_Colori">kn::draw::rect (C++ function)</a>
<li><a href="reference/draw.html#_CPPv4N2kn4draw4rectER4RectK9SDL_Colori">kn::draw::rect (C++ function)</a>
</li>
<li><a href="reference/entity.html#_CPPv4N2kn6EntityE">kn::Entity (C++ class)</a>
</li>
<li><a href="reference/entity.html#_CPPv4N2kn6Entity6EntityER12RenderWindowNSt10shared_ptrI7TextureEE">kn::Entity::Entity (C++ function)</a>
<li><a href="reference/entity.html#_CPPv4N2kn6Entity6EntityENSt10shared_ptrI7TextureEE">kn::Entity::Entity (C++ function)</a>
</li>
<li><a href="reference/entity.html#_CPPv4NK2kn6Entity10getTextureEv">kn::Entity::getTexture (C++ function)</a>
</li>
<li><a href="reference/entity.html#_CPPv4I0EN2kn6Entity14moveAndCollideEvdRKNSt6vectorINSt10shared_ptrI1TEEEE">kn::Entity::moveAndCollide (C++ function)</a>
</li>
<li><a href="reference/font.html#_CPPv4N2kn4FontE">kn::Font (C++ class)</a>
</li>
<li><a href="reference/font.html#_CPPv4N2kn4Font4FontER12RenderWindowRKNSt6stringEi">kn::Font::Font (C++ function)</a>
<li><a href="reference/font.html#_CPPv4N2kn4Font4FontERKNSt6stringEi">kn::Font::Font (C++ function)</a>
</li>
<li><a href="reference/font.html#_CPPv4N2kn4Font6renderERKNSt6stringEb9SDL_Colori">kn::Font::render (C++ function)</a>
</li>
Expand Down Expand Up @@ -325,7 +325,7 @@ <h2>K</h2>
</li>
<li><a href="reference/texture_cache.html#_CPPv4N2kn12TextureCache4moveERKNSt6stringENSt10shared_ptrI7TextureEE">kn::TextureCache::move (C++ function)</a>
</li>
<li><a href="reference/texture_cache.html#_CPPv4N2kn12TextureCache12TextureCacheER12RenderWindow">kn::TextureCache::TextureCache (C++ function)</a>
<li><a href="reference/texture_cache.html#_CPPv4N2kn12TextureCache12TextureCacheEv">kn::TextureCache::TextureCache (C++ function)</a>
</li>
<li><a href="reference/texture_cache.html#_CPPv4N2kn12TextureCache6unloadERKNSt6stringE">kn::TextureCache::unload (C++ function)</a>
</li>
Expand All @@ -341,7 +341,7 @@ <h2>K</h2>
</li>
<li><a href="reference/tile_map.html#_CPPv4NK2kn7TileMap10getObjectsEv">kn::TileMap::getObjects (C++ function)</a>
</li>
<li><a href="reference/tile_map.html#_CPPv4N2kn7TileMap7TileMapER12RenderWindowR12TextureCacheRKNSt6stringE">kn::TileMap::TileMap (C++ function)</a>
<li><a href="reference/tile_map.html#_CPPv4N2kn7TileMap7TileMapER12TextureCacheRKNSt6stringE">kn::TileMap::TileMap (C++ function)</a>
</li>
<li><a href="reference/time.html#_CPPv4N2kn4time5ClockE">kn::time::Clock (C++ class)</a>
</li>
Expand Down
Binary file modified docs/build/html/objects.inv
Binary file not shown.
7 changes: 3 additions & 4 deletions docs/build/html/reference/draw.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@
<section id="draw">
<h1>draw<a class="headerlink" href="#draw" title="Link to this heading">#</a></h1>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N2kn4draw4rectER12RenderWindowR4RectK9SDL_Colori">
<span id="_CPPv3N2kn4draw4rectER12RenderWindowR4RectK9SDL_Colori"></span><span id="_CPPv2N2kn4draw4rectER12RenderWindowR4RectK9SDL_Colori"></span><span id="kn::draw::rect__RenderWindowR.RectR.SDL_ColorC.i"></span><span class="target" id="namespacekn_1_1draw_1ac6a59278ed8bc470797aaf2b6b955a3d"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">kn</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">draw</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">rect</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="render_window.html#_CPPv4N2kn12RenderWindowE" title="kn::RenderWindow"><span class="n"><span class="pre">RenderWindow</span></span></a><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">window</span></span>, <a class="reference internal" href="rect.html#_CPPv4N2kn4RectE" title="kn::Rect"><span class="n"><span class="pre">Rect</span></span></a><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">rect</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">SDL_Color</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">color</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">thickness</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="m"><span class="pre">0</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N2kn4draw4rectER12RenderWindowR4RectK9SDL_Colori" title="Link to this definition">#</a><br /></dt>
<dt class="sig sig-object cpp" id="_CPPv4N2kn4draw4rectER4RectK9SDL_Colori">
<span id="_CPPv3N2kn4draw4rectER4RectK9SDL_Colori"></span><span id="_CPPv2N2kn4draw4rectER4RectK9SDL_Colori"></span><span id="kn::draw::rect__RectR.SDL_ColorC.i"></span><span class="target" id="namespacekn_1_1draw_1a8285fbd4645119d7eea609454a0857e0"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">kn</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">draw</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">rect</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="rect.html#_CPPv4N2kn4RectE" title="kn::Rect"><span class="n"><span class="pre">Rect</span></span></a><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">rect</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">SDL_Color</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">color</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">thickness</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="m"><span class="pre">0</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N2kn4draw4rectER4RectK9SDL_Colori" title="Link to this definition">#</a><br /></dt>
<dd><p>Draw a rectangle. </p>
<div class="admonition note">
<p class="admonition-title">Note</p>
Expand All @@ -218,7 +218,6 @@ <h1>draw<a class="headerlink" href="#draw" title="Link to this heading">#</a></h
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>window</strong> – Reference to the <a class="reference internal" href="render_window.html#classkn_1_1_render_window"><span class="std std-ref">RenderWindow</span></a> instance. </p></li>
<li><p><strong>rect</strong> – The rectangle to draw. </p></li>
<li><p><strong>color</strong> – The color of the rectangle. </p></li>
<li><p><strong>thickness</strong> – The thickness of the rectangle.</p></li>
Expand Down Expand Up @@ -285,7 +284,7 @@ <h1>draw<a class="headerlink" href="#draw" title="Link to this heading">#</a></h
<div class="toc-tree">
<ul>
<li><a class="reference internal" href="#">draw</a><ul>
<li><a class="reference internal" href="#_CPPv4N2kn4draw4rectER12RenderWindowR4RectK9SDL_Colori"><code class="docutils literal notranslate"><span class="pre">rect()</span></code></a></li>
<li><a class="reference internal" href="#_CPPv4N2kn4draw4rectER4RectK9SDL_Colori"><code class="docutils literal notranslate"><span class="pre">rect()</span></code></a></li>
</ul>
</li>
</ul>
Expand Down
11 changes: 4 additions & 7 deletions docs/build/html/reference/entity.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,12 @@ <h1>Entity<a class="headerlink" href="#entity" title="Link to this heading">#</a
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N2kn6Entity6EntityER12RenderWindowNSt10shared_ptrI7TextureEE">
<span id="_CPPv3N2kn6Entity6EntityER12RenderWindowNSt10shared_ptrI7TextureEE"></span><span id="_CPPv2N2kn6Entity6EntityER12RenderWindowNSt10shared_ptrI7TextureEE"></span><span id="kn::Entity::Entity__RenderWindowR.std::shared_ptr:Texture:"></span><span class="target" id="classkn_1_1_entity_1a88b52bb15ceec6edfb75fec15f54a507"></span><span class="sig-name descname"><span class="n"><span class="pre">Entity</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="render_window.html#_CPPv4N2kn12RenderWindowE" title="kn::RenderWindow"><span class="n"><span class="pre">RenderWindow</span></span></a><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">window</span></span>, <span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">shared_ptr</span></span><span class="p"><span class="pre">&lt;</span></span><a class="reference internal" href="texture.html#_CPPv4N2kn7TextureE" title="kn::Texture"><span class="n"><span class="pre">Texture</span></span></a><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">texture</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N2kn6Entity6EntityER12RenderWindowNSt10shared_ptrI7TextureEE" title="Link to this definition">#</a><br /></dt>
<dt class="sig sig-object cpp" id="_CPPv4N2kn6Entity6EntityENSt10shared_ptrI7TextureEE">
<span id="_CPPv3N2kn6Entity6EntityENSt10shared_ptrI7TextureEE"></span><span id="_CPPv2N2kn6Entity6EntityENSt10shared_ptrI7TextureEE"></span><span id="kn::Entity::Entity__std::shared_ptr:Texture:"></span><span class="target" id="classkn_1_1_entity_1a399022356d952d4ce651bc63c91d3f5d"></span><span class="sig-name descname"><span class="n"><span class="pre">Entity</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">shared_ptr</span></span><span class="p"><span class="pre">&lt;</span></span><a class="reference internal" href="texture.html#_CPPv4N2kn7TextureE" title="kn::Texture"><span class="n"><span class="pre">Texture</span></span></a><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">texture</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N2kn6Entity6EntityENSt10shared_ptrI7TextureEE" title="Link to this definition">#</a><br /></dt>
<dd><p>Create a entity. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>window</strong> – The renderer context. </p></li>
<li><p><strong>texture</strong> – The texture of the entity. </p></li>
</ul>
<dd class="field-odd"><p><strong>texture</strong> – The texture of the entity. </p>
</dd>
</dl>
</dd></dl>
Expand Down Expand Up @@ -317,7 +314,7 @@ <h1>Entity<a class="headerlink" href="#entity" title="Link to this heading">#</a
<ul>
<li><a class="reference internal" href="#">Entity</a><ul>
<li><a class="reference internal" href="#_CPPv4N2kn6EntityE"><code class="docutils literal notranslate"><span class="pre">Entity</span></code></a><ul>
<li><a class="reference internal" href="#_CPPv4N2kn6Entity6EntityER12RenderWindowNSt10shared_ptrI7TextureEE"><code class="docutils literal notranslate"><span class="pre">Entity::Entity()</span></code></a></li>
<li><a class="reference internal" href="#_CPPv4N2kn6Entity6EntityENSt10shared_ptrI7TextureEE"><code class="docutils literal notranslate"><span class="pre">Entity::Entity()</span></code></a></li>
<li><a class="reference internal" href="#_CPPv4NK2kn6Entity10getTextureEv"><code class="docutils literal notranslate"><span class="pre">Entity::getTexture()</span></code></a></li>
<li><a class="reference internal" href="#_CPPv4I0EN2kn6Entity14moveAndCollideEvdRKNSt6vectorINSt10shared_ptrI1TEEEE"><code class="docutils literal notranslate"><span class="pre">Entity::moveAndCollide()</span></code></a></li>
</ul>
Expand Down
7 changes: 3 additions & 4 deletions docs/build/html/reference/font.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,12 @@ <h1>Font<a class="headerlink" href="#font" title="Link to this heading">#</a></h
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N2kn4Font4FontER12RenderWindowRKNSt6stringEi">
<span id="_CPPv3N2kn4Font4FontER12RenderWindowRKNSt6stringEi"></span><span id="_CPPv2N2kn4Font4FontER12RenderWindowRKNSt6stringEi"></span><span id="kn::Font::Font__RenderWindowR.ssCR.i"></span><span class="target" id="classkn_1_1_font_1a54b9e597cb11a64004317019f21ae7b1"></span><span class="sig-name descname"><span class="n"><span class="pre">Font</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="render_window.html#_CPPv4N2kn12RenderWindowE" title="kn::RenderWindow"><span class="n"><span class="pre">RenderWindow</span></span></a><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">window</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">fileDir</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ptSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N2kn4Font4FontER12RenderWindowRKNSt6stringEi" title="Link to this definition">#</a><br /></dt>
<dt class="sig sig-object cpp" id="_CPPv4N2kn4Font4FontERKNSt6stringEi">
<span id="_CPPv3N2kn4Font4FontERKNSt6stringEi"></span><span id="_CPPv2N2kn4Font4FontERKNSt6stringEi"></span><span id="kn::Font::Font__ssCR.i"></span><span class="target" id="classkn_1_1_font_1a8fe856a038876c396e1a85045bcf1381"></span><span class="sig-name descname"><span class="n"><span class="pre">Font</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">fileDir</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ptSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N2kn4Font4FontERKNSt6stringEi" title="Link to this definition">#</a><br /></dt>
<dd><p>Create a font. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>window</strong> – The renderer context. </p></li>
<li><p><strong>fileDir</strong> – The directory of the font file. </p></li>
<li><p><strong>ptSize</strong> – The point size of the font. </p></li>
</ul>
Expand Down Expand Up @@ -309,7 +308,7 @@ <h1>Font<a class="headerlink" href="#font" title="Link to this heading">#</a></h
<ul>
<li><a class="reference internal" href="#">Font</a><ul>
<li><a class="reference internal" href="#_CPPv4N2kn4FontE"><code class="docutils literal notranslate"><span class="pre">Font</span></code></a><ul>
<li><a class="reference internal" href="#_CPPv4N2kn4Font4FontER12RenderWindowRKNSt6stringEi"><code class="docutils literal notranslate"><span class="pre">Font::Font()</span></code></a></li>
<li><a class="reference internal" href="#_CPPv4N2kn4Font4FontERKNSt6stringEi"><code class="docutils literal notranslate"><span class="pre">Font::Font()</span></code></a></li>
<li><a class="reference internal" href="#_CPPv4N2kn4Font6renderERKNSt6stringEb9SDL_Colori"><code class="docutils literal notranslate"><span class="pre">Font::render()</span></code></a></li>
</ul>
</li>
Expand Down
Loading

0 comments on commit d2dc680

Please sign in to comment.