Difference between revisions of "AGI Command Reference - Picture Resource Management Commands"

From AGI Wiki
Jump to navigationJump to search
Line 11: Line 11:
 
[[AGI Command Reference - Object Motion Control Commands|6]] |  
 
[[AGI Command Reference - Object Motion Control Commands|6]] |  
 
[[AGI Command Reference - Inventory Item Management Commands|7]] |  
 
[[AGI Command Reference - Inventory Item Management Commands|7]] |  
[[AGI Command Reference - PIC Resource Management Commands|8]] |  
+
[[AGI Command Reference - Picture Resource Management Commands|8]] |  
 
[[AGI Command Reference - Sound Resource Management Commands|9]] |  
 
[[AGI Command Reference - Sound Resource Management Commands|9]] |  
 
[[AGI Command Reference - Text Management Commands|10]] |  
 
[[AGI Command Reference - Text Management Commands|10]] |  
Line 22: Line 22:
 
</div><br />
 
</div><br />
  
<div align="center"><span style="font-size: 22pt">PIC Resource Management Commands</span><br />
+
<div align="center"><span style="font-size: 22pt">Picture Resource Management Commands</span><br />
 
''By [[Chris Cromer]]''</div>
 
''By [[Chris Cromer]]''</div>
  
 
&nbsp;
 
&nbsp;
  
The following commands operate on PICTURE resources (3D props), prepared using PM editor and loaded in the interpreter memory using load_pic:
+
The following commands operate on picture resources (3D props), prepared using PM editor and loaded in the interpreter memory using load_pic:
  
 
== <br />draw.pic(n); ==
 
== <br />draw.pic(n); ==
  
 
<blockquote>
 
<blockquote>
A PICTURE resource number i, where i is the value of Var(n) is executed. As the result, the background picture is created in the internal buffer of the interpreter. Before execution, the buffer is cleared, i.e. all pixels are set to color 15 and priority 4.</blockquote>
+
A picture resource number i, where i is the value of Var(n) is executed. As the result, the background picture is created in the internal buffer of the interpreter. Before execution, the buffer is cleared, i.e. all pixels are set to color 15 and priority 4.</blockquote>
  
 
== overlay.pic(n); ==
 
== overlay.pic(n); ==
Line 40: Line 40:
 
== add.to.pic(a, b, c, d, e, f, g); add.to.pic.v(a, b, c, d, e, f, g); ==
 
== add.to.pic(a, b, c, d, e, f, g); add.to.pic.v(a, b, c, d, e, f, g); ==
  
<blockquote>A picture of a VIEW resource is added to the background as its component. Typically, this is used to add small complicated details which would require too many PICTURE resource commands to draw.
+
<blockquote>A picture of a VIEW resource is added to the background as its component. Typically, this is used to add small complicated details which would require too many picture resource commands to draw.
 
Parameters are:<br />
 
Parameters are:<br />
 
<br />
 
<br />
Line 57: Line 57:
 
<blockquote>Shows internal buffer on the screen.
 
<blockquote>Shows internal buffer on the screen.
  
ATTENTION! Please use the following sequence of commands when loading PICTURE resources in the interpreter memory:<br />
+
ATTENTION! Please use the following sequence of commands when loading picture resources in the interpreter memory:<br />
 
<br />
 
<br />
 
:load.pic(n);
 
:load.pic(n);
Line 101: Line 101:
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 
[[Category:PIC Resources]]
 
[[Category:PIC Resources]]
 +
[[Category:Picture Resources]]

Revision as of 14:39, 28 December 2013

Tutorials and Guides Table of Contents
AGI Command Reference Index

Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16


Picture Resource Management Commands
By Chris Cromer

 

The following commands operate on picture resources (3D props), prepared using PM editor and loaded in the interpreter memory using load_pic:


draw.pic(n);

A picture resource number i, where i is the value of Var(n) is executed. As the result, the background picture is created in the internal buffer of the interpreter. Before execution, the buffer is cleared, i.e. all pixels are set to color 15 and priority 4.

overlay.pic(n);

Just like the above, only the internal buffer is not cleared before drawing. Picture(Var(n)) is drawn over the existing picture.

add.to.pic(a, b, c, d, e, f, g); add.to.pic.v(a, b, c, d, e, f, g);

A picture of a VIEW resource is added to the background as its component. Typically, this is used to add small complicated details which would require too many picture resource commands to draw.

Parameters are:

a ( Var(a) ) - number of the VIEW resource;
b ( Var(b) ) - loop number;
c ( Var(c) ) - cel number;
d ( Var(d) ) - x coordinate;
e ( Var(e) ) - y coordinate;
f ( Var(f) ) - priority;
g ( Var(g) ) - margin.


If margin is 0, 1, 2, or 3, the base of the cel is surrounded with a rectangle of the corresponding priority. If margin > 4, this extra margin is not shown.

show.pic();

Shows internal buffer on the screen.

ATTENTION! Please use the following sequence of commands when loading picture resources in the interpreter memory:

load.pic(n);
draw.pic(n);
discard.pic(n);
.............
show.pic;


Any other order may crash the interpreter without any diagnostic messages.

 

Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16


Tutorials and Guides Table of Contents
AGI Command Reference Index

< Previous: Inventory Item Management CommandsNext: Sound Resource Management Commands >