add documentation for a few undocumented functions

GetMatAdjust, GetTexture, GetAverageTextureColor
stable-5.4
Tobias Zwick 2014-01-22 13:59:03 +07:00
parent 266540fc76
commit 4472ce3243
3 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>GetAverageTextureColor</title>
<category>Landscape</category>
<subcat>Material</subcat>
<version>5.4 OC</version>
<syntax>
<rtype>int</rtype>
<params>
<param>
<type>string</type>
<name>texture_name</name>
<desc>Name of the texture for which to retrieve the average color.</desc>
</param>
</params>
</syntax>
<desc>Returns the average color of the given material texture.</desc>
<related>
<funclink>GetTexture</funclink>
</related>
</func>
<date>2014-01</date>
</funcs>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>GetMatAdjust</title>
<category>Landscape</category>
<version>5.1 OC</version>
<syntax>
<rtype>int</rtype>
</syntax>
<desc>Returns the material modulation as set by <funclink>SetMatAdjust</funclink>.</desc>
<related>
<funclink>SetMatAdjust</funclink>
<funclink>SetSkyAdjust</funclink>
<funclink>GetSkyAdjust</funclink>
<funclink>SetGamma</funclink>
<funclink>RGB</funclink>
<funclink>RGBa</funclink>
</related>
</func>
<author>Sven2</author><date>2003-06</date>
</funcs>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>GetTexture</title>
<category>Landscape</category>
<subcat>Material</subcat>
<version>5.4 OC</version>
<syntax>
<rtype>string</rtype>
<params>
<param>
<type>int</type>
<name>x</name>
<desc>X coordinate at which to check the texture. Offset in local calls.</desc>
</param>
<param>
<type>int</type>
<name>y</name>
<desc>Y coordinate at which to check the texture. Offset in local calls.</desc>
</param>
</params>
</syntax>
<desc>Returns the name of the texture used for the material at the given position.</desc>
<examples>
<example>
<code>func ControlUse(object clonk)<br/>
{<br/>
var tex_name = clonk->GetTexture(0,0);<br/>
var tex_color = <funclink>GetAverageTextureColor</funclink>();<br/>
clonk-><funclink>SetColor</funclink>(tex_color);
clonk-><funclink>PlayerMessage</funclink>(clonk-><funclink>GetOwner()</funclink>, &quot;Camoflaging Clonk to look like %s&quot;, tex_name);<br/>
}</code>
<text>A script for a carmoflage item. When used, the clonk's overlay color is set to the average color of the texture where he is currently standing and he announces the name of the texture he is carmoflaging as.</text>
</example>
</examples>
<related>
<funclink>GetAverageTextureColor</funclink>
</related>
</func>
<date>2014-01</date>
</funcs>