Home | AGI Documentation | AGI Tutorials | AGI Tools | AGI Wiki | Community

AGI Command Reference

This is a tutorial for AGI Programming if you have any questions post them at sciprogramming.com/

Thanks to the Sarien team and to Nick Sonneveld for some info on the unknown commands.

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

VIII Picture Resource Management Commands

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
 


by helping to defray some of the costs of hosting this site. If it has been of help to you, please consider contributing to help keep it online.
Thank you.
pixe
Top

© 2013 to present The Sierra Help Pages. All rights reserved. All Sierra games, artwork and music © Sierra.