https://wiki.bennugd.org/index.php?title=Pcx_load&feed=atom&action=historyPcx load - Revision history2024-03-28T17:50:39ZRevision history for this page on the wikiMediaWiki 1.36.2https://wiki.bennugd.org/index.php?title=Pcx_load&diff=10678&oldid=prevKloppix at 18:00, 20 July 20122012-07-20T18:00:29Z<p></p>
<p><b>New page</b></p><div>[[Category:functions]]<br />
[[Category:maps]]<br />
[[Category:mod_map]]<br />
<br />
==Definition==<br />
'''INT''' pcx_load ( <'''STRING''' filename>, [ <'''POINTER''' id>] )<br />
<br />
Creates a new [[graphic]], using the specified [http://en.wikipedia.org/wiki/PCX pcx] file as contents and puts it in the [[system file]]. Returns the [[graphID]] of the created graphic. The [[color depth]] of the created graphic will be the same as the loaded pcx file.<br />
<br />
The previous name [[load_pcx]]() is deprecated. <br />
<br />
== Parameters ==<br />
{| <br />
| '''STRING''' filename || - The name of the pcx file to be loaded, including a possible [[path]].<br />
|-<br />
|'''POINTER''' id || - Optional parameter, for loading a map in the background.<br />
|}<br />
<br />
== Returns ==<br />
<br />
'''INT''' : [[graphID]]<br />
{|<br />
| -2 || - Waiting for the file to be loaded, see notes.<br />
|-<br />
| -1 || - There was an error loading the file.<br />
|-<br />
| >=0 || - The graphID of the newly created graphic.<br />
|}<br />
<br />
<br />
''the following applies for versions prior rc282:''<br />
<br />
'''INT''' : [[graphID]]<br />
{|<br />
| 0 || - There was an error loading the file.<br />
|-<br />
| >0 || - The graphID of the newly created graphic.<br />
|}<br />
<br />
== Notes ==<br />
<br />
The optional parameter '''id''' was introduced in version rc282 and allows you to load resources in the background.<br />
It used with the [[Offset]] operator. See example below:<br />
<br />
<pre><br />
load_pcx("archivo_gordo.pcx", &idpcx);<br />
while(idpcx==-2)<br />
say("Big File Loading ....");<br />
frame;<br />
end<br />
if(idpcx==-1)<br />
say("Something went wrong!!");<br />
exit(); // o return<br />
end<br />
<br />
say("Big file loaded ok!!");<br />
</pre><br />
<br />
<br />
<br />
<br />
{{Moduledocbox<br />
| module = Mod_map<br />
}}</div>Kloppix