16
17
18
19
20
21
22
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
* Key name: A name with <tt>'</tt> at first. You can't define your own; see [Hero Mesh key name] for a list. These are not necessarily bound to the same physical keys that they are named, however.
Also:
* Names: All names are case-sensitive. Valid characters include all digits 0 to 9, letters A to Z and a to z, plus, minus, underscore, question mark, period, forward slash, and asterisk.
* Prefixes: Many kind of tokens also accept a <tt>=</tt> and/or <tt>,</tt> prefix. These are used as modifiers to indicate the use in a different case.
* Comments: Start with <tt>;</tt> (outside of a string literal) and up to the next line break is a comment.
* Macros: See [Preprocessor].
<h2>Top level blocks</h2>
At the top level (outside of any other blocks, and after the preprocessor has run, if any), the following kind of blocks are possible (all must be in parentheses):
* Class definition: The first token is the class name. See below section for details. Each class must be defined only once.
* Global user variable: The first token is the global variable name, and second is the initial value (a constant). If not specified, the initial value is zero. Example: <tt>(@money 100)</tt>
* Background color: Something like <tt>(Backgroud 1)</tt> but replace 1 with the background colour from 0 to 255 (the default value is 1).
* Max animation steps: Something like <tt>(Animate 32)</tt> but replace 32 with the maxinum number of animation steps allowed, from 1 to 256. The default value is 32.
* Volume: Something like <tt>(Volume 10000)</tt> but instead of 10000 you can specify a different number; the default value is 10000. Any number can be used; this determines the volume limit to move diagonally between objects.
* Default message handler: A message block like in a class definition, but no local user variables are allowed. If the class does not include this message lock, then this one is used by default. If no message block is defined at all, then the message does nothing and always returns zero.
* Function: A function definition. The first token is a user function name (such as <tt>&AddScore</tt>), and then the instructions for that function. No local user variables are allowed.
<h2>Constants</h2>
Where a constant value (of any type) is expected, you may use any of the following:
* Number
* Direction
* String
* Key code
* Class
* Message
* Sound
* Bit constant
|