Draw.pic
The draw.pic command creates the visual and priority screens in memory, using the data in the specified picture resource.
Syntax
draw.pic(var vA);
Remarks
The draw.pic command converts the drawing commands in the picture resource specified by variable vA into the actual visual and priority screen images. The images are drawn in a memory buffer, but is not copied to the actual system video display memory. The images are not displayed on screen with this command. To actually display the image on screen, use the show.pic command.
AGI adds a script entry to the script stack each time a draw.pic command is executed.
Possible Errors
If the picture passed in vA has not been loaded, calling draw.pic will raise trappable error #18.
Example
<syntaxhighlight lang="agi"> [ load and display the current room's picture: load.pic(currentRoom); [ first load the picture resource draw.pic(currentRoom); [ then draw the picture to memory discard.pic(currentRoom); [ resource no longer needed, so discard it ... show.pic(); [ now display the picture on screen </syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 25 (0x19 hex) |