Clear.lines

From AGI Wiki
Revision as of 17:57, 25 March 2019 by Andrew Korson (talk | contribs) (Created page with "The '''clear.lines''' command clears a range of text lines. == Syntax == clear.lines(byt TOP, byt BTM, byt COLOR); == Remarks == This comm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The clear.lines command clears a range of text lines.

Syntax

clear.lines(byt TOP, byt BTM, byt COLOR);

Remarks

This command clears lines from row TOP to row BTM.

This command can be used on both the text screen and the graphics screen. On the graphics screen, if any of the lines are within the displayed picture, the picture will be blanked out on the affected rows, but will be restored if an object moves past the cleared area.

On the graphics screen, the color used to clear the lines is specified by COLOR. If COLOR is 0, the lines are cleared to black. if COLOR in nonzero, white is used to clear the lines. Keep in mind that if any screen objects move over the cleared area, the screen will revert back to the original pixels once the object has moved past; the cleared area is not stored in memory.

On the text screen, the color argument COLOR is ignored. The lines are always cleared to black.

Possible Errors

AGI does not validate the TOP and BTM values; if either TOP or BTM > 24, or BTM < TOP, the results will be unpredictable.

Example

Code:

<syntaxhighlight lang="agi"> clear.lines(5, 10, 0); </syntaxhighlight>

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 105 (0x69 hex)

See Also

Display Commands
AGI Text Screen
clear.text.rect