inform6lib 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +125 -0
- data/Rakefile +65 -0
- data/lib/inform/English.h.rb +1279 -0
- data/lib/inform/Grammar.h.inf.rb +350 -0
- data/lib/inform/Parser.h.rb +145 -0
- data/lib/inform/VerbLib.h.rb +77 -0
- data/lib/inform/infix.h.inf.rb +58 -0
- data/lib/inform/infix.h.rb +1064 -0
- data/lib/inform/linklpa.h.rb +139 -0
- data/lib/inform/linklv.h.rb +174 -0
- data/lib/inform/parserm.h.rb +5884 -0
- data/lib/inform/verblibm.h.rb +2481 -0
- metadata +57 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# frozen_string_literal: false
|
|
3
|
+
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# GRAMMAR: Grammar table entries for the standard verbs library.
|
|
6
|
+
#
|
|
7
|
+
# Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
|
8
|
+
#
|
|
9
|
+
# Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
|
10
|
+
# ==============================================================================
|
|
11
|
+
|
|
12
|
+
# Copyright Nels Nelson 2008-2022 but freely usable (see license)
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the Artistic License
|
|
15
|
+
# along with the Inform6 Ruby Port.
|
|
16
|
+
#
|
|
17
|
+
# If not, see <https://www.perlfoundation.org/artistic-license-20.html>.
|
|
18
|
+
|
|
19
|
+
# ------------------------------------------------------------------------------
|
|
20
|
+
# The "meta-verbs", commands to the game rather than in the game, come first:
|
|
21
|
+
# ------------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
Verb meta 'brief' 'normal'
|
|
24
|
+
* -> LMode1;
|
|
25
|
+
Verb meta 'verbose' 'long'
|
|
26
|
+
* -> LMode2;
|
|
27
|
+
Verb meta 'superbrief' 'short'
|
|
28
|
+
* -> LMode3;
|
|
29
|
+
Verb meta 'notify'
|
|
30
|
+
* -> NotifyOn
|
|
31
|
+
* 'on' -> NotifyOn
|
|
32
|
+
* 'off' -> NotifyOff;
|
|
33
|
+
Verb meta 'pronouns' 'nouns'
|
|
34
|
+
* -> Pronouns;
|
|
35
|
+
Verb meta 'quit' 'q'
|
|
36
|
+
* -> Quit;
|
|
37
|
+
Verb meta 'recording'
|
|
38
|
+
* -> CommandsOn
|
|
39
|
+
* 'on' -> CommandsOn
|
|
40
|
+
* 'off' -> CommandsOff;
|
|
41
|
+
Verb meta 'replay'
|
|
42
|
+
* -> CommandsRead;
|
|
43
|
+
Verb meta 'restart'
|
|
44
|
+
* -> Restart;
|
|
45
|
+
Verb meta 'restore'
|
|
46
|
+
* -> Restore;
|
|
47
|
+
Verb meta 'save'
|
|
48
|
+
* -> Save;
|
|
49
|
+
Verb meta 'score'
|
|
50
|
+
* -> Score;
|
|
51
|
+
Verb meta 'fullscore' 'full'
|
|
52
|
+
* -> FullScore
|
|
53
|
+
* 'score' -> FullScore;
|
|
54
|
+
Verb meta 'script' 'transcript'
|
|
55
|
+
* -> ScriptOn
|
|
56
|
+
* 'on' -> ScriptOn
|
|
57
|
+
* 'off' -> ScriptOff;
|
|
58
|
+
Verb meta 'noscript' 'unscript'
|
|
59
|
+
* -> ScriptOff;
|
|
60
|
+
Verb meta 'verify'
|
|
61
|
+
* -> Verify;
|
|
62
|
+
Verb meta 'version'
|
|
63
|
+
* -> Version;
|
|
64
|
+
Verb meta 'places'
|
|
65
|
+
* -> Places;
|
|
66
|
+
|
|
67
|
+
# ------------------------------------------------------------------------------
|
|
68
|
+
# Debugging grammar
|
|
69
|
+
# ------------------------------------------------------------------------------
|
|
70
|
+
|
|
71
|
+
Verb meta 'actions'
|
|
72
|
+
* -> ActionsOn
|
|
73
|
+
* 'on' -> ActionsOn
|
|
74
|
+
* 'off' -> ActionsOff;
|
|
75
|
+
Verb meta 'changes'
|
|
76
|
+
* -> ChangesOn
|
|
77
|
+
* 'on' -> ChangesOn
|
|
78
|
+
* 'off' -> ChangesOff;
|
|
79
|
+
Verb meta 'gonear'
|
|
80
|
+
* noun -> Gonear;
|
|
81
|
+
Verb meta 'goto'
|
|
82
|
+
* number -> Goto;
|
|
83
|
+
Verb meta 'random'
|
|
84
|
+
* -> Predictable;
|
|
85
|
+
Verb meta 'routines' 'messages'
|
|
86
|
+
* -> RoutinesOn
|
|
87
|
+
* 'on' -> RoutinesOn
|
|
88
|
+
* 'off' -> RoutinesOff;
|
|
89
|
+
Verb meta 'scope'
|
|
90
|
+
* -> Scope
|
|
91
|
+
* noun -> Scope;
|
|
92
|
+
Verb meta 'showobj'
|
|
93
|
+
* -> Showobj
|
|
94
|
+
* number -> Showobj
|
|
95
|
+
* multi -> Showobj;
|
|
96
|
+
Verb meta 'showverb'
|
|
97
|
+
* special -> Showverb;
|
|
98
|
+
Verb meta 'timers' 'daemons'
|
|
99
|
+
* -> TimersOn
|
|
100
|
+
* 'on' -> TimersOn
|
|
101
|
+
* 'off' -> TimersOff;
|
|
102
|
+
Verb meta 'trace'
|
|
103
|
+
* -> TraceOn
|
|
104
|
+
* number -> TraceLevel
|
|
105
|
+
* 'on' -> TraceOn
|
|
106
|
+
* 'off' -> TraceOff;
|
|
107
|
+
Verb meta 'abstract'
|
|
108
|
+
* noun 'to' noun -> XAbstract;
|
|
109
|
+
Verb meta 'purloin'
|
|
110
|
+
* multi -> XPurloin;
|
|
111
|
+
Verb meta 'tree'
|
|
112
|
+
* -> XTree
|
|
113
|
+
* noun -> XTree;
|
|
114
|
+
|
|
115
|
+
# ------------------------------------------------------------------------------
|
|
116
|
+
# And now the game verbs.
|
|
117
|
+
# ------------------------------------------------------------------------------
|
|
118
|
+
|
|
119
|
+
Verb 'answer' 'say' 'shout' 'speak'
|
|
120
|
+
* topic 'to' creature -> Answer;
|
|
121
|
+
Verb 'ask'
|
|
122
|
+
* creature 'about' topic -> Ask
|
|
123
|
+
* creature 'for' noun -> AskFor
|
|
124
|
+
* creature 'to' topic -> AskTo
|
|
125
|
+
* 'that' creature topic -> AskTo;
|
|
126
|
+
Verb 'attack' 'break' 'crack' 'destroy'
|
|
127
|
+
'fight' 'hit' 'kill' 'murder' 'punch'
|
|
128
|
+
'smash' 'thump' 'torture' 'wreck'
|
|
129
|
+
* noun -> Attack;
|
|
130
|
+
Verb 'blow'
|
|
131
|
+
* held -> Blow;
|
|
132
|
+
Verb 'bother' 'curses' 'darn' 'drat'
|
|
133
|
+
* -> Mild
|
|
134
|
+
* topic -> Mild;
|
|
135
|
+
Verb 'burn' 'light'
|
|
136
|
+
* noun -> Burn
|
|
137
|
+
* noun 'with' held -> Burn;
|
|
138
|
+
Verb 'buy' 'purchase'
|
|
139
|
+
* noun -> Buy;
|
|
140
|
+
Verb 'climb' 'scale'
|
|
141
|
+
* noun -> Climb
|
|
142
|
+
* 'up'/'over' noun -> Climb;
|
|
143
|
+
Verb 'close' 'cover' 'shut'
|
|
144
|
+
* noun -> Close
|
|
145
|
+
* 'up' noun -> Close
|
|
146
|
+
* 'off' noun -> Switchoff;
|
|
147
|
+
Verb 'consult'
|
|
148
|
+
* noun 'about' topic -> Consult
|
|
149
|
+
* noun 'on' topic -> Consult;
|
|
150
|
+
Verb 'cut' 'chop' 'prune' 'slice'
|
|
151
|
+
* noun -> Cut;
|
|
152
|
+
Verb 'dig'
|
|
153
|
+
* noun -> Dig
|
|
154
|
+
* noun 'with' held -> Dig;
|
|
155
|
+
Verb 'drink' 'sip' 'swallow'
|
|
156
|
+
* noun -> Drink;
|
|
157
|
+
Verb 'drop' 'discard' 'throw'
|
|
158
|
+
* multiheld -> Drop
|
|
159
|
+
* multiexcept 'in'/'into'/'down' noun -> Insert
|
|
160
|
+
* multiexcept 'on'/'onto' noun -> PutOn
|
|
161
|
+
* held 'at'/'against'/'on'/'onto' noun -> ThrowAt;
|
|
162
|
+
Verb 'eat'
|
|
163
|
+
* held -> Eat;
|
|
164
|
+
Verb 'empty'
|
|
165
|
+
* noun -> Empty
|
|
166
|
+
* 'out' noun -> Empty
|
|
167
|
+
* noun 'out' -> Empty
|
|
168
|
+
* noun 'to'/'into'/'on'/'onto' noun -> EmptyT;
|
|
169
|
+
Verb 'enter' 'cross'
|
|
170
|
+
* -> GoIn
|
|
171
|
+
* noun -> Enter;
|
|
172
|
+
Verb 'examine' 'x' 'check' 'describe' 'watch'
|
|
173
|
+
* noun -> Examine;
|
|
174
|
+
Verb 'exit' 'out' 'outside'
|
|
175
|
+
* -> Exit
|
|
176
|
+
* noun -> Exit;
|
|
177
|
+
Verb 'fill'
|
|
178
|
+
* noun -> Fill;
|
|
179
|
+
Verb 'get'
|
|
180
|
+
* 'out'/'off'/'up' -> Exit
|
|
181
|
+
* multi -> Take
|
|
182
|
+
* 'in'/'into'/'on'/'onto' noun -> Enter
|
|
183
|
+
* 'off' noun -> GetOff
|
|
184
|
+
* multiinside 'from' noun -> Remove;
|
|
185
|
+
Verb 'give' 'feed' 'offer' 'pay'
|
|
186
|
+
* held 'to' creature -> Give
|
|
187
|
+
* creature held -> Give reverse
|
|
188
|
+
* 'over' held 'to' creature -> Give;
|
|
189
|
+
Verb 'go' 'run' 'walk'
|
|
190
|
+
* -> VagueGo
|
|
191
|
+
* noun=ADirection -> Go
|
|
192
|
+
* noun -> Enter
|
|
193
|
+
* 'into'/'in'/'inside'/'through' noun -> Enter;
|
|
194
|
+
Verb 'in' 'inside'
|
|
195
|
+
* -> GoIn;
|
|
196
|
+
Verb 'insert'
|
|
197
|
+
* multiexcept 'in'/'into' noun -> Insert;
|
|
198
|
+
Verb 'inventory' 'inv' 'i'
|
|
199
|
+
* -> Inv
|
|
200
|
+
* 'tall' -> InvTall
|
|
201
|
+
* 'wide' -> InvWide;
|
|
202
|
+
Verb 'jump' 'hop' 'skip'
|
|
203
|
+
* -> Jump
|
|
204
|
+
* 'over' noun -> JumpOver;
|
|
205
|
+
Verb 'kiss' 'embrace' 'hug'
|
|
206
|
+
* creature -> Kiss;
|
|
207
|
+
Verb 'leave'
|
|
208
|
+
* -> VagueGo
|
|
209
|
+
* noun=ADirection -> Go
|
|
210
|
+
* noun -> Exit
|
|
211
|
+
* 'into'/'in'/'inside'/'through' noun -> Enter;
|
|
212
|
+
Verb 'listen' 'hear'
|
|
213
|
+
* -> Listen
|
|
214
|
+
* noun -> Listen
|
|
215
|
+
* 'to' noun -> Listen;
|
|
216
|
+
Verb 'lock'
|
|
217
|
+
* noun 'with' held -> Lock;
|
|
218
|
+
Verb 'look' 'l'
|
|
219
|
+
* -> Look
|
|
220
|
+
* 'at' noun -> Examine
|
|
221
|
+
* 'inside'/'in'/'into'/'through'/'on' noun -> Search
|
|
222
|
+
* 'under' noun -> LookUnder
|
|
223
|
+
* 'up' topic 'in' noun -> Consult
|
|
224
|
+
* noun=ADirection -> Examine
|
|
225
|
+
* 'to' noun=ADirection -> Examine;
|
|
226
|
+
Verb 'no'
|
|
227
|
+
* -> No;
|
|
228
|
+
Verb 'open' 'uncover' 'undo' 'unwrap'
|
|
229
|
+
* noun -> Open
|
|
230
|
+
* noun 'with' held -> Unlock;
|
|
231
|
+
Verb 'peel'
|
|
232
|
+
* noun -> Take
|
|
233
|
+
* 'off' noun -> Take;
|
|
234
|
+
Verb 'pick'
|
|
235
|
+
* 'up' multi -> Take
|
|
236
|
+
* multi 'up' -> Take;
|
|
237
|
+
Verb 'pray'
|
|
238
|
+
* -> Pray;
|
|
239
|
+
Verb 'pry' 'prise' 'prize' 'lever' 'jemmy' 'force'
|
|
240
|
+
* noun 'with' held -> Unlock
|
|
241
|
+
* 'apart'/'open' noun 'with' held -> Unlock
|
|
242
|
+
* noun 'apart'/'open' 'with' held -> Unlock;
|
|
243
|
+
Verb 'pull' 'drag'
|
|
244
|
+
* noun -> Pull;
|
|
245
|
+
Verb 'push' 'clear' 'move' 'press' 'shift'
|
|
246
|
+
* noun -> Push
|
|
247
|
+
* noun noun -> PushDir
|
|
248
|
+
* noun 'to' noun -> Transfer;
|
|
249
|
+
Verb 'put'
|
|
250
|
+
* multiexcept 'in'/'inside'/'into' noun -> Insert
|
|
251
|
+
* multiexcept 'on'/'onto' noun -> PutOn
|
|
252
|
+
* 'on' held -> Wear
|
|
253
|
+
* 'down' multiheld -> Drop
|
|
254
|
+
* multiheld 'down' -> Drop;
|
|
255
|
+
Verb 'read'
|
|
256
|
+
* noun -> Examine
|
|
257
|
+
* 'about' topic 'in' noun -> Consult
|
|
258
|
+
* topic 'in' noun -> Consult;
|
|
259
|
+
Verb 'remove'
|
|
260
|
+
* held -> Disrobe
|
|
261
|
+
* multi -> Take
|
|
262
|
+
* multiinside 'from' noun -> Remove;
|
|
263
|
+
Verb 'rub' 'clean' 'dust' 'polish' 'scrub'
|
|
264
|
+
'shine' 'sweep' 'wipe'
|
|
265
|
+
* noun -> Rub;
|
|
266
|
+
Verb 'search'
|
|
267
|
+
* noun -> Search;
|
|
268
|
+
Verb 'set' 'adjust'
|
|
269
|
+
* noun -> Set
|
|
270
|
+
* noun 'to' special -> SetTo;
|
|
271
|
+
Verb 'shed' 'disrobe' 'doff'
|
|
272
|
+
* held -> Disrobe;
|
|
273
|
+
Verb 'show' 'display' 'present'
|
|
274
|
+
* creature held -> Show reverse
|
|
275
|
+
* held 'to' creature -> Show;
|
|
276
|
+
Verb 'shit' 'damn' 'fuck' 'sod'
|
|
277
|
+
* -> Strong
|
|
278
|
+
* topic -> Strong;
|
|
279
|
+
Verb 'sing'
|
|
280
|
+
* -> Sing;
|
|
281
|
+
Verb 'sit' 'lie'
|
|
282
|
+
* 'on' 'top' 'of' noun -> Enter
|
|
283
|
+
* 'on'/'in'/'inside' noun -> Enter;
|
|
284
|
+
Verb 'sleep' 'nap'
|
|
285
|
+
* -> Sleep;
|
|
286
|
+
Verb 'smell' 'sniff'
|
|
287
|
+
* -> Smell
|
|
288
|
+
* noun -> Smell;
|
|
289
|
+
Verb 'sorry'
|
|
290
|
+
* -> Sorry;
|
|
291
|
+
Verb 'squeeze' 'squash'
|
|
292
|
+
* noun -> Squeeze;
|
|
293
|
+
Verb 'stand'
|
|
294
|
+
* -> Exit
|
|
295
|
+
* 'up' -> Exit
|
|
296
|
+
* 'on' noun -> Enter;
|
|
297
|
+
Verb 'swim' 'dive'
|
|
298
|
+
* -> Swim;
|
|
299
|
+
Verb 'swing'
|
|
300
|
+
* noun -> Swing
|
|
301
|
+
* 'on' noun -> Swing;
|
|
302
|
+
Verb 'switch'
|
|
303
|
+
* noun -> Switchon
|
|
304
|
+
* noun 'on' -> Switchon
|
|
305
|
+
* noun 'off' -> Switchoff
|
|
306
|
+
* 'on' noun -> Switchon
|
|
307
|
+
* 'off' noun -> Switchoff;
|
|
308
|
+
Verb 'take' 'carry' 'hold'
|
|
309
|
+
* multi -> Take
|
|
310
|
+
* 'off' worn -> Disrobe
|
|
311
|
+
* multiinside 'from' noun -> Remove
|
|
312
|
+
* multiinside 'off' noun -> Remove
|
|
313
|
+
* 'inventory' -> Inv;
|
|
314
|
+
Verb 'taste'
|
|
315
|
+
* noun -> Taste;
|
|
316
|
+
Verb 'tell'
|
|
317
|
+
* creature 'about' topic -> Tell
|
|
318
|
+
* creature 'to' topic -> AskTo;
|
|
319
|
+
Verb 'think'
|
|
320
|
+
* -> Think;
|
|
321
|
+
Verb 'tie' 'attach' 'fasten' 'fix'
|
|
322
|
+
* noun -> Tie
|
|
323
|
+
* noun 'to' noun -> Tie;
|
|
324
|
+
Verb 'touch' 'feel' 'fondle' 'grope'
|
|
325
|
+
* noun -> Touch;
|
|
326
|
+
Verb 'transfer'
|
|
327
|
+
* noun 'to' noun -> Transfer;
|
|
328
|
+
Verb 'turn' 'rotate' 'screw' 'twist' 'unscrew'
|
|
329
|
+
* noun -> Turn
|
|
330
|
+
* noun 'on' -> Switchon
|
|
331
|
+
* noun 'off' -> Switchoff
|
|
332
|
+
* 'on' noun -> Switchon
|
|
333
|
+
* 'off' noun -> Switchoff;
|
|
334
|
+
Verb 'wave'
|
|
335
|
+
* -> WaveHands
|
|
336
|
+
* noun -> Wave;
|
|
337
|
+
Verb 'wear' 'don'
|
|
338
|
+
* held -> Wear;
|
|
339
|
+
Verb 'yes' 'y'
|
|
340
|
+
* -> Yes;
|
|
341
|
+
Verb 'unlock'
|
|
342
|
+
* noun 'with' held -> Unlock;
|
|
343
|
+
Verb 'wait' 'z'
|
|
344
|
+
* -> Wait;
|
|
345
|
+
Verb 'wake' 'awake' 'awaken'
|
|
346
|
+
* -> Wake
|
|
347
|
+
* 'up' -> Wake
|
|
348
|
+
* creature -> WakeOther
|
|
349
|
+
* creature 'up' -> WakeOther
|
|
350
|
+
* 'up' creature -> WakeOther;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# frozen_string_literal: false
|
|
3
|
+
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# PARSER: Front end to parser.
|
|
6
|
+
#
|
|
7
|
+
# Supplied for use with Inform 6/7 -- Release 6/11N -- Serial number 060709
|
|
8
|
+
#
|
|
9
|
+
# Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
|
10
|
+
#
|
|
11
|
+
# In your game file, Include three library files in this order:
|
|
12
|
+
# Include "Parser";
|
|
13
|
+
# Include "VerbLib";
|
|
14
|
+
# Include "Grammar";
|
|
15
|
+
# ==============================================================================
|
|
16
|
+
|
|
17
|
+
# Copyright Nels Nelson 2008-2022 but freely usable (see license)
|
|
18
|
+
#
|
|
19
|
+
# You should have received a copy of the Artistic License
|
|
20
|
+
# along with the Inform6 Ruby Port.
|
|
21
|
+
#
|
|
22
|
+
# If not, see <https://www.perlfoundation.org/artistic-license-20.html>.
|
|
23
|
+
|
|
24
|
+
# System_file
|
|
25
|
+
|
|
26
|
+
# ------------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
LibSerial = "060709".freeze
|
|
29
|
+
LibRelease = "6/11N".freeze
|
|
30
|
+
LIBRARY_VERSION = 611
|
|
31
|
+
Grammar__Version = 2
|
|
32
|
+
|
|
33
|
+
COMMENT_CHARACTER = '*'.freeze
|
|
34
|
+
|
|
35
|
+
if defined? INFIX
|
|
36
|
+
DEBUG = 0
|
|
37
|
+
end
|
|
38
|
+
# INFIX
|
|
39
|
+
|
|
40
|
+
unless defined? WORDSIZE # compiling with Z-code only compiler
|
|
41
|
+
TARGET_ZCODE = true
|
|
42
|
+
WORDSIZE = 2
|
|
43
|
+
end
|
|
44
|
+
# WORDSIZE
|
|
45
|
+
|
|
46
|
+
if defined? TARGET_ZCODE # offsets into Z-machine header
|
|
47
|
+
|
|
48
|
+
HDR_ZCODEVERSION = 0x00 # byte
|
|
49
|
+
HDR_TERPFLAGS = 0x01 # byte
|
|
50
|
+
HDR_GAMERELEASE = 0x02 # word
|
|
51
|
+
HDR_HIGHMEMORY = 0x04 # word
|
|
52
|
+
HDR_INITIALPC = 0x06 # word
|
|
53
|
+
HDR_DICTIONARY = 0x08 # word
|
|
54
|
+
HDR_OBJECTS = 0x0A # word
|
|
55
|
+
HDR_GLOBALS = 0x0C # word
|
|
56
|
+
HDR_STATICMEMORY = 0x0E # word
|
|
57
|
+
HDR_GAMEFLAGS = 0x10 # word
|
|
58
|
+
HDR_GAMESERIAL = 0x12 # six ASCII characters
|
|
59
|
+
HDR_ABBREVIATIONS = 0x18 # word
|
|
60
|
+
HDR_FILELENGTH = 0x1A # word
|
|
61
|
+
HDR_CHECKSUM = 0x1C # word
|
|
62
|
+
HDR_TERPNUMBER = 0x1E # byte
|
|
63
|
+
HDR_TERPVERSION = 0x1F # byte
|
|
64
|
+
HDR_SCREENHLINES = 0x20 # byte
|
|
65
|
+
HDR_SCREENWCHARS = 0x21 # byte
|
|
66
|
+
HDR_SCREENWUNITS = 0x22 # word
|
|
67
|
+
HDR_SCREENHUNITS = 0x24 # word
|
|
68
|
+
HDR_FONTWUNITS = 0x26 # byte
|
|
69
|
+
HDR_FONTHUNITS = 0x27 # byte
|
|
70
|
+
HDR_ROUTINEOFFSET = 0x28 # word
|
|
71
|
+
HDR_STRINGOFFSET = 0x2A # word
|
|
72
|
+
HDR_BGCOLOUR = 0x2C # byte
|
|
73
|
+
HDR_FGCOLOUR = 0x2D # byte
|
|
74
|
+
HDR_TERMCHARS = 0x2E # word
|
|
75
|
+
HDR_PIXELSTO3 = 0x30 # word
|
|
76
|
+
HDR_TERPSTANDARD = 0x32 # two bytes
|
|
77
|
+
HDR_ALPHABET = 0x34 # word
|
|
78
|
+
HDR_EXTENSION = 0x36 # word
|
|
79
|
+
HDR_UNUSED = 0x38 # two words
|
|
80
|
+
HDR_INFORMVERSION = 0x3C # four ASCII characters
|
|
81
|
+
|
|
82
|
+
else # TARGET_GLULX # offsets into Glulx header and start of ROM
|
|
83
|
+
|
|
84
|
+
HDR_MAGICNUMBER = 0x00 # long word
|
|
85
|
+
HDR_GLULXVERSION = 0x04 # long word
|
|
86
|
+
HDR_RAMSTART = 0x08 # long word
|
|
87
|
+
HDR_EXTSTART = 0x0C # long word
|
|
88
|
+
HDR_ENDMEM = 0x10 # long word
|
|
89
|
+
HDR_STACKSIZE = 0x14 # long word
|
|
90
|
+
HDR_STARTFUNC = 0x18 # long word
|
|
91
|
+
HDR_DECODINGTBL = 0x1C # long word
|
|
92
|
+
HDR_CHECKSUM = 0x20 # long word
|
|
93
|
+
ROM_INFO = 0x24 # four ASCII characters
|
|
94
|
+
ROM_MEMORYLAYOUT = 0x28 # long word
|
|
95
|
+
ROM_INFORMVERSION = 0x2C # four ASCII characters
|
|
96
|
+
ROM_COMPVERSION = 0x30 # four ASCII characters
|
|
97
|
+
ROM_GAMERELEASE = 0x34 # short word
|
|
98
|
+
ROM_GAMESERIAL = 0x36 # six ASCII characters
|
|
99
|
+
|
|
100
|
+
end
|
|
101
|
+
# ! defined? TARGET_
|
|
102
|
+
|
|
103
|
+
if defined? VN_1610
|
|
104
|
+
Message(fatalerror: "*** Library 6/11 needs Inform v6.10 or later to work ***")
|
|
105
|
+
end
|
|
106
|
+
# defined? VN_1610
|
|
107
|
+
|
|
108
|
+
Include "linklpa"
|
|
109
|
+
|
|
110
|
+
def LetGo; end
|
|
111
|
+
def Receive; end
|
|
112
|
+
def ThrownAt; end
|
|
113
|
+
def Order; end
|
|
114
|
+
def TheSame; end
|
|
115
|
+
def PluralFound; end
|
|
116
|
+
def ListMiscellany; end
|
|
117
|
+
def Miscellany; end
|
|
118
|
+
def Prompt; end
|
|
119
|
+
def NotUnderstood; end
|
|
120
|
+
|
|
121
|
+
if defined? NO_PLACES
|
|
122
|
+
def Places; end
|
|
123
|
+
def Objects; end
|
|
124
|
+
end
|
|
125
|
+
# NO_PLACES
|
|
126
|
+
|
|
127
|
+
# ------------------------------------------------------------------------------
|
|
128
|
+
|
|
129
|
+
def Main; InformLibrary.play(); end
|
|
130
|
+
log.debug "Defined #{self.class}#{self.object_id}#Main() method!"
|
|
131
|
+
|
|
132
|
+
# ------------------------------------------------------------------------------
|
|
133
|
+
|
|
134
|
+
if defined? USE_MODULES
|
|
135
|
+
Link "parserm"
|
|
136
|
+
else
|
|
137
|
+
Include "parserm"
|
|
138
|
+
end
|
|
139
|
+
# defined? USE_MODULES
|
|
140
|
+
|
|
141
|
+
# ==============================================================================
|
|
142
|
+
|
|
143
|
+
LIBRARY_PARSER = true # for dependency checking
|
|
144
|
+
|
|
145
|
+
# ==============================================================================
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# frozen_string_literal: false
|
|
3
|
+
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# VERBLIB: Front end to standard verbs library.
|
|
6
|
+
#
|
|
7
|
+
# Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
|
8
|
+
#
|
|
9
|
+
# Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
|
10
|
+
#
|
|
11
|
+
# In your game file, Include three library files in this order:
|
|
12
|
+
# Include "Parser";
|
|
13
|
+
# Include "VerbLib";
|
|
14
|
+
# Include "Grammar";
|
|
15
|
+
# ==============================================================================
|
|
16
|
+
|
|
17
|
+
# Copyright Nels Nelson 2008-2022 but freely usable (see license)
|
|
18
|
+
#
|
|
19
|
+
# You should have received a copy of the Artistic License
|
|
20
|
+
# along with the Inform6 Ruby Port.
|
|
21
|
+
#
|
|
22
|
+
# If not, see <https://www.perlfoundation.org/artistic-license-20.html>.
|
|
23
|
+
|
|
24
|
+
# The Inform module
|
|
25
|
+
module Inform
|
|
26
|
+
Default :AMUSING_PROVIDED, 1
|
|
27
|
+
Default :MAX_CARRIED, 100
|
|
28
|
+
Default :MAX_SCORE, 0
|
|
29
|
+
Default :NUMBER_TASKS, 1
|
|
30
|
+
Default :OBJECT_SCORE, 4
|
|
31
|
+
Default :ROOM_SCORE, 5
|
|
32
|
+
Default :SACK_OBJECT, 0
|
|
33
|
+
Default :TASKS_PROVIDED, 1
|
|
34
|
+
|
|
35
|
+
# The Verbs module
|
|
36
|
+
module Verbs
|
|
37
|
+
unless defined? task_scores
|
|
38
|
+
MAKE__TS = true
|
|
39
|
+
end
|
|
40
|
+
if defined? MAKE__TS
|
|
41
|
+
TASK_SCORES = { scores: [0, 0, 0, 0] }.freeze
|
|
42
|
+
def task_scores
|
|
43
|
+
TASK_SCORES[:scores]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
TASK_DONE = { tasks: [] }.freeze
|
|
48
|
+
def task_done
|
|
49
|
+
TASK_DONE[:tasks]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
unless defined? LibraryMessages
|
|
53
|
+
LibraryMessages = Inform::System::Object.new
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
unless defined? NO_PLACES
|
|
57
|
+
def ObjectsSub; Objects1Sub(); end
|
|
58
|
+
def PlacesSub; Places1Sub(); end
|
|
59
|
+
end
|
|
60
|
+
# !defined? NO_PLACES
|
|
61
|
+
end
|
|
62
|
+
# module Verbs
|
|
63
|
+
end
|
|
64
|
+
# module Inform
|
|
65
|
+
|
|
66
|
+
if defined? USE_MODULES
|
|
67
|
+
Link "verblibm"
|
|
68
|
+
else
|
|
69
|
+
Include "verblibm"
|
|
70
|
+
end
|
|
71
|
+
# defined? USE_MODULES
|
|
72
|
+
|
|
73
|
+
# ==============================================================================
|
|
74
|
+
|
|
75
|
+
LIBRARY_VERBLIB = true # for dependency checking
|
|
76
|
+
|
|
77
|
+
# ==============================================================================
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# frozen_string_literal: false
|
|
3
|
+
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# INFIX: Support for the optional library debugger extension "Infix".
|
|
6
|
+
#
|
|
7
|
+
# Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
|
8
|
+
#
|
|
9
|
+
# Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
|
10
|
+
#
|
|
11
|
+
# This file is automatically Included in your game file by "Grammar" if you
|
|
12
|
+
# supply the -X compiler switch.
|
|
13
|
+
# ==============================================================================
|
|
14
|
+
|
|
15
|
+
# Copyright Nels Nelson 2008-2022 but freely usable (see license)
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the Artistic License
|
|
18
|
+
# along with the Inform6 Ruby Port.
|
|
19
|
+
#
|
|
20
|
+
# If not, see <https://www.perlfoundation.org/artistic-license-20.html>.
|
|
21
|
+
|
|
22
|
+
# ------------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
Verb meta ';i' ';inv' ';inventory'
|
|
25
|
+
* -> InfixInv;
|
|
26
|
+
Verb meta ';x' ';examine'
|
|
27
|
+
* InfixRvalue -> InfixExamine;
|
|
28
|
+
Verb meta ';xo' ';examineo'
|
|
29
|
+
* InfixRvalue -> InfixExamineO;
|
|
30
|
+
Verb meta ';xs' ';examines'
|
|
31
|
+
* InfixRvalue -> InfixExamineS;
|
|
32
|
+
Verb meta ';<'
|
|
33
|
+
* InfixActionToken -> InfixAction
|
|
34
|
+
* InfixActionToken InfixRvalue -> InfixAction
|
|
35
|
+
* InfixActionToken InfixRvalue InfixRvalue -> InfixAction;
|
|
36
|
+
Verb meta ';//'
|
|
37
|
+
* -> InfixWelcome
|
|
38
|
+
* InfixRvalue -> InfixEval;
|
|
39
|
+
Verb meta ';give'
|
|
40
|
+
* InfixRvalue InfixRvalue -> InfixGive;
|
|
41
|
+
Verb meta ';move'
|
|
42
|
+
* InfixRvalue "to" InfixRvalue -> InfixMove;
|
|
43
|
+
Verb meta ';remove'
|
|
44
|
+
* InfixRvalue -> InfixRemove;
|
|
45
|
+
Verb meta ';watch' ';w'
|
|
46
|
+
* -> InfixWatchOn
|
|
47
|
+
* "timers"/"daemons" -> TimersOn
|
|
48
|
+
* "timers"/"daemons" "off" -> TimersOff
|
|
49
|
+
* "actions" -> ActionsOn
|
|
50
|
+
* "actions" "off" -> ActionsOff
|
|
51
|
+
* "messages" -> RoutinesOn
|
|
52
|
+
* "messages" "off" -> RoutinesOff
|
|
53
|
+
* "objects" -> ChangesOn
|
|
54
|
+
* "objects" "off" -> ChangesOff
|
|
55
|
+
* InfixRvalueTerm -> InfixWatchOn
|
|
56
|
+
* InfixRvalueTerm "off" -> InfixWatchOff;
|
|
57
|
+
|
|
58
|
+
# ==============================================================================
|