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

X Text Management Commands

prevent.input();

Prevents the user from entering anything using the keyboard.

accept.input();

Allows the user to enter text using the keyboard.

print(n); print.v(n);

Opens a text window in the centre of the screen, where a message number n (or Var(n)) from the messages field of the current LOGIC resource is displayed. Output mode is determined by Flag(15).
The message is a NULL-terminated string of text. In addition to letters, digits, and other symbols, the string may contain:
- Newline character (0Ah);
- Format element:

For v format, you can add a vertical line and a number of characters the output should take. In this case leading zeros are not suppressed in the output. Example: %v34 | 2 When you write your messages, remember that the interpreter wraps the text between the lines as needed when the message is displayed.

display(R<ow> , C<olumn> , N<umber>); display.v(R<ow> , C<olumn> , N<umber>);

Prints a message number N (Var(N)) in the row R (Var(R)), starting with the column C (Var(C)). No window is created, so it is up to the programmer to erase the output when it is no longer needed.

print.at(n, x, y, l); print.at.v(n, x, y, l);

Analogous to print but the programmer can specify the window location. x, y, and l are constants specifying coordinates of the top left corner of the window and its width in character cells of a 40x25 screen.

version();

Prints interpreter version in the centre of the screen.

text.screen();

The screen switches to the text mode 40x25.

graphics();

The screen returns to the graphics mode. The picture on the screen is restored.

set.cursor.char(n);

First byte of the message n is user as a text mode cursor.

set.text.attribute(F<oreground> , B<ackground> );

Sets foreground and background colors for display, get_num, and get_string commands.

clear.lines(n, m, C<olor>);

Clears text lines from n to m using color C.

clear.text.rect(x1, y1, x2, y2, C<olor>);

Clears a rectangular area with top left corner coordinates (x1,y1) and bottom right coordinates (x2,y2) using color C.

status.line.on();

Shows the status line containing the current score and sound status (on/off).

status.line.off();

Removes the status line.

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.