forked from Mirrors/openclonk
add documentation for a few undocumented functions
GetMatAdjust, GetTexture, GetAverageTextureColorstable-5.4
parent
266540fc76
commit
4472ce3243
|
@ -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>
|
|
@ -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>
|
|
@ -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>, "Camoflaging Clonk to look like %s", 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>
|
Loading…
Reference in New Issue