aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/jacl/constants.h
blob: f7c00d10d628add71745a282fed1d798bfd77e65 (plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/* ScummVM - Graphic Adventure Engine
 *
 * ScummVM is the legal property of its developers, whose names
 * are too numerous to list here. Please refer to the COPYRIGHT
 * file distributed with this source distribution.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 */

namespace Glk {
namespace JACL {

#define MAX_WORDS               20
#define STACK_SIZE              20
#define MAX_UNDO                100
#define MAX_OBJECTS             1000

/* LOCATION ATTRIBUTE VALUES */

#define VISITED         1
#define DARK            2
#define ON_WATER        4
#define UNDER_WATER     8
#define WITHOUT_AIR     16
#define OUTDOORS        32
#define MID_AIR         64
#define TIGHT_ROPE      128
#define POLLUTED        256
#define SOLVED          512
#define MID_WATER       1024
#define DARKNESS        2048
#define MAPPED          4096
#define KNOWN           8192

/* OBJECT ATTRIBUTE VALUES */

#define CLOSED          1
#define LOCKED          2
#define DEAD            4
#define IGNITABLE       8
#define WORN            16
#define CONCEALING      32
#define LUMINOUS        64
#define WEARABLE        128
#define CLOSABLE        256
#define LOCKABLE        512
#define ANIMATE         1024
#define LIQUID          2048
#define CONTAINER       4096
#define SURFACE         8192
#define PLURAL          16384
#define FLAMMABLE       32768
#define BURNING         65536
#define LOCATION        131072
#define ON              262144
#define DAMAGED         524288
#define FEMALE          1048576
#define POSSESSIVE      2097152
#define OUT_OF_REACH    4194304
#define TOUCHED         8388608
#define SCORED          16777216
#define SITTING         33554432
#define NPC             67108864
#define DONE            134217728
#define GAS             268435456
#define NO_TAB          536870912
#define NOT_IMPORTANT   1073741824

/* LOCATION INTEGER ARRAY INDEXES */

#define NORTH_DIR           0
#define SOUTH_DIR           1
#define EAST_DIR            2
#define WEST_DIR            3
#define NORTHEAST_DIR       4
#define NORTHWEST_DIR       5
#define SOUTHEAST_DIR       6
#define SOUTHWEST_DIR       7
#define UP_DIR              8
#define DOWN_DIR            9
#define IN_DIR              10
#define OUT_DIR             11

/* ALL UP, THERE ARE 16 OBJECT ELEMENTS, THESE 6
   ARE THE ONLY ONES ACCESSED BY THE INTERPRETER */

#define PARENT          integer[0]
#define QUANTITY        integer[1]
#define MASS            integer[2]
#define BEARING         integer[3]
#define VELOCITY        integer[4]
#define X               integer[14]
#define Y               integer[15]

/* SYSTEM VARIABLES */

#define COMPASS                 integer_resolve("compass")
#define DESTINATION             integer_resolve("destination")
#define TOTAL_MOVES             integer_resolve("total_moves")
#define TIME                    integer_resolve("time")
#define SCORE                   integer_resolve("score")
#define INTERNAL_VERSION        integer_resolve("internal_version")
#define DISPLAY_MODE            integer_resolve("display_mode")
#define MAX_RAND                integer_resolve("max_rand")
#define INTERRUPTED             integer_resolve("interrupted")
#define SOUND_ENABLED           integer_resolve("sound_enabled")
#define GRAPHICS_ENABLED        integer_resolve("graphics_enabled")
#define TIMER_ENABLED           integer_resolve("timer_enabled")
#define MULTI_PREFIX            integer_resolve("multi_prefix")
#define NOTIFY                  integer_resolve("notify")
#define DEBUG                   integer_resolve("debug")

/* SYSTEM INTEGER CONSTANTS */

#define SOUND_SUPPORTED         cinteger_resolve("sound_supported")
#define GRAPHICS_SUPPORTED      cinteger_resolve("graphics_supported")
#define TIMER_SUPPORTED         cinteger_resolve("timer_supported")

/* ABBREVIATIONS */

#define HELD                    player
#define HERE                    get_here()

/* CONSTANTS */

#define SYSTEM_ATTRIBUTE        0
#define USER_ATTRIBUTE          1

#define FALSE                   0
#define TRUE                    1

#define UNRESTRICT              0
#define RESTRICT                1

#define SEEK_SET                0

#define SEEK_END                2

#define SCENERY                 100
#define HEAVY                   99
#define NOWHERE                 0

#define LOG_ONLY                0
#define PLUS_STDOUT             1
#define PLUS_STDERR             2
#define ONLY_STDERR             3
#define ONLY_STDOUT             4

#define INT_TYPE                1
#define STR_TYPE                2
#define CINT_TYPE               3
#define CSTR_TYPE               4
#define ATT_TYPE                5
#define OBJ_TYPE                6

#define CRI_NONE                0
#define CRI_ATTRIBUTE           1
#define CRI_USER_ATTRIBUTE      2
#define CRI_PARENT              3
#define CRI_SCOPE               4

#define BOLD                    1
#define NOTE                    2
#define INPUT                   3
#define HEADER                  4
#define SUBHEADER               5
#define REVERSE                 6
#define PRE                     7

} // End of namespace JACL
} // End of namespace Glk