Difference between revisions of "AGI Command Reference - Initialization Commands"

From AGI Wiki
Jump to navigationJump to search
Line 27: Line 27:
 
 
 
 
  
 +
== <br />set.key(s, c); ==
  
 +
<blockquote>Set interpreter's special key.<br />
 +
<br />
 +
:c - code (decimal number from 0 to 255);
 +
:s - if the key is a regular, or Ctrl+key pair, the ASCII code (for example, 0009h - TAB);
 +
:- if the key is functional or Alt+key pair, the corresponding scan-code in the high byte of s.<br />
 +
<br />
 +
For example, the scan code of F1 is 3b00h, Alt+Z - 2c00h, etc.</blockquote>
 +
 +
== set.game.id(n); ==
 +
 +
<blockquote>Message n is scanned by the interpreter and compared with its internal identifier. On mismatch, the program exits.</blockquote>
 +
 +
== script.size(n); ==
 +
 +
<blockquote>Sets the size of script table in bytes. Script table stores codes of some interpreter commands. It is needed to the interpreter can correctly reload resources when restore_game is executed.</blockquote>
 +
 +
== trace.info(n, m, l); ==
 +
 +
<blockquote>Sets the built-in debugger parameters n - number of LOGIC resource with command names. m, l - first line and height of the debugger window.</blockquote>
 +
 +
== trace.on(); ==
 +
 +
<blockquote>Turns on the debugger. In general, the debugger is turned on with Scroll Lock key when the command name table is loaded even if this command does not occur in the program.</blockquote>
 +
 +
== log(n); ==
 +
 +
<blockquote>This is a debugging command. It writes a log message in a file: Room [current room] Input line [current input line] followed by the message number n.</blockquote>
  
 
&nbsp;
 
&nbsp;

Revision as of 22:51, 22 December 2013

Tutorials Table of Contents
AGI Command Reference Index

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


Initialization Commands
By Chris Cromer

 


set.key(s, c);

Set interpreter's special key.


c - code (decimal number from 0 to 255);
s - if the key is a regular, or Ctrl+key pair, the ASCII code (for example, 0009h - TAB);
- if the key is functional or Alt+key pair, the corresponding scan-code in the high byte of s.


For example, the scan code of F1 is 3b00h, Alt+Z - 2c00h, etc.

set.game.id(n);

Message n is scanned by the interpreter and compared with its internal identifier. On mismatch, the program exits.

script.size(n);

Sets the size of script table in bytes. Script table stores codes of some interpreter commands. It is needed to the interpreter can correctly reload resources when restore_game is executed.

trace.info(n, m, l);

Sets the built-in debugger parameters n - number of LOGIC resource with command names. m, l - first line and height of the debugger window.

trace.on();

Turns on the debugger. In general, the debugger is turned on with Scroll Lock key when the command name table is loaded even if this command does not occur in the program.

log(n);

This is a debugging command. It writes a log message in a file: Room [current room] Input line [current input line] followed by the message number n.

 

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


Tutorials Table of Contents
AGI Command Reference Index

< Previous: String Management CommandsNext: Menu Management Commands >