Skip to content

Commit

Permalink
update slate[no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 8, 2023
1 parent 70240bb commit e5e5c55
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 0 deletions.
48 changes: 48 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8865,6 +8865,19 @@ <h3 id='Quad'>Quad</h3>
</tr>
</tbody></table>
<h3 id='RenderInfo'>RenderInfo</h3>
<blockquote>
<p>For using a custom normal map:</p>
</blockquote>
<div class="highlight"><pre class="highlight lua tab-lua"><code><span class="n">set_post_entity_spawn</span><span class="p">(</span><span class="k">function</span><span class="p">(</span><span class="n">ent</span><span class="p">)</span>
<span class="c1">-- Doesn't really make sense with this texture, you can use your custom normal texture id here</span>
<span class="n">ent</span><span class="p">.</span><span class="n">rendering_info</span><span class="p">:</span><span class="n">set_normal_map_texture</span><span class="p">(</span><span class="n">TEXTURE</span><span class="p">.</span><span class="n">DATA_TEXTURES_FLOORSTYLED_GOLD_NORMAL_0</span><span class="p">)</span>
<span class="n">ent</span><span class="p">.</span><span class="n">rendering_info</span><span class="p">.</span><span class="n">shader</span> <span class="o">=</span> <span class="mi">30</span> <span class="c1">-- Make sure to set the shader to one that uses normal map</span>
<span class="k">end</span><span class="p">,</span> <span class="n">SPAWN_TYPE</span><span class="p">.</span><span class="n">LEVEL_GEN</span><span class="p">,</span> <span class="n">MASK</span><span class="p">.</span><span class="n">FLOOR</span><span class="p">,</span> <span class="n">ENT_TYPE</span><span class="p">.</span><span class="n">FLOORSTYLED_MINEWOOD</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>Note: if using set_texture_num, make sure to have used set_second_texture/set_third_texture before, since not doing so can lead to crashes</p>
</blockquote>

<p>Some information used to render the entity, can not be changed, used in <a href="#Entity">Entity</a></p>

<table><thead>
Expand Down Expand Up @@ -8920,11 +8933,46 @@ <h3 id='RenderInfo'>RenderInfo</h3>
<td></td>
</tr>
<tr>
<td>int</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=texture_num">texture_num</a></td>
<td></td>
</tr>
<tr>
<td>class <a href="#Entity">Entity</a></td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=get_entity">get_entity()</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_normal_map_texture">set_normal_map_texture(TEXTURE texture_id)</a></td>
<td>Sets second_texture to the texture specified, then sets third_texture to SHINE_0 and texture_num to 3. You still have to change shader to 30 to render with normal map (same as COG normal maps)</td>
</tr>
<tr>
<td>optional&lt;<a href="#TEXTURE">TEXTURE</a>&gt;</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=get_second_texture">get_second_texture</a></td>
<td></td>
</tr>
<tr>
<td>optional&lt;<a href="#TEXTURE">TEXTURE</a>&gt;</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=get_third_texture">get_third_texture</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_second_texture">set_second_texture(TEXTURE texture_id)</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_third_texture">set_third_texture(TEXTURE texture_id)</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_texture_num">set_texture_num(int texture_id)</a></td>
<td>Set the number of textures that may be used, need to have them set before for it to work</td>
</tr>
<tr>
<td><a href="#Aliases">CallbackId</a></td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_pre_virtual">set_pre_virtual(RENDER_INFO_OVERRIDE entry, function fun)</a></td>
<td>Hooks before the virtual function at index <code>entry</code>.</td>
Expand Down
48 changes: 48 additions & 0 deletions docs/light.html
Original file line number Diff line number Diff line change
Expand Up @@ -8865,6 +8865,19 @@ <h3 id='Quad'>Quad</h3>
</tr>
</tbody></table>
<h3 id='RenderInfo'>RenderInfo</h3>
<blockquote>
<p>For using a custom normal map:</p>
</blockquote>
<div class="highlight"><pre class="highlight lua tab-lua"><code><span class="n">set_post_entity_spawn</span><span class="p">(</span><span class="k">function</span><span class="p">(</span><span class="n">ent</span><span class="p">)</span>
<span class="c1">-- Doesn't really make sense with this texture, you can use your custom normal texture id here</span>
<span class="n">ent</span><span class="p">.</span><span class="n">rendering_info</span><span class="p">:</span><span class="n">set_normal_map_texture</span><span class="p">(</span><span class="n">TEXTURE</span><span class="p">.</span><span class="n">DATA_TEXTURES_FLOORSTYLED_GOLD_NORMAL_0</span><span class="p">)</span>
<span class="n">ent</span><span class="p">.</span><span class="n">rendering_info</span><span class="p">.</span><span class="n">shader</span> <span class="o">=</span> <span class="mi">30</span> <span class="c1">-- Make sure to set the shader to one that uses normal map</span>
<span class="k">end</span><span class="p">,</span> <span class="n">SPAWN_TYPE</span><span class="p">.</span><span class="n">LEVEL_GEN</span><span class="p">,</span> <span class="n">MASK</span><span class="p">.</span><span class="n">FLOOR</span><span class="p">,</span> <span class="n">ENT_TYPE</span><span class="p">.</span><span class="n">FLOORSTYLED_MINEWOOD</span><span class="p">)</span>
</code></pre></div>
<blockquote>
<p>Note: if using set_texture_num, make sure to have used set_second_texture/set_third_texture before, since not doing so can lead to crashes</p>
</blockquote>

<p>Some information used to render the entity, can not be changed, used in <a href="#Entity">Entity</a></p>

<table><thead>
Expand Down Expand Up @@ -8920,11 +8933,46 @@ <h3 id='RenderInfo'>RenderInfo</h3>
<td></td>
</tr>
<tr>
<td>int</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=texture_num">texture_num</a></td>
<td></td>
</tr>
<tr>
<td>class <a href="#Entity">Entity</a></td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=get_entity">get_entity()</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_normal_map_texture">set_normal_map_texture(TEXTURE texture_id)</a></td>
<td>Sets second_texture to the texture specified, then sets third_texture to SHINE_0 and texture_num to 3. You still have to change shader to 30 to render with normal map (same as COG normal maps)</td>
</tr>
<tr>
<td>optional&lt;<a href="#TEXTURE">TEXTURE</a>&gt;</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=get_second_texture">get_second_texture</a></td>
<td></td>
</tr>
<tr>
<td>optional&lt;<a href="#TEXTURE">TEXTURE</a>&gt;</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=get_third_texture">get_third_texture</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_second_texture">set_second_texture(TEXTURE texture_id)</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_third_texture">set_third_texture(TEXTURE texture_id)</a></td>
<td></td>
</tr>
<tr>
<td>bool</td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_texture_num">set_texture_num(int texture_id)</a></td>
<td>Set the number of textures that may be used, need to have them set before for it to work</td>
</tr>
<tr>
<td><a href="#Aliases">CallbackId</a></td>
<td><a href="https://github.com/spelunky-fyi/overlunky/search?l=Lua&amp;q=set_pre_virtual">set_pre_virtual(RENDER_INFO_OVERRIDE entry, function fun)</a></td>
<td>Hooks before the virtual function at index <code>entry</code>.</td>
Expand Down
21 changes: 21 additions & 0 deletions docs/src/includes/_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,20 @@ tuple&lt;[Vec2](#Vec2), [Vec2](#Vec2), [Vec2](#Vec2), [Vec2](#Vec2)&gt; | [split

### RenderInfo


> For using a custom normal map:
```lua
set_post_entity_spawn(function(ent)
-- Doesn't really make sense with this texture, you can use your custom normal texture id here
ent.rendering_info:set_normal_map_texture(TEXTURE.DATA_TEXTURES_FLOORSTYLED_GOLD_NORMAL_0)
ent.rendering_info.shader = 30 -- Make sure to set the shader to one that uses normal map
end, SPAWN_TYPE.LEVEL_GEN, MASK.FLOOR, ENT_TYPE.FLOORSTYLED_MINEWOOD)
```

> Note: if using set_texture_num, make sure to have used set_second_texture/set_third_texture before, since not doing so can lead to crashes

Some information used to render the entity, can not be changed, used in [Entity](#Entity)

Type | Name | Description
Expand All @@ -768,7 +782,14 @@ float | [tilew](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tilew)
float | [tileh](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tileh) |
bool | [facing_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=facing_left) |
bool | [render_inactive](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=render_inactive) |
int | [texture_num](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=texture_num) |
class [Entity](#Entity) | [get_entity()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_entity) |
bool | [set_normal_map_texture(TEXTURE texture_id)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_normal_map_texture) | Sets second_texture to the texture specified, then sets third_texture to SHINE_0 and texture_num to 3. You still have to change shader to 30 to render with normal map (same as COG normal maps)
optional&lt;[TEXTURE](#TEXTURE)&gt; | [get_second_texture](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_second_texture) |
optional&lt;[TEXTURE](#TEXTURE)&gt; | [get_third_texture](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_third_texture) |
bool | [set_second_texture(TEXTURE texture_id)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_second_texture) |
bool | [set_third_texture(TEXTURE texture_id)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_third_texture) |
bool | [set_texture_num(int texture_id)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_texture_num) | Set the number of textures that may be used, need to have them set before for it to work
[CallbackId](#Aliases) | [set_pre_virtual(RENDER_INFO_OVERRIDE entry, function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_pre_virtual) | Hooks before the virtual function at index `entry`.
[CallbackId](#Aliases) | [set_post_virtual(RENDER_INFO_OVERRIDE entry, function fun)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_post_virtual) | Hooks after the virtual function at index `entry`.
nil | [clear_virtual(CallbackId callback_id)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=clear_virtual) | Clears the hook given by `callback_id`, alternatively use `clear_callback()` inside the hook.
Expand Down

0 comments on commit e5e5c55

Please sign in to comment.