MATE: Difference between revisions
Jump to navigation
Jump to search
m
Added not about material table indexes and added generated material map.
imported>Zephenryus (Added file specification for mate files) |
imported>Zephenryus m (Added not about material table indexes and added generated material map.) |
||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude> | ||
[[File:5100000000.mate.png|alt=Generated material map of Hyrule Main Field|thumb|Generated material map of Hyrule Main Field]] | |||
<code>mate</code> files describe the material and texture of the main field and add-on content field. | <code>mate</code> files describe the material and texture of the main field and add-on content field. | ||
</onlyinclude> | </onlyinclude> | ||
== MATE File Specification == | == MATE File Specification == | ||
Line 43: | Line 45: | ||
<code>x</code> and <code>z</code><ref><code>z</code> is expected to be an integer quotient. The <code>floor</code> function can be used if integer division is not supported.</ref> can be calculated, while iterating through the data table: | <code>x</code> and <code>z</code><ref><code>z</code> is expected to be an integer quotient. The <code>floor</code> function can be used if integer division is not supported.</ref> can be calculated, while iterating through the data table: | ||
<syntaxhighlight lang="c" line= | <syntaxhighlight lang="c" line="line"> | ||
for (int index = 0; index < 256 * 256; index++) { | for (int index = 0; index < 256 * 256; index++) { | ||
uint x = index % 256; | uint x = index % 256; | ||
Line 51: | Line 53: | ||
=== Material Index === | === Material Index === | ||
Note that the material ids ''are not'' in order. <code>material0</code> and <code>material1</code> reference the material id and not the table index. | |||
{| class="wikitable" | {| class="wikitable" | ||
!id | !id |