2010-08-22 13:13:17 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< !DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
2009-05-09 13:11:51 +00:00
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs >
<func >
<title > SetPicture</title>
2010-08-22 13:13:17 +00:00
<category > Objects</category>
<subcat > Display</subcat>
2011-06-30 10:52:55 +00:00
<version > 5.1 OC</version>
2009-05-09 13:11:51 +00:00
<syntax >
2009-08-12 20:44:09 +00:00
<rtype > void</rtype>
2009-05-09 13:11:51 +00:00
<params >
2010-08-22 13:13:17 +00:00
<param >
<type > int</type>
<name > x</name>
<desc > X position of the top left corner of the new graphics rectangle.</desc>
</param>
<param >
<type > int</type>
<name > y</name>
<desc > Y position of the top left corner of the new graphics rectangle.</desc>
</param>
<param >
<type > int</type>
<name > width</name>
<desc > Width of the new graphics rectangle.</desc>
</param>
<param >
<type > int</type>
<name > height</name>
<desc > Height of the new graphics rectangle.</desc>
</param>
2009-05-09 13:11:51 +00:00
</params>
</syntax>
2010-08-22 13:13:17 +00:00
<desc > Changes the representative picture of the object by setting it to a new source rectangle within the definition graphics. This picture is used e.g. in menus or the inventory. Also see the Picture entry in <emlink href= "definition/defcore.html" > DefCore.txt</emlink> .</desc>
2009-05-09 13:11:51 +00:00
<examples >
<example >
2010-08-22 13:13:17 +00:00
<code > global func SetObjectPicture(idSrcDef, obj)
2009-05-09 13:11:51 +00:00
{
2010-08-22 13:13:17 +00:00
obj-> SetPicture(<funclink > GetDefCoreVal</funclink> (" Picture" , " DefCore" , idSrcDef, 0),
<funclink > GetDefCoreVal</funclink> (" Picture" , " DefCore" , idSrcDef, 1),
<funclink > GetDefCoreVal</funclink> (" Picture" , " DefCore" , idSrcDef, 2),
<funclink > GetDefCoreVal</funclink> (" Picture" , " DefCore" , idSrcDef, 3));
obj-> <funclink > SetGraphics</funclink> (0, idSrcDef);
2010-03-15 22:55:14 +00:00
<funclink > return</funclink> 1;
2009-05-09 13:11:51 +00:00
}</code>
2010-08-22 13:13:17 +00:00
<text > Global function: changes the picture of obj to that of another object (Warning: this may make the game graphics or SolidMasks of the object invalid).</text>
2009-05-09 13:11:51 +00:00
</example>
</examples>
2010-08-22 13:13:17 +00:00
<related > <funclink > SetGraphics</funclink> </related>
2009-05-09 13:11:51 +00:00
</func>
2010-08-22 13:13:17 +00:00
<author > Sven2</author> <date > 2003-06</date>
2009-05-09 13:11:51 +00:00
</funcs>