</code></pre></div></div> <ul> <li>Returns FID information about the square under the given tile at elevation 0</li> <li>Pass elevation as 4-bit number in bits 25-28 to access other elevations</li> <li>Pass result mode in bits 29-32: 0 - ground FID, 1 - roof FID, 2 - raw data.</li> </ul><hr /> <h3 class="d-inline-block"id="get_tile_ground_fid"><ahref="#get_tile_ground_fid"class="anchor-heading"aria-labelledby="get_tile_ground_fid"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_tile_ground_fid</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_tile_ground_fid</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">tileNum</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">elevation</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns FID of a ground tile at given tile number and elevation.</p><hr/><h3class="d-inline-block"id="get_tile_roof_fid"><ahref="#get_tile_roof_fid"class="anchor-heading"aria-labelledby="get_tile_roof_fid"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_tile_roof_fid</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">get_tile_roof_fid</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">tileNum</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">elevation</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns FID of a roof tile at given tile number and elevation. Note that FID of 1 is used when there is no actual roof.</p><hr/><h3id="obj_blocking_line"><ahref="#obj_blocking_line"class="anchor-heading"aria-labelledby="obj_blocking_line"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>obj_blocking_line</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">ObjectPtr</span><spanclass="n">obj_blocking_line</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">objFrom</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">tileTo</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">blockingType</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns first object which blocks direct linear path from <codeclass="language-plaintext highlighter-rouge">objFrom</code> to <codeclass="language-plaintext highlighter-rouge">tileTo</code> using selected blocking function (see <codeclass="language-plaintext highlighter-rouge">BLOCKING_TYPE_*</code> constants in <strong>sfall.h</strong>). If path is clear (no blocker was encountered by selected function) - returns 0. <codeclass="language-plaintext highlighter-rouge">objFrom</code> is always excluded from calculations, but is required to be a valid object.</p><hr/><h3id="obj_blocking_tile"><ahref="#obj_blocking_tile"class="anchor-heading"aria-labelledby="obj_blocking_tile"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>obj_blocking_tile</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">ObjectPtr</span><spanclass="n">obj_blocking_tile</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">tileNum</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">elevation</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">blockingType</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns first object blocking given tile using given blocking function or 0 if tile is clear.</p><hr/><h3id="path_find_to"><ahref="#path_find_to"class="anchor-heading"aria-labelledby="path_find_to"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>path_find_to</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">array</span><spanclass="n">path_find_to</span><spanclass="p">(</span><spanclass="n">ObjectPtr</span><spanclass="n">objFrom</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">tileTo</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">blockingType</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns the shortest path to a given tile using given blocking function as an array of tile directions (0..5) to move on each step. Array length equals to a number of steps. Empty array means that specified target cannot be reached.</p><hr/><h3class="d-inline-block"id="tile_by_position"><ahref="#tile_by_position"class="anchor-heading"aria-labelledby="tile_by_position"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>tile_by_position</strong></h3><pclass="label label-green">sfall.h</p><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">tile_by_position</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">x</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">y</span><spanclass="p">)</span>
</code></pre></div></div><ul><li>returns the tile number at the x, y position relative to the top-left corner of the screen</li><li>if the position is outside of the range of tiles, it will return -1</li></ul><hr/><h3id="tile_get_objs"><ahref="#tile_get_objs"class="anchor-heading"aria-labelledby="tile_get_objs"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>tile_get_objs</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">array</span><spanclass="n">tile_get_objs</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">tileNum</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">elevation</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns an array of all objects at given tile. It will include any hidden, dead or system objects (like cursor), so make sure to check properly when iterating.</p><hr/><h3id="tile_light"><ahref="#tile_light"class="anchor-heading"aria-labelledby="tile_light"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>tile_light</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">tile_light</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">elevation</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">tileNum</span><spanclass="p">)</span>
</code></pre></div></div><p>Returns light intensity at the given tile in the range of 0 to 65536.</p><hr/><h3id="tile_refresh_display"><ahref="#tile_refresh_display"class="anchor-heading"aria-labelledby="tile_refresh_display"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>tile_refresh_display</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">tile_refresh_display</span>
</code></pre></div></div><p>Redraws the game scene (tiles, walls, objects, etc.).</p><hr/><h3id="tile_under_cursor"><ahref="#tile_under_cursor"class="anchor-heading"aria-labelledby="tile_under_cursor"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>tile_under_cursor</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">int</span><spanclass="n">tile_under_cursor</span>
</code></pre></div></div></main><hr><footer><divclass="d-md-none mt-4 fs-2"> This site uses <ahref="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </div></footer></div></div><divclass="search-overlay"></div></div></body></html>