openclonk/docs/sdk/script/fn/SplitRGBaValue.xml

57 lines
1.8 KiB
XML
Raw Normal View History

<?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>SplitRGBaValue</title>
<category>Arithmetics</category>
<version>5.1 OC</version>
<syntax>
<rtype>bool</rtype>
<params>
<param>
<type>int</type>
<name>Val</name>
<desc>32 bit color value</desc>
</param>
<param>
<type>int</type>
<name>red</name>
<desc>[opt] variable in which the red value is to be stored</desc>
</param>
<param>
<type>int</type>
<name>green</name>
<desc>[opt] variable in which the green value is to be stored</desc>
</param>
<param>
<type>int</type>
<name>blue</name>
<desc>[opt] variable in which the blue value is to be stored</desc>
</param>
<param>
<type>int</type>
<name>alpha</name>
<desc>[opt] variable in which the alpha value is to be stored</desc>
</param>
</params>
</syntax>
<desc>Writes the red, green, blue, and alpha values of a 32 bit color value to the specified variables.</desc>
<examples>
<example>
<code>var red, green, blue;
SplitRGBaValue(<funclink>GetColorDw</funclink>(<funclink>GetCursor</funclink>()),red,green,blue);
<funclink>GetCursor</funclink>()-&gt;<funclink>Message</funclink>(&quot;Rot: %d|Grün %d|Blau %d&quot;,red, green, blue);
</code>
<text>Displays the three color values of the currently selected clonk above the clonk's head.</text>
</example>
</examples>
<related>
<funclink>GetRGBaValue</funclink>
<funclink>SetRGBaValue</funclink>
</related>
</func>
<author>Tyron</author><date>2004-09</date>
</funcs>