File: special_variables.html

package info (click to toggle)
agistudio 1.2.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,600 kB
  • ctags: 1,506
  • sloc: cpp: 16,676; makefile: 53
file content (93 lines) | stat: -rw-r--r-- 3,687 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<HTML>
<HEAD>
<TITLE>Special variables</TITLE></HEAD>
<BODY>
<h1>Special variables</h1>
Some variables have special meaning to the interpreter:<p>
<pre>
Var Define name in template game Description
-------------------------------------------------------------------
 0  room_no                      Number of the current room

 1  prev_room_no                 Number of the previous room

 2  ego_edge_code                Which edge of the screen ego is touching
                                 0: not touching edge
                                 1: horizon
                                 2: right edge
                                 3: bottom edge
                                 4: left edge

 3  score                        Current score

 4  object_touching_edge         Number of an object other than ego that is
                                 touching the edge.

 5  object_edge_code             See ego_edge_code

 6  ego_dir                      Direction of ego's motion (see "Moving
                                 Objects" for a list of directions).

 7  max_score                    Maxmimum score

 8  free_memory                  The number of 256-byte lots of free memory
                                 available for resources.

                                 If the player has entered an unknown word,
 9  unknown_word_no              this is set to the number of that word
                                 (i.e. 2 if it's the second word entered).
                                 Otherwise, this is 0.

 10 cycle_delay                  Delay between interpreter cycles (*1/20
                                 second)

                                 Number of seconds on the interpreter's
 11 clock_seconds                clock (the clock is reset when the game
                                 starts).

 12 clock_minutes                Number of minutes on the interpreter's
                                 clock

 13 clock_hours                  Number of hours on the interpreter's clock

 14 clock_days                   Number of days on the interpreter's clock

 15 joystick_sensitivity         Sensitivity of the joystick

 16 ego_view_no                  Number of the view assigned to ego

 17 error_code                   What type of error has occured

 18 error_information            Extra information about the error

 19 key_pressed                  The ASCII code of the key that has just
                                 been pressed, if any

 20 computer_type                Type of computer (0=PC)

                                 Number of half-seconds to wait before
 21 window_close_time            closing a window (if 0, the window remains
                                 on screen until the user presses a key).

 22 sound_type                   Sound generator type. (PC=1,Tandy=3)

 23 sound_volume                 Volume of the sound

 24 (unknown)                    Always seems to be set to 41

                                 If the player has selected an inventory
 25 selected_inventory_item      item from the inventory screen, this is
                                 set to the number of that item (or 255 if
                                 ESC was pressed).

                                 Video mode:
                                 0: CGA (black-cyan-magenta-white CGA
                                 palette)
 26 video_mode                   1: RGB (blue-yellow-red-green CGA palette)
                                 2: Hercules
                                 3: EGA
                                 4: VGA
</pre>
<B>See also</B><p>
<a href="special_flags.html">Special flags</a><p>
</BODY></HTML>