Grass.extm: Difference between revisions

Jump to navigation Jump to search
m
Added more images showing rgb manipulation.
imported>Zephenryus
(Added file specification for grass.extm files)
 
imported>Zephenryus
m (Added more images showing rgb manipulation.)
Line 1: Line 1:
<onlyinclude>
<onlyinclude>
[[File:580000c282.grass.extm.png|alt=Generated grass height map of Hyrule Main Field|thumb|Generated grass height map of Hyrule Main Field]]
[[File:Rainbow-grass.jpg|alt=Full RGB color spectrum used for grass.|thumb|Full RGB color spectrum used for grass.]]
[[File:Rainbow-grass-1.jpg|thumb]]
<code>grass.extm</code> files describe the height and color of the main field grass and add-on content field.
<code>grass.extm</code> files describe the height and color of the main field grass and add-on content field.
</onlyinclude>
</onlyinclude>
== grass.extm File Specification ==
== grass.extm File Specification ==


Line 10: Line 14:
=== Grass Map Data ===
=== Grass Map Data ===


Each entry in the water data table is 4 bytes long.
Each entry in the grass data table is 4 bytes long. The rgb values are capable of producing all colors.


{| class="wikitable"
{| class="wikitable"
Line 41: 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='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;
Anonymous user

Navigation menu