Начало - компилируется, но не работает
This commit is contained in:
commit
e2dff232f6
16
.editorconfig
Normal file
16
.editorconfig
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.inf]
|
||||||
|
charset = cp1251
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
out.z5
|
||||||
|
out.ulx
|
||||||
|
interpreter/main.css
|
||||||
|
interpreter/main.css.map
|
5
Makefile
Normal file
5
Makefile
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
all: glulx
|
||||||
|
glulx:
|
||||||
|
inform -D -DG -Cu +library-glulx +language_name=Russian '$$MAX_UNICODE_CHARS=1024' '$$MAX_STATIC_DATA=20000' '$$DICT_CHAR_SIZE=4' source.inf out.ulx
|
||||||
|
release:
|
||||||
|
inform -DG -Cu +library-glulx +language_name=Russian '$$MAX_UNICODE_CHARS=1024' '$$MAX_STATIC_DATA=20000' '$$DICT_CHAR_SIZE=4' source.inf out.ulx
|
941
library-glulx/English.h
Normal file
941
library-glulx/English.h
Normal file
|
@ -0,0 +1,941 @@
|
||||||
|
! ==============================================================================
|
||||||
|
! ENGLISH: Language Definition File
|
||||||
|
!
|
||||||
|
! Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
||||||
|
!
|
||||||
|
! Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
||||||
|
!
|
||||||
|
! This file is automatically Included in your game file by "parserm".
|
||||||
|
! Strictly, "parserm" includes the file named in the "language__" variable,
|
||||||
|
! whose contents can be defined by+language_name=XXX compiler setting (with a
|
||||||
|
! default of "english").
|
||||||
|
!
|
||||||
|
! Define the constant DIALECT_US before including "Parser" to obtain American
|
||||||
|
! English.
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! Part I. Preliminaries
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Constant EnglishNaturalLanguage; ! Needed to keep old pronouns mechanism
|
||||||
|
|
||||||
|
Class CompassDirection
|
||||||
|
with number 0, article "the",
|
||||||
|
description [;
|
||||||
|
if (location provides compass_look && location.compass_look(self)) rtrue;
|
||||||
|
if (self.compass_look()) rtrue;
|
||||||
|
L__M(##Look, 7, self);
|
||||||
|
],
|
||||||
|
compass_look false,
|
||||||
|
has scenery;
|
||||||
|
|
||||||
|
Object Compass "compass" has concealed;
|
||||||
|
|
||||||
|
#Ifndef WITHOUT_DIRECTIONS;
|
||||||
|
CompassDirection -> n_obj "north"
|
||||||
|
with door_dir n_to, name 'n//' 'north';
|
||||||
|
CompassDirection -> s_obj "south"
|
||||||
|
with door_dir s_to, name 's//' 'south';
|
||||||
|
CompassDirection -> e_obj "east"
|
||||||
|
with door_dir e_to, name 'e//' 'east';
|
||||||
|
CompassDirection -> w_obj "west"
|
||||||
|
with door_dir w_to, name 'w//' 'west';
|
||||||
|
CompassDirection -> ne_obj "northeast"
|
||||||
|
with door_dir ne_to, name 'ne' 'northeast';
|
||||||
|
CompassDirection -> nw_obj "northwest"
|
||||||
|
with door_dir nw_to, name 'nw' 'northwest';
|
||||||
|
CompassDirection -> se_obj "southeast"
|
||||||
|
with door_dir se_to, name 'se' 'southeast';
|
||||||
|
CompassDirection -> sw_obj "southwest"
|
||||||
|
with door_dir sw_to, name 'sw' 'southwest';
|
||||||
|
CompassDirection -> u_obj "up above"
|
||||||
|
with door_dir u_to, name 'u//' 'up' 'ceiling' 'above' 'sky';
|
||||||
|
CompassDirection -> d_obj "ground"
|
||||||
|
with door_dir d_to, name 'd//' 'down' 'floor' 'below' 'ground';
|
||||||
|
#endif; ! WITHOUT_DIRECTIONS
|
||||||
|
|
||||||
|
CompassDirection -> in_obj "inside"
|
||||||
|
with door_dir in_to, name 'in' 'inside';
|
||||||
|
CompassDirection -> out_obj "outside"
|
||||||
|
with door_dir out_to, name 'out' 'outside';
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! Part II. Vocabulary
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Constant AGAIN1__WD = 'again';
|
||||||
|
Constant AGAIN2__WD = 'g//';
|
||||||
|
Constant AGAIN3__WD = 'again';
|
||||||
|
Constant OOPS1__WD = 'oops';
|
||||||
|
Constant OOPS2__WD = 'o//';
|
||||||
|
Constant OOPS3__WD = 'oops';
|
||||||
|
Constant UNDO1__WD = 'undo';
|
||||||
|
Constant UNDO2__WD = 'undo';
|
||||||
|
Constant UNDO3__WD = 'undo';
|
||||||
|
|
||||||
|
Constant ALL1__WD = 'all';
|
||||||
|
Constant ALL2__WD = 'each';
|
||||||
|
Constant ALL3__WD = 'every';
|
||||||
|
Constant ALL4__WD = 'everything';
|
||||||
|
Constant ALL5__WD = 'both';
|
||||||
|
Constant AND1__WD = 'and';
|
||||||
|
Constant AND2__WD = 'and';
|
||||||
|
Constant AND3__WD = 'and';
|
||||||
|
Constant BUT1__WD = 'but';
|
||||||
|
Constant BUT2__WD = 'except';
|
||||||
|
Constant BUT3__WD = 'but';
|
||||||
|
Constant ME1__WD = 'me';
|
||||||
|
Constant ME2__WD = 'myself';
|
||||||
|
Constant ME3__WD = 'self';
|
||||||
|
Constant OF1__WD = 'of';
|
||||||
|
Constant OF2__WD = 'of';
|
||||||
|
Constant OF3__WD = 'of';
|
||||||
|
Constant OF4__WD = 'of';
|
||||||
|
Constant OTHER1__WD = 'another';
|
||||||
|
Constant OTHER2__WD = 'other';
|
||||||
|
Constant OTHER3__WD = 'other';
|
||||||
|
Constant THEN1__WD = 'then';
|
||||||
|
Constant THEN2__WD = 'then';
|
||||||
|
Constant THEN3__WD = 'then';
|
||||||
|
|
||||||
|
Constant NO1__WD = 'n//';
|
||||||
|
Constant NO2__WD = 'no';
|
||||||
|
Constant NO3__WD = 'no';
|
||||||
|
Constant YES1__WD = 'y//';
|
||||||
|
Constant YES2__WD = 'yes';
|
||||||
|
Constant YES3__WD = 'yes';
|
||||||
|
|
||||||
|
Constant AMUSING__WD = 'amusing';
|
||||||
|
Constant FULLSCORE1__WD = 'fullscore';
|
||||||
|
Constant FULLSCORE2__WD = 'full';
|
||||||
|
Constant QUIT1__WD = 'q//';
|
||||||
|
Constant QUIT2__WD = 'quit';
|
||||||
|
Constant RESTART__WD = 'restart';
|
||||||
|
Constant RESTORE__WD = 'restore';
|
||||||
|
|
||||||
|
Array LanguagePronouns table
|
||||||
|
|
||||||
|
! word possible GNAs connected
|
||||||
|
! to follow: to:
|
||||||
|
! a i
|
||||||
|
! s p s p
|
||||||
|
! mfnmfnmfnmfn
|
||||||
|
|
||||||
|
'it' $$001000111000 NULL
|
||||||
|
'him' $$100000000000 NULL
|
||||||
|
'her' $$010000000000 NULL
|
||||||
|
'them' $$000111000111 NULL;
|
||||||
|
|
||||||
|
Array LanguageDescriptors table
|
||||||
|
|
||||||
|
! word possible GNAs descriptor connected
|
||||||
|
! to follow: type: to:
|
||||||
|
! a i
|
||||||
|
! s p s p
|
||||||
|
! mfnmfnmfnmfn
|
||||||
|
|
||||||
|
'my' $$111111111111 POSSESS_PK 0
|
||||||
|
'this' $$111111111111 POSSESS_PK 0
|
||||||
|
'these' $$000111000111 POSSESS_PK 0
|
||||||
|
'that' $$111111111111 POSSESS_PK 1
|
||||||
|
'those' $$000111000111 POSSESS_PK 1
|
||||||
|
'his' $$111111111111 POSSESS_PK 'him'
|
||||||
|
'her' $$111111111111 POSSESS_PK 'her'
|
||||||
|
'their' $$111111111111 POSSESS_PK 'them'
|
||||||
|
'its' $$111111111111 POSSESS_PK 'it'
|
||||||
|
'the' $$111111111111 DEFART_PK NULL
|
||||||
|
'a//' $$111000111000 INDEFART_PK NULL
|
||||||
|
'an' $$111000111000 INDEFART_PK NULL
|
||||||
|
'some' $$000111000111 INDEFART_PK NULL
|
||||||
|
'lit' $$111111111111 light NULL
|
||||||
|
'lighted' $$111111111111 light NULL
|
||||||
|
'unlit' $$111111111111 (-light) NULL;
|
||||||
|
|
||||||
|
Array LanguageNumbers table
|
||||||
|
'one' 1 'two' 2 'three' 3 'four' 4 'five' 5
|
||||||
|
'six' 6 'seven' 7 'eight' 8 'nine' 9 'ten' 10
|
||||||
|
'eleven' 11 'twelve' 12 'thirteen' 13 'fourteen' 14 'fifteen' 15
|
||||||
|
'sixteen' 16 'seventeen' 17 'eighteen' 18 'nineteen' 19 'twenty' 20;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! Part III. Translation
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ LanguageToInformese;
|
||||||
|
];
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! Part IV. Printing
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Constant LanguageAnimateGender = male;
|
||||||
|
Constant LanguageInanimateGender = neuter;
|
||||||
|
|
||||||
|
Constant LanguageContractionForms = 2; ! English has two:
|
||||||
|
! 0 = starting with a consonant
|
||||||
|
! 1 = starting with a vowel
|
||||||
|
|
||||||
|
[ LanguageContraction text;
|
||||||
|
if (text->0 == 'a' or 'e' or 'i' or 'o' or 'u'
|
||||||
|
or 'A' or 'E' or 'I' or 'O' or 'U') return 1;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
Array LanguageArticles -->
|
||||||
|
|
||||||
|
! Contraction form 0: Contraction form 1:
|
||||||
|
! Cdef Def Indef Cdef Def Indef
|
||||||
|
|
||||||
|
"The " "the " "a " "The " "the " "an " ! Articles 0
|
||||||
|
"The " "the " "some " "The " "the " "some "; ! Articles 1
|
||||||
|
|
||||||
|
! a i
|
||||||
|
! s p s p
|
||||||
|
! m f n m f n m f n m f n
|
||||||
|
|
||||||
|
Array LanguageGNAsToArticles --> 0 0 0 1 1 1 0 0 0 1 1 1;
|
||||||
|
|
||||||
|
[ LanguageDirection d;
|
||||||
|
switch (d) {
|
||||||
|
n_to: print "north";
|
||||||
|
s_to: print "south";
|
||||||
|
e_to: print "east";
|
||||||
|
w_to: print "west";
|
||||||
|
ne_to: print "northeast";
|
||||||
|
nw_to: print "northwest";
|
||||||
|
se_to: print "southeast";
|
||||||
|
sw_to: print "southwest";
|
||||||
|
u_to: print "up";
|
||||||
|
d_to: print "down";
|
||||||
|
in_to: print "in";
|
||||||
|
out_to: print "out";
|
||||||
|
default: return RunTimeError(9,d);
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
[ LanguageNumber n f;
|
||||||
|
if (n == 0) { print "zero"; rfalse; }
|
||||||
|
if (n < 0) { print "minus "; n = -n; }
|
||||||
|
if (n >= 1000) { print (LanguageNumber) n/1000, " thousand"; n = n%1000; f = 1; }
|
||||||
|
if (n >= 100) {
|
||||||
|
if (f == 1) print ", ";
|
||||||
|
print (LanguageNumber) n/100, " hundred"; n = n%100; f = 1;
|
||||||
|
}
|
||||||
|
if (n == 0) rfalse;
|
||||||
|
#Ifdef DIALECT_US;
|
||||||
|
if (f == 1) print " ";
|
||||||
|
#Ifnot;
|
||||||
|
if (f == 1) print " and ";
|
||||||
|
#Endif;
|
||||||
|
switch (n) {
|
||||||
|
1: print "one";
|
||||||
|
2: print "two";
|
||||||
|
3: print "three";
|
||||||
|
4: print "four";
|
||||||
|
5: print "five";
|
||||||
|
6: print "six";
|
||||||
|
7: print "seven";
|
||||||
|
8: print "eight";
|
||||||
|
9: print "nine";
|
||||||
|
10: print "ten";
|
||||||
|
11: print "eleven";
|
||||||
|
12: print "twelve";
|
||||||
|
13: print "thirteen";
|
||||||
|
14: print "fourteen";
|
||||||
|
15: print "fifteen";
|
||||||
|
16: print "sixteen";
|
||||||
|
17: print "seventeen";
|
||||||
|
18: print "eighteen";
|
||||||
|
19: print "nineteen";
|
||||||
|
20 to 99: switch (n/10) {
|
||||||
|
2: print "twenty";
|
||||||
|
3: print "thirty";
|
||||||
|
4: print "forty";
|
||||||
|
5: print "fifty";
|
||||||
|
6: print "sixty";
|
||||||
|
7: print "seventy";
|
||||||
|
8: print "eighty";
|
||||||
|
9: print "ninety";
|
||||||
|
}
|
||||||
|
if (n%10 ~= 0) print "-", (LanguageNumber) n%10;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
[ LanguageTimeOfDay hours mins i;
|
||||||
|
i = hours%12;
|
||||||
|
if (i == 0) i = 12;
|
||||||
|
if (i < 10) print " ";
|
||||||
|
print i, ":", mins/10, mins%10;
|
||||||
|
if ((hours/12) > 0) print " pm"; else print " am";
|
||||||
|
];
|
||||||
|
|
||||||
|
[ LanguageVerb i;
|
||||||
|
switch (i) {
|
||||||
|
'i//','inv','inventory':
|
||||||
|
print "take inventory";
|
||||||
|
'l//': print "look";
|
||||||
|
'x//': print "examine";
|
||||||
|
'z//': print "wait";
|
||||||
|
default: rfalse;
|
||||||
|
}
|
||||||
|
rtrue;
|
||||||
|
];
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
! LanguageVerbIsDebugging is called by SearchScope. It should return true
|
||||||
|
! if word w is a debugging verb which needs all objects to be in scope.
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#Ifdef DEBUG;
|
||||||
|
[ LanguageVerbIsDebugging w;
|
||||||
|
if (w == 'purloin' or 'tree' or 'abstract'
|
||||||
|
or 'gonear' or 'scope' or 'showobj')
|
||||||
|
rtrue;
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
! LanguageVerbLikesAdverb is called by PrintCommand when printing an UPTO_PE
|
||||||
|
! error or an inference message. Words which are intransitive verbs, i.e.,
|
||||||
|
! which require a direction name as an adverb ('walk west'), not a noun
|
||||||
|
! ('I only understood you as far as wanting to touch /the/ ground'), should
|
||||||
|
! cause the routine to return true.
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ LanguageVerbLikesAdverb w;
|
||||||
|
if (w == 'look' or 'go' or 'push' or 'walk')
|
||||||
|
rtrue;
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
! LanguageVerbMayBeName is called by NounDomain when dealing with the
|
||||||
|
! player's reply to a "Which do you mean, the short stick or the long
|
||||||
|
! stick?" prompt from the parser. If the reply is another verb (for example,
|
||||||
|
! LOOK) then then previous ambiguous command is discarded /unless/
|
||||||
|
! it is one of these words which could be both a verb /and/ an
|
||||||
|
! adjective in a 'name' property.
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ LanguageVerbMayBeName w;
|
||||||
|
if (w == 'long' or 'short' or 'normal'
|
||||||
|
or 'brief' or 'full' or 'verbose')
|
||||||
|
rtrue;
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
Constant NKEY__TX = "N = next subject";
|
||||||
|
Constant PKEY__TX = "P = previous";
|
||||||
|
Constant QKEY1__TX = " Q = resume game";
|
||||||
|
Constant QKEY2__TX = "Q = previous menu";
|
||||||
|
Constant RKEY__TX = "RETURN = read subject";
|
||||||
|
|
||||||
|
Constant NKEY1__KY = 'N';
|
||||||
|
Constant NKEY2__KY = 'n';
|
||||||
|
Constant PKEY1__KY = 'P';
|
||||||
|
Constant PKEY2__KY = 'p';
|
||||||
|
Constant QKEY1__KY = 'Q';
|
||||||
|
Constant QKEY2__KY = 'q';
|
||||||
|
|
||||||
|
Constant SCORE__TX = "Score: ";
|
||||||
|
Constant MOVES__TX = "Moves: ";
|
||||||
|
Constant TIME__TX = "Time: ";
|
||||||
|
Constant CANTGO__TX = "You can't go that way.";
|
||||||
|
Constant FORMER__TX = "your former self";
|
||||||
|
Constant YOURSELF__TX = "yourself";
|
||||||
|
Constant YOU__TX = "You";
|
||||||
|
Constant DARKNESS__TX = "Darkness";
|
||||||
|
|
||||||
|
Constant THOSET__TX = "those things";
|
||||||
|
Constant THAT__TX = "that";
|
||||||
|
Constant OR__TX = " or ";
|
||||||
|
Constant NOTHING__TX = "nothing";
|
||||||
|
Constant IS__TX = " is";
|
||||||
|
Constant ARE__TX = " are";
|
||||||
|
Constant IS2__TX = "is ";
|
||||||
|
Constant ARE2__TX = "are ";
|
||||||
|
Constant AND__TX = " and ";
|
||||||
|
Constant WHOM__TX = "whom ";
|
||||||
|
Constant WHICH__TX = "which ";
|
||||||
|
Constant COMMA__TX = ", ";
|
||||||
|
|
||||||
|
|
||||||
|
[ ThatorThose obj; ! Used in the accusative
|
||||||
|
if (obj == player) { print "you"; return; }
|
||||||
|
if (obj has pluralname) { print "those"; return; }
|
||||||
|
if (obj has animate) {
|
||||||
|
if (obj has female) { print "her"; return; }
|
||||||
|
else
|
||||||
|
if (obj hasnt neuter) { print "him"; return; }
|
||||||
|
}
|
||||||
|
print "that";
|
||||||
|
];
|
||||||
|
|
||||||
|
[ ItorThem obj;
|
||||||
|
if (obj == player) { print "yourself"; return; }
|
||||||
|
if (obj has pluralname) { print "them"; return; }
|
||||||
|
if (obj has animate) {
|
||||||
|
if (obj has female) { print "her"; return; }
|
||||||
|
else
|
||||||
|
if (obj hasnt neuter) { print "him"; return; }
|
||||||
|
}
|
||||||
|
print "it";
|
||||||
|
];
|
||||||
|
|
||||||
|
[ IsorAre obj;
|
||||||
|
if (obj has pluralname || obj == player) print "are"; else print "is";
|
||||||
|
];
|
||||||
|
|
||||||
|
[ CThatorThose obj; ! Used in the nominative
|
||||||
|
if (obj == player) { print "You"; return; }
|
||||||
|
if (obj has pluralname) { print "Those"; return; }
|
||||||
|
if (obj has animate) {
|
||||||
|
if (obj has female) { print "She"; return; }
|
||||||
|
else
|
||||||
|
if (obj hasnt neuter) { print "He"; return; }
|
||||||
|
}
|
||||||
|
print "That";
|
||||||
|
];
|
||||||
|
|
||||||
|
[ CTheyreorThats obj;
|
||||||
|
if (obj == player) { print "You're"; return; }
|
||||||
|
if (obj has pluralname) { print "They're"; return; }
|
||||||
|
if (obj has animate) {
|
||||||
|
if (obj has female) { print "She's"; return; }
|
||||||
|
else if (obj hasnt neuter) { print "He's"; return; }
|
||||||
|
}
|
||||||
|
print "That's";
|
||||||
|
];
|
||||||
|
|
||||||
|
[ LanguageLM n x1;
|
||||||
|
Answer,Ask:
|
||||||
|
"There is no reply.";
|
||||||
|
! Ask: see Answer
|
||||||
|
Attack: "Violence isn't the answer to this one.";
|
||||||
|
Blow: "You can't usefully blow ", (thatorthose) x1, ".";
|
||||||
|
Burn: "This dangerous act would achieve little.";
|
||||||
|
Buy: "Nothing is on sale.";
|
||||||
|
Climb: "I don't think much is to be achieved by that.";
|
||||||
|
Close: switch (n) {
|
||||||
|
1: print_ret (ctheyreorthats) x1, " not something you can close.";
|
||||||
|
2: print_ret (ctheyreorthats) x1, " already closed.";
|
||||||
|
3: "You close ", (the) x1, ".";
|
||||||
|
}
|
||||||
|
CommandsOff: switch (n) {
|
||||||
|
1: "[Command recording off.]";
|
||||||
|
#Ifdef TARGET_GLULX;
|
||||||
|
2: "[Command recording already off.]";
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
}
|
||||||
|
CommandsOn: switch (n) {
|
||||||
|
1: "[Command recording on.]";
|
||||||
|
#Ifdef TARGET_GLULX;
|
||||||
|
2: "[Commands are currently replaying.]";
|
||||||
|
3: "[Command recording already on.]";
|
||||||
|
4: "[Command recording failed.]";
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
}
|
||||||
|
CommandsRead: switch (n) {
|
||||||
|
1: "[Replaying commands.]";
|
||||||
|
#Ifdef TARGET_GLULX;
|
||||||
|
2: "[Commands are already replaying.]";
|
||||||
|
3: "[Command replay failed. Command recording is on.]";
|
||||||
|
4: "[Command replay failed.]";
|
||||||
|
5: "[Command replay complete.]";
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
}
|
||||||
|
Consult: "You discover nothing of interest in ", (the) x1, ".";
|
||||||
|
Cut: "Cutting ", (thatorthose) x1, " up would achieve little.";
|
||||||
|
Dig: "Digging would achieve nothing here.";
|
||||||
|
Disrobe: switch (n) {
|
||||||
|
1: "You're not wearing ", (thatorthose) x1, ".";
|
||||||
|
2: "You take off ", (the) x1, ".";
|
||||||
|
}
|
||||||
|
Drink: "There's nothing suitable to drink here.";
|
||||||
|
Drop: switch (n) {
|
||||||
|
1: if (x1 has pluralname) print (The) x1, " are "; else print (The) x1, " is ";
|
||||||
|
"already here.";
|
||||||
|
2: "You haven't got ", (thatorthose) x1, ".";
|
||||||
|
3: "(first taking ", (the) x1, " off)";
|
||||||
|
4: "Dropped.";
|
||||||
|
}
|
||||||
|
Eat: switch (n) {
|
||||||
|
1: print_ret (ctheyreorthats) x1, " plainly inedible.";
|
||||||
|
2: "You eat ", (the) x1, ". Not bad.";
|
||||||
|
}
|
||||||
|
EmptyT: switch (n) {
|
||||||
|
1: print_ret (The) x1, " can't contain things.";
|
||||||
|
2: print_ret (The) x1, " ", (isorare) x1, " closed.";
|
||||||
|
3: print_ret (The) x1, " ", (isorare) x1, " empty already.";
|
||||||
|
4: "That would scarcely empty anything.";
|
||||||
|
}
|
||||||
|
Enter: switch (n) {
|
||||||
|
1: print "But you're already ";
|
||||||
|
if (x1 has supporter) print "on "; else print "in ";
|
||||||
|
print_ret (the) x1, ".";
|
||||||
|
2: if (x1 has pluralname) print "They're"; else print "That's";
|
||||||
|
print " not something you can ";
|
||||||
|
switch (verb_word) {
|
||||||
|
'stand': "stand on.";
|
||||||
|
'sit': "sit down on.";
|
||||||
|
'lie': "lie down on.";
|
||||||
|
default: "enter.";
|
||||||
|
}
|
||||||
|
3: "You can't get into the closed ", (name) x1, ".";
|
||||||
|
4: "You can only get into something free-standing.";
|
||||||
|
5: print "You get ";
|
||||||
|
if (x1 has supporter) print "onto "; else print "into ";
|
||||||
|
print_ret (the) x1, ".";
|
||||||
|
6: print "(getting ";
|
||||||
|
if (x1 has supporter) print "off "; else print "out of ";
|
||||||
|
print (the) x1; ")";
|
||||||
|
7: if (x1 has supporter) "(getting onto ", (the) x1, ")^";
|
||||||
|
if (x1 has container) "(getting into ", (the) x1, ")^";
|
||||||
|
"(entering ", (the) x1, ")^";
|
||||||
|
}
|
||||||
|
Examine: switch (n) {
|
||||||
|
1: "Darkness, noun. An absence of light to see by.";
|
||||||
|
2: "You see nothing special about ", (the) x1, ".";
|
||||||
|
3: print (The) x1, " ", (isorare) x1, " currently switched ";
|
||||||
|
if (x1 has on) "on."; else "off.";
|
||||||
|
}
|
||||||
|
Exit: switch (n) {
|
||||||
|
1: "But you aren't in anything at the moment.";
|
||||||
|
2: "You can't get out of the closed ", (name) x1, ".";
|
||||||
|
3: print "You get ";
|
||||||
|
if (x1 has supporter) print "off "; else print "out of ";
|
||||||
|
print_ret (the) x1, ".";
|
||||||
|
4: print "But you aren't ";
|
||||||
|
if (x1 has supporter) print "on "; else print "in ";
|
||||||
|
print_ret (the) x1, ".";
|
||||||
|
}
|
||||||
|
Fill: "But there's no water here to carry.";
|
||||||
|
FullScore: switch (n) {
|
||||||
|
1: if (deadflag) print "The score was "; else print "The score is ";
|
||||||
|
"made up as follows:^";
|
||||||
|
2: "finding sundry items";
|
||||||
|
3: "visiting various places";
|
||||||
|
4: print "total (out of ", MAX_SCORE; ")";
|
||||||
|
}
|
||||||
|
GetOff: "But you aren't on ", (the) x1, " at the moment.";
|
||||||
|
Give: switch (n) {
|
||||||
|
1: "You aren't holding ", (the) x1, ".";
|
||||||
|
2: "You juggle ", (the) x1, " for a while, but don't achieve much.";
|
||||||
|
3: print (The) x1;
|
||||||
|
if (x1 has pluralname) print " don't"; else print " doesn't";
|
||||||
|
" seem interested.";
|
||||||
|
}
|
||||||
|
Go: switch (n) {
|
||||||
|
1: print "You'll have to get ";
|
||||||
|
if (x1 has supporter) print "off "; else print "out of ";
|
||||||
|
print_ret (the) x1, " first.";
|
||||||
|
2: print_ret (string) CANTGO__TX; ! "You can't go that way."
|
||||||
|
3: "You are unable to climb ", (the) x1, ".";
|
||||||
|
4: "You are unable to descend by ", (the) x1, ".";
|
||||||
|
5: "You can't, since ", (the) x1, " ", (isorare) x1, " in the way.";
|
||||||
|
6: print "You can't, since ", (the) x1;
|
||||||
|
if (x1 has pluralname) " lead nowhere."; else " leads nowhere.";
|
||||||
|
}
|
||||||
|
Insert: switch (n) {
|
||||||
|
1: "You need to be holding ", (the) x1, " before you can put ", (itorthem) x1,
|
||||||
|
" into something else.";
|
||||||
|
2: print_ret (Cthatorthose) x1, " can't contain things.";
|
||||||
|
3: print_ret (The) x1, " ", (isorare) x1, " closed.";
|
||||||
|
4: "You'll need to take ", (itorthem) x1, " off first.";
|
||||||
|
5: "You can't put something inside itself.";
|
||||||
|
6: "(first taking ", (itorthem) x1, " off)^";
|
||||||
|
7: "There is no more room in ", (the) x1, ".";
|
||||||
|
8: "Done.";
|
||||||
|
9: "You put ", (the) x1, " into ", (the) second, ".";
|
||||||
|
}
|
||||||
|
Inv: switch (n) {
|
||||||
|
1: "You are carrying nothing.";
|
||||||
|
2: print "You are carrying";
|
||||||
|
3: print ":^";
|
||||||
|
4: print ".^";
|
||||||
|
}
|
||||||
|
Jump: "You jump on the spot, fruitlessly.";
|
||||||
|
JumpOver,Tie:
|
||||||
|
"You would achieve nothing by this.";
|
||||||
|
Kiss: "Keep your mind on the game.";
|
||||||
|
Listen: "You hear nothing unexpected.";
|
||||||
|
ListMiscellany: switch (n) {
|
||||||
|
1: print " (providing light)";
|
||||||
|
2: print " (which ", (isorare) x1, " closed)";
|
||||||
|
3: print " (closed and providing light)";
|
||||||
|
4: print " (which ", (isorare) x1, " empty)";
|
||||||
|
5: print " (empty and providing light)";
|
||||||
|
6: print " (which ", (isorare) x1, " closed and empty)";
|
||||||
|
7: print " (closed, empty and providing light)";
|
||||||
|
8: print " (providing light and being worn";
|
||||||
|
9: print " (providing light";
|
||||||
|
10: print " (being worn";
|
||||||
|
11: print " (which ", (isorare) x1, " ";
|
||||||
|
12: print "open";
|
||||||
|
13: print "open but empty";
|
||||||
|
14: print "closed";
|
||||||
|
15: print "closed and locked";
|
||||||
|
16: print " and empty";
|
||||||
|
17: print " (which ", (isorare) x1, " empty)";
|
||||||
|
18: print " containing ";
|
||||||
|
19: print " (on ";
|
||||||
|
20: print ", on top of ";
|
||||||
|
21: print " (in ";
|
||||||
|
22: print ", inside ";
|
||||||
|
}
|
||||||
|
LMode1: " is now in its normal ~brief~ printing mode, which gives long descriptions
|
||||||
|
of places never before visited and short descriptions otherwise.";
|
||||||
|
LMode2: " is now in its ~verbose~ mode, which always gives long descriptions
|
||||||
|
of locations (even if you've been there before).";
|
||||||
|
LMode3: " is now in its ~superbrief~ mode, which always gives short descriptions
|
||||||
|
of locations (even if you haven't been there before).";
|
||||||
|
Lock: switch (n) {
|
||||||
|
1: if (x1 has pluralname) print "They don't "; else print "That doesn't ";
|
||||||
|
"seem to be something you can lock.";
|
||||||
|
2: print_ret (ctheyreorthats) x1, " locked at the moment.";
|
||||||
|
3: "First you'll have to close ", (the) x1, ".";
|
||||||
|
4: if (x1 has pluralname) print "Those don't "; else print "That doesn't ";
|
||||||
|
"seem to fit the lock.";
|
||||||
|
5: "You lock ", (the) x1, ".";
|
||||||
|
}
|
||||||
|
Look: switch (n) {
|
||||||
|
1: print " (on ", (the) x1, ")";
|
||||||
|
2: print " (in ", (the) x1, ")";
|
||||||
|
3: print " (as ", (object) x1, ")";
|
||||||
|
4: print "^On ", (the) x1;
|
||||||
|
WriteListFrom(child(x1),
|
||||||
|
ENGLISH_BIT+RECURSE_BIT+PARTINV_BIT+TERSE_BIT+CONCEAL_BIT+ISARE_BIT);
|
||||||
|
".";
|
||||||
|
5,6:
|
||||||
|
if (x1 ~= location) {
|
||||||
|
if (x1 has supporter) print "^On "; else print "^In ";
|
||||||
|
print (the) x1, " you";
|
||||||
|
}
|
||||||
|
else print "^You";
|
||||||
|
print " can ";
|
||||||
|
if (n == 5) print "also ";
|
||||||
|
print "see ";
|
||||||
|
WriteListFrom(child(x1),
|
||||||
|
ENGLISH_BIT+RECURSE_BIT+PARTINV_BIT+TERSE_BIT+CONCEAL_BIT+WORKFLAG_BIT);
|
||||||
|
if (x1 ~= location) "."; else " here.";
|
||||||
|
7: "You see nothing unexpected in that direction.";
|
||||||
|
}
|
||||||
|
LookUnder: switch (n) {
|
||||||
|
1: "But it's dark.";
|
||||||
|
2: "You find nothing of interest.";
|
||||||
|
}
|
||||||
|
Mild: "Quite.";
|
||||||
|
Miscellany: switch (n) {
|
||||||
|
1: "(considering the first sixteen objects only)^";
|
||||||
|
2: "Nothing to do!";
|
||||||
|
3: print " You have died ";
|
||||||
|
4: print " You have won ";
|
||||||
|
5: print "^Would you like to RESTART, RESTORE a saved game";
|
||||||
|
#Ifdef DEATH_MENTION_UNDO;
|
||||||
|
print ", UNDO your last move";
|
||||||
|
#Endif;
|
||||||
|
if (TASKS_PROVIDED == 0) print ", give the FULL score for that game";
|
||||||
|
if (deadflag == 2 && AMUSING_PROVIDED == 0)
|
||||||
|
print ", see some suggestions for AMUSING things to do";
|
||||||
|
" or QUIT?";
|
||||||
|
6: "[Your interpreter does not provide ~undo~. Sorry!]";
|
||||||
|
#Ifdef TARGET_ZCODE;
|
||||||
|
7: "~Undo~ failed. [Not all interpreters provide it.]";
|
||||||
|
#Ifnot; ! TARGET_GLULX
|
||||||
|
7: "[You cannot ~undo~ any further.]";
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
8: "Please give one of the answers above.";
|
||||||
|
9: "^It is now pitch dark in here!";
|
||||||
|
10: "I beg your pardon?";
|
||||||
|
11: "[You can't ~undo~ what hasn't been done!]";
|
||||||
|
12: "[Can't ~undo~ twice in succession. Sorry!]";
|
||||||
|
13: "[Previous turn undone.]";
|
||||||
|
14: "Sorry, that can't be corrected.";
|
||||||
|
15: "Think nothing of it.";
|
||||||
|
16: "~Oops~ can only correct a single word.";
|
||||||
|
17: "It is pitch dark, and you can't see a thing.";
|
||||||
|
18: print "yourself";
|
||||||
|
19: "As good-looking as ever.";
|
||||||
|
20: "To repeat a command like ~frog, jump~, just say ~again~, not ~frog, again~.";
|
||||||
|
21: "You can hardly repeat that.";
|
||||||
|
22: "You can't begin with a comma.";
|
||||||
|
23: "You seem to want to talk to someone, but I can't see whom.";
|
||||||
|
24: "You can't talk to ", (the) x1, ".";
|
||||||
|
25: "To talk to someone, try ~someone, hello~ or some such.";
|
||||||
|
26: "(first taking ", (the) not_holding, ")";
|
||||||
|
27: "I didn't understand that sentence.";
|
||||||
|
28: print "I only understood you as far as wanting to ";
|
||||||
|
29: "I didn't understand that number.";
|
||||||
|
30: "You can't see any such thing.";
|
||||||
|
31: "You seem to have said too little!";
|
||||||
|
32: "You aren't holding that!";
|
||||||
|
33: "You can't use multiple objects with that verb.";
|
||||||
|
34: "You can only use multiple objects once on a line.";
|
||||||
|
35: "I'm not sure what ~", (address) pronoun_word, "~ refers to.";
|
||||||
|
36: "You excepted something not included anyway!";
|
||||||
|
37: "You can only do that to something animate.";
|
||||||
|
#Ifdef DIALECT_US;
|
||||||
|
38: "That's not a verb I recognize.";
|
||||||
|
#Ifnot;
|
||||||
|
38: "That's not a verb I recognise.";
|
||||||
|
#Endif;
|
||||||
|
39: "That's not something you need to refer to in the course of this game.";
|
||||||
|
40: "You can't see ~", (address) pronoun_word, "~ (", (the) pronoun_obj,
|
||||||
|
") at the moment.";
|
||||||
|
41: "I didn't understand the way that finished.";
|
||||||
|
42: if (x1 == 0) print "None"; else print "Only ", (number) x1;
|
||||||
|
print " of those ";
|
||||||
|
if (x1 == 1) print "is"; else print "are";
|
||||||
|
" available.";
|
||||||
|
43: "Nothing to do!";
|
||||||
|
44: "There are none at all available!";
|
||||||
|
45: print "Who do you mean, ";
|
||||||
|
46: print "Which do you mean, ";
|
||||||
|
47: "Sorry, you can only have one item here. Which exactly?";
|
||||||
|
48: print "Whom do you want";
|
||||||
|
if (actor ~= player) print " ", (the) actor;
|
||||||
|
print " to "; PrintCommand(); print "?^";
|
||||||
|
49: print "What do you want";
|
||||||
|
if (actor ~= player) print " ", (the) actor;
|
||||||
|
print " to "; PrintCommand(); print "?^";
|
||||||
|
50: print "Your score has just gone ";
|
||||||
|
if (x1 > 0) print "up"; else { x1 = -x1; print "down"; }
|
||||||
|
print " by ", (number) x1, " point";
|
||||||
|
if (x1 > 1) print "s";
|
||||||
|
51: "(Since something dramatic has happened, your list of commands has been cut short.)";
|
||||||
|
52: "^Type a number from 1 to ", x1, ", 0 to redisplay or press ENTER.";
|
||||||
|
53: "^[Please press SPACE.]";
|
||||||
|
54: "[Comment recorded.]";
|
||||||
|
55: "[Comment NOT recorded.]";
|
||||||
|
56: print ".^";
|
||||||
|
57: print "?^";
|
||||||
|
}
|
||||||
|
No,Yes: "That was a rhetorical question.";
|
||||||
|
NotifyOff:
|
||||||
|
"Score notification off.";
|
||||||
|
NotifyOn: "Score notification on.";
|
||||||
|
Objects: switch (n) {
|
||||||
|
1: "Objects you have handled:^";
|
||||||
|
2: "None.";
|
||||||
|
3: print " (worn)";
|
||||||
|
4: print " (held)";
|
||||||
|
5: print " (given away)";
|
||||||
|
6: print " (in ", (name) x1, ")";
|
||||||
|
7: print " (in ", (the) x1, ")";
|
||||||
|
8: print " (inside ", (the) x1, ")";
|
||||||
|
9: print " (on ", (the) x1, ")";
|
||||||
|
10: print " (lost)";
|
||||||
|
}
|
||||||
|
Open: switch (n) {
|
||||||
|
1: print_ret (ctheyreorthats) x1, " not something you can open.";
|
||||||
|
2: if (x1 has pluralname) print "They seem "; else print "It seems ";
|
||||||
|
"to be locked.";
|
||||||
|
3: print_ret (ctheyreorthats) x1, " already open.";
|
||||||
|
4: print "You open ", (the) x1, ", revealing ";
|
||||||
|
if (WriteListFrom(child(x1), ENGLISH_BIT+TERSE_BIT+CONCEAL_BIT) == 0) "nothing.";
|
||||||
|
".";
|
||||||
|
5: "You open ", (the) x1, ".";
|
||||||
|
}
|
||||||
|
Order: print (The) x1;
|
||||||
|
if (x1 has pluralname) print " have"; else print " has";
|
||||||
|
" better things to do.";
|
||||||
|
Places: switch (n) {
|
||||||
|
1: print "You have visited: ";
|
||||||
|
2: print ".^";
|
||||||
|
}
|
||||||
|
Pray: "Nothing practical results from your prayer.";
|
||||||
|
Prompt: print "^>";
|
||||||
|
Pronouns: switch (n) {
|
||||||
|
1: print "At the moment, ";
|
||||||
|
2: print "means ";
|
||||||
|
3: print "is unset";
|
||||||
|
4: "no pronouns are known to the game.";
|
||||||
|
5: ".";
|
||||||
|
}
|
||||||
|
Pull,Push,Turn: switch (n) {
|
||||||
|
1: if (x1 has pluralname) print "Those are "; else print "It is ";
|
||||||
|
"fixed in place.";
|
||||||
|
2: "You are unable to.";
|
||||||
|
3: "Nothing obvious happens.";
|
||||||
|
4: "That would be less than courteous.";
|
||||||
|
}
|
||||||
|
! Push: see Pull
|
||||||
|
PushDir: switch (n) {
|
||||||
|
1: "Is that the best you can think of?";
|
||||||
|
2: "That's not a direction.";
|
||||||
|
3: "Not that way you can't.";
|
||||||
|
}
|
||||||
|
PutOn: switch (n) {
|
||||||
|
1: "You need to be holding ", (the) x1, " before you can put ",
|
||||||
|
(itorthem) x1, " on top of something else.";
|
||||||
|
2: "You can't put something on top of itself.";
|
||||||
|
3: "Putting things on ", (the) x1, " would achieve nothing.";
|
||||||
|
4: "You lack the dexterity.";
|
||||||
|
5: "(first taking ", (itorthem) x1, " off)^";
|
||||||
|
6: "There is no more room on ", (the) x1, ".";
|
||||||
|
7: "Done.";
|
||||||
|
8: "You put ", (the) x1, " on ", (the) second, ".";
|
||||||
|
}
|
||||||
|
Quit: switch (n) {
|
||||||
|
1: print "Please answer yes or no.";
|
||||||
|
2: print "Are you sure you want to quit? ";
|
||||||
|
}
|
||||||
|
Remove: switch (n) {
|
||||||
|
1: if (x1 has pluralname) print "They are"; else print "It is";
|
||||||
|
" unfortunately closed.";
|
||||||
|
2: if (x1 has pluralname) print "But they aren't"; else print "But it isn't";
|
||||||
|
" there now.";
|
||||||
|
3: "Removed.";
|
||||||
|
}
|
||||||
|
Restart: switch (n) {
|
||||||
|
1: print "Are you sure you want to restart? ";
|
||||||
|
2: "Failed.";
|
||||||
|
}
|
||||||
|
Restore: switch (n) {
|
||||||
|
1: "Restore failed.";
|
||||||
|
2: "Ok.";
|
||||||
|
}
|
||||||
|
Rub: "You achieve nothing by this.";
|
||||||
|
Save: switch (n) {
|
||||||
|
1: "Save failed.";
|
||||||
|
2: "Ok.";
|
||||||
|
}
|
||||||
|
Score: switch (n) {
|
||||||
|
1: if (deadflag) print "In that game you scored "; else print "You have so far scored ";
|
||||||
|
print score, " out of a possible ", MAX_SCORE, ", in ", turns, " turn";
|
||||||
|
if (turns ~= 1) print "s";
|
||||||
|
return;
|
||||||
|
2: "There is no score in this story.";
|
||||||
|
}
|
||||||
|
ScriptOff: switch (n) {
|
||||||
|
1: "Transcripting is already off.";
|
||||||
|
2: "^End of transcript.";
|
||||||
|
3: "Attempt to end transcript failed.";
|
||||||
|
}
|
||||||
|
ScriptOn: switch (n) {
|
||||||
|
1: "Transcripting is already on.";
|
||||||
|
2: "Start of a transcript of";
|
||||||
|
3: "Attempt to begin transcript failed.";
|
||||||
|
}
|
||||||
|
Search: switch (n) {
|
||||||
|
1: "But it's dark.";
|
||||||
|
2: "There is nothing on ", (the) x1, ".";
|
||||||
|
3: print "On ", (the) x1;
|
||||||
|
WriteListFrom(child(x1), ENGLISH_BIT+TERSE_BIT+CONCEAL_BIT+ISARE_BIT);
|
||||||
|
".";
|
||||||
|
4: "You find nothing of interest.";
|
||||||
|
5: "You can't see inside, since ", (the) x1, " ", (isorare) x1, " closed.";
|
||||||
|
6: print_ret (The) x1, " ", (isorare) x1, " empty.";
|
||||||
|
7: print "In ", (the) x1;
|
||||||
|
WriteListFrom(child(x1), ENGLISH_BIT+TERSE_BIT+CONCEAL_BIT+ISARE_BIT);
|
||||||
|
".";
|
||||||
|
}
|
||||||
|
Set: "No, you can't set ", (thatorthose) x1, ".";
|
||||||
|
SetTo: "No, you can't set ", (thatorthose) x1, " to anything.";
|
||||||
|
Show: switch (n) {
|
||||||
|
1: "You aren't holding ", (the) x1, ".";
|
||||||
|
2: print_ret (The) x1, " ", (isorare) x1, " unimpressed.";
|
||||||
|
}
|
||||||
|
Sing: "Your singing is abominable.";
|
||||||
|
Sleep: "You aren't feeling especially drowsy.";
|
||||||
|
Smell: "You smell nothing unexpected.";
|
||||||
|
#Ifdef DIALECT_US;
|
||||||
|
Sorry: "Oh, don't apologize.";
|
||||||
|
#Ifnot;
|
||||||
|
Sorry: "Oh, don't apologise.";
|
||||||
|
#Endif;
|
||||||
|
Squeeze: switch (n) {
|
||||||
|
1: "Keep your hands to yourself.";
|
||||||
|
2: "You achieve nothing by this.";
|
||||||
|
}
|
||||||
|
Strong: "Real adventurers do not use such language.";
|
||||||
|
Swim: "There's not enough water to swim in.";
|
||||||
|
Swing: "There's nothing sensible to swing here.";
|
||||||
|
SwitchOff: switch (n) {
|
||||||
|
1: print_ret (ctheyreorthats) x1, " not something you can switch.";
|
||||||
|
2: print_ret (ctheyreorthats) x1, " already off.";
|
||||||
|
3: "You switch ", (the) x1, " off.";
|
||||||
|
}
|
||||||
|
SwitchOn: switch (n) {
|
||||||
|
1: print_ret (ctheyreorthats) x1, " not something you can switch.";
|
||||||
|
2: print_ret (ctheyreorthats) x1, " already on.";
|
||||||
|
3: "You switch ", (the) x1, " on.";
|
||||||
|
}
|
||||||
|
Take: switch (n) {
|
||||||
|
1: "Taken.";
|
||||||
|
2: "You are always self-possessed.";
|
||||||
|
3: "I don't suppose ", (the) x1, " would care for that.";
|
||||||
|
4: print "You'd have to get ";
|
||||||
|
if (x1 has supporter) print "off "; else print "out of ";
|
||||||
|
print_ret (the) x1, " first.";
|
||||||
|
5: "You already have ", (thatorthose) x1, ".";
|
||||||
|
6: if (noun has pluralname) print "Those seem "; else print "That seems ";
|
||||||
|
"to belong to ", (the) x1, ".";
|
||||||
|
7: if (noun has pluralname) print "Those seem "; else print "That seems ";
|
||||||
|
"to be a part of ", (the) x1, ".";
|
||||||
|
8: print_ret (Cthatorthose) x1, " ", (isorare) x1,
|
||||||
|
"n't available.";
|
||||||
|
9: print_ret (The) x1, " ", (isorare) x1, "n't open.";
|
||||||
|
10: if (x1 has pluralname) print "They're "; else print "That's ";
|
||||||
|
"hardly portable.";
|
||||||
|
11: if (x1 has pluralname) print "They're "; else print "That's ";
|
||||||
|
"fixed in place.";
|
||||||
|
12: "You're carrying too many things already.";
|
||||||
|
13: "(putting ", (the) x1, " into ", (the) SACK_OBJECT, " to make room)";
|
||||||
|
}
|
||||||
|
Taste: "You taste nothing unexpected.";
|
||||||
|
Tell: switch (n) {
|
||||||
|
1: "You talk to yourself a while.";
|
||||||
|
2: "This provokes no reaction.";
|
||||||
|
}
|
||||||
|
Think: "What a good idea.";
|
||||||
|
ThrowAt: switch (n) {
|
||||||
|
1: "Futile.";
|
||||||
|
2: "You lack the nerve when it comes to the crucial moment.";
|
||||||
|
}
|
||||||
|
! Tie: see JumpOver.
|
||||||
|
Touch: switch (n) {
|
||||||
|
1: "Keep your hands to yourself!";
|
||||||
|
2: "You feel nothing unexpected.";
|
||||||
|
3: "If you think that'll help.";
|
||||||
|
}
|
||||||
|
! Turn: see Pull.
|
||||||
|
Unlock: switch (n) {
|
||||||
|
1: if (x1 has pluralname) print "They don't "; else print "That doesn't ";
|
||||||
|
"seem to be something you can unlock.";
|
||||||
|
2: print_ret (ctheyreorthats) x1, " unlocked at the moment.";
|
||||||
|
3: if (x1 has pluralname) print "Those don't "; else print "That doesn't ";
|
||||||
|
"seem to fit the lock.";
|
||||||
|
4: "You unlock ", (the) x1, ".";
|
||||||
|
}
|
||||||
|
VagueGo: "You'll have to say which compass direction to go in.";
|
||||||
|
Verify: switch (n) {
|
||||||
|
1: "The game file has verified as intact.";
|
||||||
|
2: "The game file did not verify as intact, and may be corrupt.";
|
||||||
|
}
|
||||||
|
Wait: "Time passes.";
|
||||||
|
Wake: "The dreadful truth is, this is not a dream.";
|
||||||
|
WakeOther:"That seems unnecessary.";
|
||||||
|
Wave: switch (n) {
|
||||||
|
1: "But you aren't holding ", (thatorthose) x1, ".";
|
||||||
|
2: "You look ridiculous waving ", (the) x1, ".";
|
||||||
|
}
|
||||||
|
WaveHands:"You wave, feeling foolish.";
|
||||||
|
Wear: switch (n) {
|
||||||
|
1: "You can't wear ", (thatorthose) x1, "!";
|
||||||
|
2: "You're not holding ", (thatorthose) x1, "!";
|
||||||
|
3: "You're already wearing ", (thatorthose) x1, "!";
|
||||||
|
4: "You put on ", (the) x1, ".";
|
||||||
|
}
|
||||||
|
! Yes: see No.
|
||||||
|
];
|
||||||
|
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
Constant LIBRARY_ENGLISH; ! for dependency checking.
|
||||||
|
|
||||||
|
! ==============================================================================
|
438
library-glulx/Grammar.h
Normal file
438
library-glulx/Grammar.h
Normal file
|
@ -0,0 +1,438 @@
|
||||||
|
! ==============================================================================
|
||||||
|
! GRAMMAR: Grammar table entries for the standard verbs library.
|
||||||
|
!
|
||||||
|
! Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
||||||
|
!
|
||||||
|
! Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
||||||
|
!
|
||||||
|
! In your game file, Include three library files in this order:
|
||||||
|
! Include "Parser";
|
||||||
|
! Include "VerbLib";
|
||||||
|
! Include "Grammar";
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! The "meta-verbs", commands to the game rather than in the game, come first:
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Verb meta 'brief' 'normal'
|
||||||
|
* -> LMode1;
|
||||||
|
Verb meta 'verbose' 'long'
|
||||||
|
* -> LMode2;
|
||||||
|
Verb meta 'superbrief' 'short'
|
||||||
|
* -> LMode3;
|
||||||
|
Verb meta 'notify'
|
||||||
|
* -> NotifyOn
|
||||||
|
* 'on' -> NotifyOn
|
||||||
|
* 'off' -> NotifyOff;
|
||||||
|
Verb meta 'pronouns' 'nouns'
|
||||||
|
* -> Pronouns;
|
||||||
|
Verb meta 'quit' 'q//' 'die'
|
||||||
|
* -> Quit;
|
||||||
|
Verb meta 'recording'
|
||||||
|
* -> CommandsOn
|
||||||
|
* 'on' -> CommandsOn
|
||||||
|
* 'off' -> CommandsOff;
|
||||||
|
Verb meta 'replay'
|
||||||
|
* -> CommandsRead;
|
||||||
|
Verb meta 'restart'
|
||||||
|
* -> Restart;
|
||||||
|
Verb meta 'restore'
|
||||||
|
* -> Restore;
|
||||||
|
Verb meta 'save'
|
||||||
|
* -> Save;
|
||||||
|
Verb meta 'score'
|
||||||
|
* -> Score;
|
||||||
|
Verb meta 'fullscore' 'full'
|
||||||
|
* -> FullScore
|
||||||
|
* 'score' -> FullScore;
|
||||||
|
Verb meta 'script' 'transcript'
|
||||||
|
* -> ScriptOn
|
||||||
|
* 'on' -> ScriptOn
|
||||||
|
* 'off' -> ScriptOff;
|
||||||
|
Verb meta 'noscript' 'unscript'
|
||||||
|
* -> ScriptOff;
|
||||||
|
Verb meta 'verify'
|
||||||
|
* -> Verify;
|
||||||
|
Verb meta 'version'
|
||||||
|
* -> Version;
|
||||||
|
|
||||||
|
#Ifndef NO_PLACES;
|
||||||
|
Verb meta 'objects'
|
||||||
|
* -> Objects;
|
||||||
|
Verb meta 'places'
|
||||||
|
* -> Places;
|
||||||
|
#Endif; ! NO_PLACES
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! Debugging grammar
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#Ifdef DEBUG;
|
||||||
|
Verb meta 'actions'
|
||||||
|
* -> ActionsOn
|
||||||
|
* 'on' -> ActionsOn
|
||||||
|
* 'off' -> ActionsOff;
|
||||||
|
Verb meta 'changes'
|
||||||
|
* -> ChangesOn
|
||||||
|
* 'on' -> ChangesOn
|
||||||
|
* 'off' -> ChangesOff;
|
||||||
|
Verb meta 'gonear'
|
||||||
|
* noun -> Gonear;
|
||||||
|
Verb meta 'goto'
|
||||||
|
* number -> Goto;
|
||||||
|
Verb meta 'random'
|
||||||
|
* -> Predictable;
|
||||||
|
Verb meta 'routines' 'messages'
|
||||||
|
* -> RoutinesOn
|
||||||
|
* 'on' -> RoutinesOn
|
||||||
|
* 'off' -> RoutinesOff;
|
||||||
|
Verb meta 'scope'
|
||||||
|
* -> Scope
|
||||||
|
* noun -> Scope;
|
||||||
|
Verb meta 'showobj'
|
||||||
|
* -> Showobj
|
||||||
|
* number -> Showobj
|
||||||
|
* multi -> Showobj;
|
||||||
|
Verb meta 'showverb'
|
||||||
|
* special -> Showverb;
|
||||||
|
Verb meta 'timers' 'daemons'
|
||||||
|
* -> TimersOn
|
||||||
|
* 'on' -> TimersOn
|
||||||
|
* 'off' -> TimersOff;
|
||||||
|
Verb meta 'trace'
|
||||||
|
* -> TraceOn
|
||||||
|
* number -> TraceLevel
|
||||||
|
* 'on' -> TraceOn
|
||||||
|
* 'off' -> TraceOff;
|
||||||
|
Verb meta 'abstract'
|
||||||
|
* noun 'to' noun -> XAbstract;
|
||||||
|
Verb meta 'purloin'
|
||||||
|
* multi -> XPurloin;
|
||||||
|
Verb meta 'tree'
|
||||||
|
* -> XTree
|
||||||
|
* noun -> XTree;
|
||||||
|
|
||||||
|
#Ifdef TARGET_GLULX;
|
||||||
|
Verb meta 'glklist'
|
||||||
|
* -> Glklist;
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
|
||||||
|
#Endif; ! DEBUG
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! And now the game verbs.
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ ADirection; if (noun in compass) rtrue; rfalse; ];
|
||||||
|
|
||||||
|
Verb 'answer' 'say' 'shout' 'speak'
|
||||||
|
* topic 'to' creature -> Answer;
|
||||||
|
Verb 'ask'
|
||||||
|
* creature 'about' topic -> Ask
|
||||||
|
* creature 'for' noun -> AskFor
|
||||||
|
* creature 'to' topic -> AskTo
|
||||||
|
* 'that' creature topic -> AskTo;
|
||||||
|
Verb 'attack' 'break' 'crack' 'destroy'
|
||||||
|
'fight' 'hit' 'kill' 'murder' 'punch'
|
||||||
|
'smash' 'thump' 'torture' 'wreck'
|
||||||
|
* noun -> Attack;
|
||||||
|
Verb 'blow'
|
||||||
|
* held -> Blow;
|
||||||
|
Verb 'bother' 'curses' 'darn' 'drat'
|
||||||
|
* -> Mild
|
||||||
|
* topic -> Mild;
|
||||||
|
Verb 'burn' 'light'
|
||||||
|
* noun -> Burn
|
||||||
|
* noun 'with' held -> Burn;
|
||||||
|
Verb 'buy' 'purchase'
|
||||||
|
* noun -> Buy;
|
||||||
|
Verb 'climb' 'scale'
|
||||||
|
* noun -> Climb
|
||||||
|
* 'up'/'over' noun -> Climb;
|
||||||
|
Verb 'close' 'cover' 'shut'
|
||||||
|
* noun -> Close
|
||||||
|
* 'up' noun -> Close
|
||||||
|
* 'off' noun -> SwitchOff;
|
||||||
|
Verb 'consult'
|
||||||
|
* noun 'about' topic -> Consult
|
||||||
|
* noun 'on' topic -> Consult;
|
||||||
|
Verb 'cut' 'chop' 'prune' 'slice'
|
||||||
|
* noun -> Cut;
|
||||||
|
Verb 'dig'
|
||||||
|
* noun -> Dig
|
||||||
|
* noun 'with' held -> Dig;
|
||||||
|
Verb 'drink' 'sip' 'swallow'
|
||||||
|
* noun -> Drink;
|
||||||
|
Verb 'drop' 'discard' 'throw'
|
||||||
|
* multiheld -> Drop
|
||||||
|
* multiexcept 'in'/'into'/'down' noun -> Insert
|
||||||
|
* multiexcept 'on'/'onto' noun -> PutOn
|
||||||
|
* held 'at'/'against'/'on'/'onto' noun -> ThrowAt;
|
||||||
|
Verb 'eat'
|
||||||
|
* held -> Eat;
|
||||||
|
Verb 'empty'
|
||||||
|
* noun -> Empty
|
||||||
|
* 'out' noun -> Empty
|
||||||
|
* noun 'out' -> Empty
|
||||||
|
* noun 'to'/'into'/'on'/'onto' noun -> EmptyT;
|
||||||
|
Verb 'enter' 'cross'
|
||||||
|
* -> GoIn
|
||||||
|
* noun -> Enter;
|
||||||
|
Verb 'examine' 'x//' 'check' 'describe' 'watch'
|
||||||
|
* noun -> Examine;
|
||||||
|
Verb 'exit' 'out' 'outside'
|
||||||
|
* -> Exit
|
||||||
|
* noun -> Exit;
|
||||||
|
Verb 'fill'
|
||||||
|
* noun -> Fill;
|
||||||
|
Verb 'get'
|
||||||
|
* 'out'/'off'/'up' -> Exit
|
||||||
|
* multi -> Take
|
||||||
|
* 'in'/'into'/'on'/'onto' noun -> Enter
|
||||||
|
* 'off' noun -> GetOff
|
||||||
|
* multiinside 'from' noun -> Remove;
|
||||||
|
Verb 'give' 'feed' 'offer' 'pay'
|
||||||
|
* held 'to' creature -> Give
|
||||||
|
* creature held -> Give reverse
|
||||||
|
* 'over' held 'to' creature -> Give;
|
||||||
|
Verb 'go' 'run' 'walk'
|
||||||
|
* -> VagueGo
|
||||||
|
* noun=ADirection -> Go
|
||||||
|
* noun -> Enter
|
||||||
|
* 'into'/'in'/'inside'/'through' noun -> Enter;
|
||||||
|
Verb 'in' 'inside'
|
||||||
|
* -> GoIn;
|
||||||
|
Verb 'insert'
|
||||||
|
* multiexcept 'in'/'into' noun -> Insert;
|
||||||
|
Verb 'inventory' 'inv' 'i//'
|
||||||
|
* -> Inv
|
||||||
|
* 'tall' -> InvTall
|
||||||
|
* 'wide' -> InvWide;
|
||||||
|
Verb 'jump' 'hop' 'skip'
|
||||||
|
* -> Jump
|
||||||
|
* 'over' noun -> JumpOver;
|
||||||
|
Verb 'kiss' 'embrace' 'hug'
|
||||||
|
* creature -> Kiss;
|
||||||
|
Verb 'leave'
|
||||||
|
* -> VagueGo
|
||||||
|
* noun=ADirection -> Go
|
||||||
|
* noun -> Exit
|
||||||
|
* 'into'/'in'/'inside'/'through' noun -> Enter;
|
||||||
|
Verb 'listen' 'hear'
|
||||||
|
* -> Listen
|
||||||
|
* noun -> Listen
|
||||||
|
* 'to' noun -> Listen;
|
||||||
|
Verb 'lock'
|
||||||
|
* noun 'with' held -> Lock;
|
||||||
|
Verb 'look' 'l//'
|
||||||
|
* -> Look
|
||||||
|
* 'at' noun -> Examine
|
||||||
|
* 'inside'/'in'/'into'/'through'/'on' noun -> Search
|
||||||
|
* 'under' noun -> LookUnder
|
||||||
|
* 'up' topic 'in' noun -> Consult
|
||||||
|
* noun=ADirection -> Examine
|
||||||
|
* 'to' noun=ADirection -> Examine;
|
||||||
|
Verb 'no'
|
||||||
|
* -> No;
|
||||||
|
Verb 'open' 'uncover' 'undo' 'unwrap'
|
||||||
|
* noun -> Open
|
||||||
|
* noun 'with' held -> Unlock;
|
||||||
|
Verb 'peel'
|
||||||
|
* noun -> Take
|
||||||
|
* 'off' noun -> Take;
|
||||||
|
Verb 'pick'
|
||||||
|
* 'up' multi -> Take
|
||||||
|
* multi 'up' -> Take;
|
||||||
|
Verb 'pray'
|
||||||
|
* -> Pray;
|
||||||
|
Verb 'pry' 'prise' 'prize' 'lever' 'jemmy' 'force'
|
||||||
|
* noun 'with' held -> Unlock
|
||||||
|
* 'apart'/'open' noun 'with' held -> Unlock
|
||||||
|
* noun 'apart'/'open' 'with' held -> Unlock;
|
||||||
|
Verb 'pull' 'drag'
|
||||||
|
* noun -> Pull;
|
||||||
|
Verb 'push' 'clear' 'move' 'press' 'shift'
|
||||||
|
* noun -> Push
|
||||||
|
* noun noun -> PushDir
|
||||||
|
* noun 'to' noun -> Transfer;
|
||||||
|
Verb 'put'
|
||||||
|
* multiexcept 'in'/'inside'/'into' noun -> Insert
|
||||||
|
* multiexcept 'on'/'onto' noun -> PutOn
|
||||||
|
* 'on' held -> Wear
|
||||||
|
* 'down' multiheld -> Drop
|
||||||
|
* multiheld 'down' -> Drop;
|
||||||
|
Verb 'read'
|
||||||
|
* noun -> Examine
|
||||||
|
* 'about' topic 'in' noun -> Consult
|
||||||
|
* topic 'in' noun -> Consult;
|
||||||
|
Verb 'remove'
|
||||||
|
* held -> Disrobe
|
||||||
|
* multi -> Take
|
||||||
|
* multiinside 'from' noun -> Remove;
|
||||||
|
Verb 'rub' 'clean' 'dust' 'polish' 'scrub'
|
||||||
|
'shine' 'sweep' 'wipe'
|
||||||
|
* noun -> Rub;
|
||||||
|
Verb 'search'
|
||||||
|
* noun -> Search;
|
||||||
|
Verb 'set' 'adjust'
|
||||||
|
* noun -> Set
|
||||||
|
* noun 'to' special -> SetTo;
|
||||||
|
Verb 'shed' 'disrobe' 'doff'
|
||||||
|
* held -> Disrobe;
|
||||||
|
Verb 'show' 'display' 'present'
|
||||||
|
* creature held -> Show reverse
|
||||||
|
* held 'to' creature -> Show;
|
||||||
|
Verb 'shit' 'damn' 'fuck' 'sod'
|
||||||
|
* -> Strong
|
||||||
|
* topic -> Strong;
|
||||||
|
Verb 'sing'
|
||||||
|
* -> Sing;
|
||||||
|
Verb 'sit' 'lie'
|
||||||
|
* 'on' 'top' 'of' noun -> Enter
|
||||||
|
* 'on'/'in'/'inside' noun -> Enter;
|
||||||
|
Verb 'sleep' 'nap'
|
||||||
|
* -> Sleep;
|
||||||
|
Verb 'smell' 'sniff'
|
||||||
|
* -> Smell
|
||||||
|
* noun -> Smell;
|
||||||
|
Verb 'sorry'
|
||||||
|
* -> Sorry;
|
||||||
|
Verb 'squeeze' 'squash'
|
||||||
|
* noun -> Squeeze;
|
||||||
|
Verb 'stand'
|
||||||
|
* -> Exit
|
||||||
|
* 'up' -> Exit
|
||||||
|
* 'on' noun -> Enter;
|
||||||
|
Verb 'swim' 'dive'
|
||||||
|
* -> Swim;
|
||||||
|
Verb 'swing'
|
||||||
|
* noun -> Swing
|
||||||
|
* 'on' noun -> Swing;
|
||||||
|
Verb 'switch'
|
||||||
|
* noun -> Switchon
|
||||||
|
* noun 'on' -> Switchon
|
||||||
|
* noun 'off' -> Switchoff
|
||||||
|
* 'on' noun -> Switchon
|
||||||
|
* 'off' noun -> Switchoff;
|
||||||
|
Verb 'take' 'carry' 'hold'
|
||||||
|
* multi -> Take
|
||||||
|
* 'off' worn -> Disrobe
|
||||||
|
* multiinside 'from' noun -> Remove
|
||||||
|
* multiinside 'off' noun -> Remove
|
||||||
|
* 'inventory' -> Inv;
|
||||||
|
Verb 'taste'
|
||||||
|
* noun -> Taste;
|
||||||
|
Verb 'tell'
|
||||||
|
* creature 'about' topic -> Tell
|
||||||
|
* creature 'to' topic -> AskTo;
|
||||||
|
Verb 'think'
|
||||||
|
* -> Think;
|
||||||
|
Verb 'tie' 'attach' 'fasten' 'fix'
|
||||||
|
* noun -> Tie
|
||||||
|
* noun 'to' noun -> Tie;
|
||||||
|
Verb 'touch' 'feel' 'fondle' 'grope'
|
||||||
|
* noun -> Touch;
|
||||||
|
Verb 'transfer'
|
||||||
|
* noun 'to' noun -> Transfer;
|
||||||
|
Verb 'turn' 'rotate' 'screw' 'twist' 'unscrew'
|
||||||
|
* noun -> Turn
|
||||||
|
* noun 'on' -> Switchon
|
||||||
|
* noun 'off' -> Switchoff
|
||||||
|
* 'on' noun -> Switchon
|
||||||
|
* 'off' noun -> Switchoff;
|
||||||
|
Verb 'wave'
|
||||||
|
* -> WaveHands
|
||||||
|
* noun -> Wave;
|
||||||
|
Verb 'wear' 'don'
|
||||||
|
* held -> Wear;
|
||||||
|
Verb 'yes' 'y//'
|
||||||
|
* -> Yes;
|
||||||
|
Verb 'unlock'
|
||||||
|
* noun 'with' held -> Unlock;
|
||||||
|
Verb 'wait' 'z//'
|
||||||
|
* -> Wait;
|
||||||
|
Verb 'wake' 'awake' 'awaken'
|
||||||
|
* -> Wake
|
||||||
|
* 'up' -> Wake
|
||||||
|
* creature -> WakeOther
|
||||||
|
* creature 'up' -> WakeOther
|
||||||
|
* 'up' creature -> WakeOther;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! This routine is no longer used here, but provided to help existing games
|
||||||
|
! which use it as a general parsing routine:
|
||||||
|
|
||||||
|
[ ConTopic w;
|
||||||
|
consult_from = wn;
|
||||||
|
do w = NextWordStopped();
|
||||||
|
until (w == -1 || (w == 'to' && action_to_be == ##Answer));
|
||||||
|
wn--;
|
||||||
|
consult_words = wn - consult_from;
|
||||||
|
if (consult_words == 0) return -1;
|
||||||
|
if (action_to_be == ##Answer or ##Ask or ##Tell) {
|
||||||
|
w = wn; wn = consult_from; parsed_number = NextWord();
|
||||||
|
if (parsed_number == 'the' && consult_words > 1) parsed_number = NextWord();
|
||||||
|
wn = w;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! Final task: provide trivial routines if the user hasn't already:
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#Stub AfterLife 0;
|
||||||
|
#Stub AfterPrompt 0;
|
||||||
|
#Stub Amusing 0;
|
||||||
|
#Stub BeforeParsing 0;
|
||||||
|
#Stub ChooseObjects 2;
|
||||||
|
#Stub DarkToDark 0;
|
||||||
|
#Stub DeathMessage 0;
|
||||||
|
#Stub GamePostRoutine 0;
|
||||||
|
#Stub GamePreRoutine 0;
|
||||||
|
#Stub InScope 1;
|
||||||
|
#Stub LookRoutine 0;
|
||||||
|
#Stub NewRoom 0;
|
||||||
|
#Stub ParseNumber 2;
|
||||||
|
#Stub ParserError 1;
|
||||||
|
#Stub PrintTaskName 1;
|
||||||
|
#Stub PrintVerb 1;
|
||||||
|
#Stub TimePasses 0;
|
||||||
|
#Stub UnknownVerb 1;
|
||||||
|
|
||||||
|
#Ifdef TARGET_GLULX;
|
||||||
|
#Stub HandleGlkEvent 2;
|
||||||
|
#Stub IdentifyGlkObject 4;
|
||||||
|
#Stub InitGlkWindow 1;
|
||||||
|
#Endif; ! TARGET_GLULX
|
||||||
|
|
||||||
|
#Ifndef PrintRank;
|
||||||
|
! Constant Make__PR;
|
||||||
|
! #Endif;
|
||||||
|
! #Ifdef Make__PR;
|
||||||
|
[ PrintRank; "."; ];
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
#Ifndef ParseNoun;
|
||||||
|
! Constant Make__PN;
|
||||||
|
! #Endif;
|
||||||
|
! #Ifdef Make__PN;
|
||||||
|
[ ParseNoun obj; obj = obj; return -1; ];
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
#Default Story 0;
|
||||||
|
#Default Headline 0;
|
||||||
|
|
||||||
|
#Ifdef INFIX;
|
||||||
|
#Include "infix";
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
Constant LIBRARY_GRAMMAR; ! for dependency checking
|
||||||
|
|
||||||
|
! ==============================================================================
|
128
library-glulx/Parser.h
Normal file
128
library-glulx/Parser.h
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
! ==============================================================================
|
||||||
|
! PARSER: Front end to parser.
|
||||||
|
!
|
||||||
|
! Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
||||||
|
!
|
||||||
|
! Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
||||||
|
!
|
||||||
|
! In your game file, Include three library files in this order:
|
||||||
|
! Include "Parser";
|
||||||
|
! Include "VerbLib";
|
||||||
|
! Include "Grammar";
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Constant LibSerial "040227";
|
||||||
|
Constant LibRelease "6/11";
|
||||||
|
Constant LIBRARY_VERSION 611;
|
||||||
|
Constant Grammar__Version 2;
|
||||||
|
|
||||||
|
Default COMMENT_CHARACTER '*';
|
||||||
|
|
||||||
|
#Ifdef INFIX;
|
||||||
|
Default DEBUG 0;
|
||||||
|
#Endif; ! INFIX
|
||||||
|
|
||||||
|
#Ifndef WORDSIZE; ! compiling with Z-code only compiler
|
||||||
|
Constant TARGET_ZCODE;
|
||||||
|
Constant WORDSIZE 2;
|
||||||
|
#Endif; ! WORDSIZE
|
||||||
|
|
||||||
|
#Ifdef TARGET_ZCODE; ! offsets into Z-machine header
|
||||||
|
|
||||||
|
Constant HDR_ZCODEVERSION $00; ! byte
|
||||||
|
Constant HDR_TERPFLAGS $01; ! byte
|
||||||
|
Constant HDR_GAMERELEASE $02; ! word
|
||||||
|
Constant HDR_HIGHMEMORY $04; ! word
|
||||||
|
Constant HDR_INITIALPC $06; ! word
|
||||||
|
Constant HDR_DICTIONARY $08; ! word
|
||||||
|
Constant HDR_OBJECTS $0A; ! word
|
||||||
|
Constant HDR_GLOBALS $0C; ! word
|
||||||
|
Constant HDR_STATICMEMORY $0E; ! word
|
||||||
|
Constant HDR_GAMEFLAGS $10; ! word
|
||||||
|
Constant HDR_GAMESERIAL $12; ! six ASCII characters
|
||||||
|
Constant HDR_ABBREVIATIONS $18; ! word
|
||||||
|
Constant HDR_FILELENGTH $1A; ! word
|
||||||
|
Constant HDR_CHECKSUM $1C; ! word
|
||||||
|
Constant HDR_TERPNUMBER $1E; ! byte
|
||||||
|
Constant HDR_TERPVERSION $1F; ! byte
|
||||||
|
Constant HDR_SCREENHLINES $20; ! byte
|
||||||
|
Constant HDR_SCREENWCHARS $21; ! byte
|
||||||
|
Constant HDR_SCREENWUNITS $22; ! word
|
||||||
|
Constant HDR_SCREENHUNITS $24; ! word
|
||||||
|
Constant HDR_FONTWUNITS $26; ! byte
|
||||||
|
Constant HDR_FONTHUNITS $27; ! byte
|
||||||
|
Constant HDR_ROUTINEOFFSET $28; ! word
|
||||||
|
Constant HDR_STRINGOFFSET $2A; ! word
|
||||||
|
Constant HDR_BGCOLOUR $2C; ! byte
|
||||||
|
Constant HDR_FGCOLOUR $2D; ! byte
|
||||||
|
Constant HDR_TERMCHARS $2E; ! word
|
||||||
|
Constant HDR_PIXELSTO3 $30; ! word
|
||||||
|
Constant HDR_TERPSTANDARD $32; ! two bytes
|
||||||
|
Constant HDR_ALPHABET $34; ! word
|
||||||
|
Constant HDR_EXTENSION $36; ! word
|
||||||
|
Constant HDR_UNUSED $38; ! two words
|
||||||
|
Constant HDR_INFORMVERSION $3C; ! four ASCII characters
|
||||||
|
|
||||||
|
#Ifnot; ! TARGET_GLULX ! offsets into Glulx header and start of ROM
|
||||||
|
|
||||||
|
Constant HDR_MAGICNUMBER $00; ! long word
|
||||||
|
Constant HDR_GLULXVERSION $04; ! long word
|
||||||
|
Constant HDR_RAMSTART $08; ! long word
|
||||||
|
Constant HDR_EXTSTART $0C; ! long word
|
||||||
|
Constant HDR_ENDMEM $10; ! long word
|
||||||
|
Constant HDR_STACKSIZE $14; ! long word
|
||||||
|
Constant HDR_STARTFUNC $18; ! long word
|
||||||
|
Constant HDR_DECODINGTBL $1C; ! long word
|
||||||
|
Constant HDR_CHECKSUM $20; ! long word
|
||||||
|
Constant ROM_INFO $24; ! four ASCII characters
|
||||||
|
Constant ROM_MEMORYLAYOUT $28; ! long word
|
||||||
|
Constant ROM_INFORMVERSION $2C; ! four ASCII characters
|
||||||
|
Constant ROM_COMPVERSION $30; ! four ASCII characters
|
||||||
|
Constant ROM_GAMERELEASE $34; ! short word
|
||||||
|
Constant ROM_GAMESERIAL $36; ! six ASCII characters
|
||||||
|
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
|
||||||
|
#Ifndef VN_1610;
|
||||||
|
Message fatalerror "*** Library 6/11 needs Inform v6.10 or later to work ***";
|
||||||
|
#Endif; ! VN_
|
||||||
|
|
||||||
|
Include "linklpa";
|
||||||
|
|
||||||
|
Fake_Action LetGo;
|
||||||
|
Fake_Action Receive;
|
||||||
|
Fake_Action ThrownAt;
|
||||||
|
Fake_Action Order;
|
||||||
|
Fake_Action TheSame;
|
||||||
|
Fake_Action PluralFound;
|
||||||
|
Fake_Action ListMiscellany;
|
||||||
|
Fake_Action Miscellany;
|
||||||
|
Fake_Action Prompt;
|
||||||
|
Fake_Action NotUnderstood;
|
||||||
|
|
||||||
|
#Ifdef NO_PLACES;
|
||||||
|
Fake_Action Places;
|
||||||
|
Fake_Action Objects;
|
||||||
|
#Endif; ! NO_PLACES
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ Main; InformLibrary.play(); ];
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#Ifdef USE_MODULES;
|
||||||
|
Link "parserm";
|
||||||
|
#Ifnot;
|
||||||
|
Include "parserm";
|
||||||
|
#Endif; ! USE_MODULES
|
||||||
|
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
Constant LIBRARY_PARSER; ! for dependency checking
|
||||||
|
|
||||||
|
! ==============================================================================
|
994
library-glulx/RusMCE.h
Normal file
994
library-glulx/RusMCE.h
Normal file
|
@ -0,0 +1,994 @@
|
||||||
|
! ===========================================================================
|
||||||
|
!
|
||||||
|
! RusMCE.h:
|
||||||
|
! Системный модуль для русской грамматики
|
||||||
|
! (генератор падежей, проверка глаголов, пр.)
|
||||||
|
! Source encoding: CP1251
|
||||||
|
!
|
||||||
|
! (c) Gayev D.G. 2003
|
||||||
|
!
|
||||||
|
! ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
Constant Tlimit = 31; ! (не больше)
|
||||||
|
Array Tbuffer --> 3+TLimit;
|
||||||
|
Array Tparse --> Tlimit;
|
||||||
|
|
||||||
|
! DL: слегка модифицированная версия для DictionaryLookup
|
||||||
|
! (из "ParserM.h")
|
||||||
|
|
||||||
|
[ DL buf len
|
||||||
|
i;
|
||||||
|
|
||||||
|
if (len == 0 || len > Tlimit) return 0;
|
||||||
|
|
||||||
|
Tbuffer-->0 = len;
|
||||||
|
for (i = 0: i ~= len: i ++) Tbuffer-->(1+i) = buf-->i;
|
||||||
|
Tbuffer-->(1+len) = 0;
|
||||||
|
|
||||||
|
VM_Tokenise(Tbuffer, Tparse);
|
||||||
|
return Tparse-->1;
|
||||||
|
];
|
||||||
|
|
||||||
|
! DLx:
|
||||||
|
! как DL, но для поиска элементов словаря на 'term'
|
||||||
|
|
||||||
|
[ DLx buf len term
|
||||||
|
i;
|
||||||
|
if (len == 0 || len >= Tlimit) return 0;
|
||||||
|
|
||||||
|
Tbuffer-->0 = len+1;
|
||||||
|
for (i = 0: i ~= len: i ++) Tbuffer-->(1+i) = buf-->i;
|
||||||
|
Tbuffer-->(1+len) = term;
|
||||||
|
Tbuffer-->(2+len) = 0;
|
||||||
|
|
||||||
|
VM_Tokenise(Tbuffer, Tparse);
|
||||||
|
return Tparse-->1;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ CyrCharToUpperUni ch;
|
||||||
|
if (ch >= $0430 && ch <=$044F) {
|
||||||
|
return ch - 32;
|
||||||
|
}
|
||||||
|
if (ch == $0451) {
|
||||||
|
return $0401; ! Ё
|
||||||
|
}
|
||||||
|
return ch;
|
||||||
|
];
|
||||||
|
|
||||||
|
Attribute fem_grammar; ! (тип склонения женского рода)
|
||||||
|
|
||||||
|
Property casegen; ! (необязательный собственный генератор падежей объекта)
|
||||||
|
|
||||||
|
! # падежей (нужно парсеру)
|
||||||
|
Constant LanguageCases = 6;
|
||||||
|
|
||||||
|
! Идентификаторы падежей
|
||||||
|
Constant csOff = 0; ! Нет (отключить генератор падежей)
|
||||||
|
|
||||||
|
Constant csNom = 1; ! Именительный падеж (= номинатив)
|
||||||
|
Constant csGen = 2; ! Родительный падеж (= генитив)
|
||||||
|
Constant csDat = 3; ! Дательный падеж (= датив)
|
||||||
|
Constant csAcc = 4; ! Винительный падеж (= аккузатив)
|
||||||
|
Constant csIns = 5; ! Творительный падеж (= инструментал)
|
||||||
|
Constant csPre = 6; ! Предложный падеж (= препозитив)
|
||||||
|
|
||||||
|
! Падеж по умолчанию для вывода ShortName
|
||||||
|
Global csDflt = csNom;
|
||||||
|
|
||||||
|
! Категории объекта
|
||||||
|
Constant ocSM = 1; ! Единственное число / Мужской род
|
||||||
|
Constant ocSF = 2; ! Единственное число / Женский род
|
||||||
|
Constant ocSN = 3; ! Единственное число / Средний род
|
||||||
|
Constant ocPL = 4; ! Множественное число
|
||||||
|
|
||||||
|
! Категория объекта
|
||||||
|
! определить категорию
|
||||||
|
[ objID obj;
|
||||||
|
|
||||||
|
if (obj has pluralname) return ocPL;
|
||||||
|
else if (obj has neuter) return ocSN;
|
||||||
|
else if (obj has female) return ocSF;
|
||||||
|
else if (obj has fem_grammar) return ocSF;
|
||||||
|
else return ocSM;
|
||||||
|
];
|
||||||
|
|
||||||
|
! (Режим отладки генератора падежей)
|
||||||
|
Constant DEBUG_CASES = false;
|
||||||
|
|
||||||
|
! Основная таблица падежных суффиксов
|
||||||
|
|
||||||
|
Constant ADJ_TOP = 64;
|
||||||
|
|
||||||
|
! SM_Req: запрос к таблице падежей (#nreq)
|
||||||
|
! (ед. число, мужской род)
|
||||||
|
[ SM_Req csID nreq;
|
||||||
|
|
||||||
|
switch (nreq) {
|
||||||
|
|
||||||
|
! II склонение, на согласный:
|
||||||
|
! (дом, снег, баран, кнут, мир, парад):
|
||||||
|
! -, -а, -у, -, -ом, -е
|
||||||
|
0: switch (csID) {
|
||||||
|
csNom: return 0;
|
||||||
|
csGen: return 'а//';
|
||||||
|
csDat: return 'у//';
|
||||||
|
csAcc: return 0;
|
||||||
|
csIns: return 'ом';
|
||||||
|
csPre: return 'е//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! II склонение, на -ь:
|
||||||
|
! (снегирь, апрель, пароль, кремень, фонарь, окунь, медведь):
|
||||||
|
! -ь, -я, -ю, -ь, -ем, -е
|
||||||
|
1: switch (csID) {
|
||||||
|
csNom: return 'ь//';
|
||||||
|
csGen: return 'я//';
|
||||||
|
csDat: return 'ю//';
|
||||||
|
csAcc: return 'ь//';
|
||||||
|
csIns: return 'ем';
|
||||||
|
csPre: return 'е//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! II склонение, на -й:
|
||||||
|
! (иней, лакей, зной, май):
|
||||||
|
! -й, -я, -ю, -й, -ем, -е
|
||||||
|
2: switch (csID) {
|
||||||
|
csNom: return 'й//';
|
||||||
|
csGen: return 'я//';
|
||||||
|
csDat: return 'ю//';
|
||||||
|
csAcc: return 'й//';
|
||||||
|
csIns: return 'ем';
|
||||||
|
csPre: return 'е//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! II склонение, на -ий:
|
||||||
|
! (литий, планетарий, крематорий, Евгений, Василий):
|
||||||
|
! -ий, -ия, -ию, -ий, -ием, -ии
|
||||||
|
3: switch (csID) {
|
||||||
|
csNom: return 'ий';
|
||||||
|
csGen: return 'ия';
|
||||||
|
csDat: return 'ию';
|
||||||
|
csAcc: return 'ий';
|
||||||
|
csIns: return 'ием';
|
||||||
|
csPre: return 'ии';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ый:
|
||||||
|
! (красный, белый, сильный, здоровый):
|
||||||
|
! -ый, -ого, -ому, -ый, -ым, -ом
|
||||||
|
64: switch (csID) {
|
||||||
|
csNom: return 'ый';
|
||||||
|
csGen: return 'ого';
|
||||||
|
csDat: return 'ому';
|
||||||
|
csAcc: return 'ый';
|
||||||
|
csIns: return 'ым';
|
||||||
|
csPre: return 'ом';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ой:
|
||||||
|
! (большой, злой, плохой, лихой, нагой):
|
||||||
|
! -ой, -ого, -ому, -ой, -ым, -ом
|
||||||
|
65: switch (csID) {
|
||||||
|
csNom: return 'ой';
|
||||||
|
csGen: return 'ого';
|
||||||
|
csDat: return 'ому';
|
||||||
|
csAcc: return 'ой';
|
||||||
|
csIns: return 'ым';
|
||||||
|
csPre: return 'ом';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ий:
|
||||||
|
! (синий, средний, хороший):
|
||||||
|
! -ий, -его, -ему, -ий, -им, -ем
|
||||||
|
66: switch (csID) {
|
||||||
|
csNom: return 'ий';
|
||||||
|
csGen: return 'его';
|
||||||
|
csDat: return 'ему';
|
||||||
|
csAcc: return 'ий';
|
||||||
|
csIns: return 'им';
|
||||||
|
csPre: return 'ем';
|
||||||
|
}
|
||||||
|
|
||||||
|
} ! switch (nreq)
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
]; ! SM_Req
|
||||||
|
|
||||||
|
! SF_Req: запрос к таблице падежей (#nreq)
|
||||||
|
! (ед. число, женский род)
|
||||||
|
[ SF_Req csID nreq;
|
||||||
|
|
||||||
|
switch (nreq) {
|
||||||
|
|
||||||
|
! I склонение, на -а:
|
||||||
|
! (вода, стрела, зола, комната):
|
||||||
|
! -а, -ы, -е, -у, -ой, -е
|
||||||
|
0: switch (csID) {
|
||||||
|
csNom: return 'а//';
|
||||||
|
csGen: return 'ы//';
|
||||||
|
csDat: return 'е//';
|
||||||
|
csAcc: return 'у//';
|
||||||
|
csIns: return 'ой';
|
||||||
|
csPre: return 'е//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! I склонение, на -я:
|
||||||
|
! (земля, башня):
|
||||||
|
! -я, -и, -е, -ю, -ей, -е
|
||||||
|
1: switch (csID) {
|
||||||
|
csNom: return 'я//';
|
||||||
|
csGen: return 'и//';
|
||||||
|
csDat: return 'е//';
|
||||||
|
csAcc: return 'ю//';
|
||||||
|
csIns: return 'ей';
|
||||||
|
csPre: return 'е//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! III склонение, на -ь:
|
||||||
|
! (метель, ночь, медь, осень):
|
||||||
|
! -ь, -и, -и, -ь, -ью, -и
|
||||||
|
2: switch (csID) {
|
||||||
|
csNom: return 'ь//';
|
||||||
|
csGen: return 'и//';
|
||||||
|
csDat: return 'и//';
|
||||||
|
csAcc: return 'ь//';
|
||||||
|
csIns: return 'ью';
|
||||||
|
csPre: return 'и//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! I склонение, на -ия:
|
||||||
|
! (сессия, лекция, пародия, агония):
|
||||||
|
! -ия, -ии, -ии, -ию, -ией, -ии
|
||||||
|
3: switch (csID) {
|
||||||
|
csNom: return 'ия';
|
||||||
|
csGen: return 'ии';
|
||||||
|
csDat: return 'ии';
|
||||||
|
csAcc: return 'ию';
|
||||||
|
csIns: return 'ией';
|
||||||
|
csPre: return 'ии';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ая:
|
||||||
|
! (красная, большая, приятная):
|
||||||
|
! -ая, -ой, -ой, -ую, -ой, -ой
|
||||||
|
64: switch (csID) {
|
||||||
|
csNom: return 'ая';
|
||||||
|
csGen: return 'ой';
|
||||||
|
csDat: return 'ой';
|
||||||
|
csAcc: return 'ую';
|
||||||
|
csIns: return 'ой';
|
||||||
|
csPre: return 'ой';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -яя:
|
||||||
|
! (синяя, средняя):
|
||||||
|
! -яя, -ей, -ей, -юю, -ей, -ей
|
||||||
|
65: switch (csID) {
|
||||||
|
csNom: return 'яя';
|
||||||
|
csGen: return 'ей';
|
||||||
|
csDat: return 'ей';
|
||||||
|
csAcc: return 'юю';
|
||||||
|
csIns: return 'ей';
|
||||||
|
csPre: return 'ей';
|
||||||
|
}
|
||||||
|
|
||||||
|
} ! switch (nreq)
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
]; ! SF_Req
|
||||||
|
|
||||||
|
! SN_Req: запрос к таблице падежей (#nreq)
|
||||||
|
! (ед. число, средний род)
|
||||||
|
[ SN_Req csID nreq;
|
||||||
|
|
||||||
|
switch (nreq) {
|
||||||
|
|
||||||
|
! II склонение, на -о:
|
||||||
|
! (облако, озеро, утро, ведро, зеркало):
|
||||||
|
! -о, -а, -у, -о, -ом, -е
|
||||||
|
0: switch (csID) {
|
||||||
|
csNom: return 'о//';
|
||||||
|
csGen: return 'а//';
|
||||||
|
csDat: return 'у//';
|
||||||
|
csAcc: return 'о//';
|
||||||
|
csIns: return 'ом';
|
||||||
|
csPre: return 'е//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! II склонение, на -е:
|
||||||
|
! (поле, ложе):
|
||||||
|
! -е, -я, -ю, -е, -ем, -е
|
||||||
|
1: switch (csID) {
|
||||||
|
csNom: return 'е//';
|
||||||
|
csGen: return 'я//';
|
||||||
|
csDat: return 'ю//';
|
||||||
|
csAcc: return 'е//';
|
||||||
|
csIns: return 'ем';
|
||||||
|
csPre: return 'е//';
|
||||||
|
}
|
||||||
|
|
||||||
|
! II склонение, на -ие:
|
||||||
|
! (известие, занятие, приветствие, мышление):
|
||||||
|
! -ие, -ия, -ию, -ие, -ием, -ии
|
||||||
|
2: switch (csID) {
|
||||||
|
csNom: return 'ие';
|
||||||
|
csGen: return 'ия';
|
||||||
|
csDat: return 'ию';
|
||||||
|
csAcc: return 'ие';
|
||||||
|
csIns: return 'ием';
|
||||||
|
csPre: return 'ии';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Разносклоняемое, на -я:
|
||||||
|
! (время, племя, имя, знамя):
|
||||||
|
! -я, -ени, -ени, -я, -енем, -ени
|
||||||
|
3: switch (csID) {
|
||||||
|
csNom: return 'я//';
|
||||||
|
csGen: return 'ени';
|
||||||
|
csDat: return 'ени';
|
||||||
|
csAcc: return 'я//';
|
||||||
|
csIns: return 'енем';
|
||||||
|
csPre: return 'ени';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ое:
|
||||||
|
! (красное, малое, мертвое):
|
||||||
|
! -ое, -ого, -ому, -ое, -ым, -ом
|
||||||
|
64: switch (csID) {
|
||||||
|
csNom: return 'ое';
|
||||||
|
csGen: return 'ого';
|
||||||
|
csDat: return 'ому';
|
||||||
|
csAcc: return 'ое';
|
||||||
|
csIns: return 'ым';
|
||||||
|
csPre: return 'ом';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ее:
|
||||||
|
! (синее, среднее):
|
||||||
|
! -ее, -его, -ему, -ее, -им, -ем
|
||||||
|
65: switch (csID) {
|
||||||
|
csNom: return 'ее';
|
||||||
|
csGen: return 'его';
|
||||||
|
csDat: return 'ему';
|
||||||
|
csAcc: return 'ее';
|
||||||
|
csIns: return 'им';
|
||||||
|
csPre: return 'ем';
|
||||||
|
}
|
||||||
|
|
||||||
|
} ! switch (nreq)
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
]; ! SN_Req
|
||||||
|
|
||||||
|
! PL_Req: запрос к таблице падежей (#nreq)
|
||||||
|
! (мн. число)
|
||||||
|
[ PL_Req csID nreq;
|
||||||
|
|
||||||
|
switch (nreq) {
|
||||||
|
|
||||||
|
! TMP: нерегулярность Gen Pl
|
||||||
|
|
||||||
|
! Множественное, на -и:
|
||||||
|
! (овраги, цели, недели):
|
||||||
|
! -и, -ов/-ей/-, -ам/-ям, -и, -ами/-ями, -ах/-ях
|
||||||
|
0: switch (csID) {
|
||||||
|
csNom: return 'и//';
|
||||||
|
csGen: return 'ев'; ! TMP: не всегда! - ей,
|
||||||
|
csDat: return 'ям';
|
||||||
|
csAcc: return 'и//';
|
||||||
|
csIns: return 'ями';
|
||||||
|
csPre: return 'ях';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Множественное, на -ы:
|
||||||
|
! (работы, солдаты, заботы, закаты):
|
||||||
|
! -ы, -ов/-ей/-, -ам/-ям, -и, -ами/-ями, -ах/-ях
|
||||||
|
1: switch (csID) {
|
||||||
|
csNom: return 'ы//';
|
||||||
|
csGen: return 'ов'; ! TMP: не всегда!
|
||||||
|
csDat: return 'ам';
|
||||||
|
csAcc: return 'ы//';
|
||||||
|
csIns: return 'ами';
|
||||||
|
csPre: return 'ах';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Множественное, на -а:
|
||||||
|
! (облака, дома, номера):
|
||||||
|
! -а, -ов, -ам, -а, -ами, -ах
|
||||||
|
2: switch (csID) {
|
||||||
|
csNom: return 'а//';
|
||||||
|
csGen: return 'ов';
|
||||||
|
csDat: return 'ам';
|
||||||
|
csAcc: return 'а//';
|
||||||
|
csIns: return 'ами';
|
||||||
|
csPre: return 'ах';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Множественное, на -я:
|
||||||
|
! (поля, моря, якоря):
|
||||||
|
! -я, -ей, -ям, -я, -ями, -ях
|
||||||
|
3: switch (csID) {
|
||||||
|
csNom: return 'я//';
|
||||||
|
csGen: return 'ей';
|
||||||
|
csDat: return 'ям';
|
||||||
|
csAcc: return 'я//';
|
||||||
|
csIns: return 'ями';
|
||||||
|
csPre: return 'ях';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Множественное, на -ья:
|
||||||
|
! (листья, деревья, коренья, стулья, перья):
|
||||||
|
! -ья, -ьев, -ьям, -ья, -ьями, -ьях
|
||||||
|
4: switch (csID) {
|
||||||
|
csNom: return 'ья';
|
||||||
|
csGen: return 'ьев';
|
||||||
|
csDat: return 'ьям';
|
||||||
|
csAcc: return 'ья';
|
||||||
|
csIns: return 'ьями';
|
||||||
|
csPre: return 'ьях';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Множественное, на -ия:
|
||||||
|
! (изделия, решения, стремления, понятия):
|
||||||
|
! -ия, -ий, -иям, -ия, -иями, -иях
|
||||||
|
5: switch (csID) {
|
||||||
|
csNom: return 'ия';
|
||||||
|
csGen: return 'ий';
|
||||||
|
csDat: return 'иям';
|
||||||
|
csAcc: return 'ия';
|
||||||
|
csIns: return 'иями';
|
||||||
|
csPre: return 'иях';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Множественное, на -ии:
|
||||||
|
! (станции, реляции, апатии):
|
||||||
|
! -ия, -ий, -иям, -ия, -иями, -иях
|
||||||
|
6: switch (csID) {
|
||||||
|
csNom: return 'ии';
|
||||||
|
csGen: return 'ий';
|
||||||
|
csDat: return 'иям';
|
||||||
|
csAcc: return 'ии';
|
||||||
|
csIns: return 'иями';
|
||||||
|
csPre: return 'иях';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ые:
|
||||||
|
! (красные, опасные, тяжелые):
|
||||||
|
! -ые, -ых, -ым, -ые, -ыми, -ых
|
||||||
|
64: switch (csID) {
|
||||||
|
csNom: return 'ые';
|
||||||
|
csGen: return 'ых';
|
||||||
|
csDat: return 'ым';
|
||||||
|
csAcc: return 'ые';
|
||||||
|
csIns: return 'ыми';
|
||||||
|
csPre: return 'ых';
|
||||||
|
}
|
||||||
|
|
||||||
|
! Прилагательные, на -ие:
|
||||||
|
! (синие, легкие, пологие):
|
||||||
|
! -ие, -их, -им, -ие, -ими, -их
|
||||||
|
65: switch (csID) {
|
||||||
|
csNom: return 'ие';
|
||||||
|
csGen: return 'их';
|
||||||
|
csDat: return 'им';
|
||||||
|
csAcc: return 'ие';
|
||||||
|
csIns: return 'ими';
|
||||||
|
csPre: return 'их';
|
||||||
|
}
|
||||||
|
|
||||||
|
} ! switch (nreq)
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
]; ! PL_Req
|
||||||
|
|
||||||
|
! Ending PostProcess (as after 'prch')
|
||||||
|
[ EndingPost u prch;
|
||||||
|
if (u) {
|
||||||
|
! Модификация после 'г'/'к'/'х'/'ж'/'ш'/'ч'/'щ':
|
||||||
|
! сапог -> сапоги, клубок -> клубки, сполох -> сполохи
|
||||||
|
if (prch == 'г' or 'к' or 'х' or 'ж' or 'ш' or 'ч' or 'щ')
|
||||||
|
switch (u) {
|
||||||
|
'ы//': return 'и//';
|
||||||
|
'ый': return 'ий';
|
||||||
|
'ые': return 'ие';
|
||||||
|
'ым': return 'им';
|
||||||
|
'ыми': return 'ими';
|
||||||
|
'ых': return 'их';
|
||||||
|
}
|
||||||
|
|
||||||
|
! TMP: больше вариантов!
|
||||||
|
|
||||||
|
! после ц: ов, ом -> ев, ем (если окончание безударное)
|
||||||
|
! после ж, ш: я -> а, ю -> у
|
||||||
|
}
|
||||||
|
|
||||||
|
return u;
|
||||||
|
];
|
||||||
|
|
||||||
|
! Ending PreProcess (as after 'prch')
|
||||||
|
[ EndingPre u prch;
|
||||||
|
if (u) {
|
||||||
|
if (prch == 'г' or 'к' or 'х' or 'ж' or 'ш' or 'ч' or 'щ')
|
||||||
|
switch (u) {
|
||||||
|
'и//': return 'ы//';
|
||||||
|
'ий': return 'ый';
|
||||||
|
'ие': return 'ые';
|
||||||
|
'им': return 'ым';
|
||||||
|
'ими': return 'ыми';
|
||||||
|
'их': return 'ых';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return u;
|
||||||
|
];
|
||||||
|
|
||||||
|
! CCaseEnd:
|
||||||
|
! перевести падежное окончание (start..end) в соответствующий падеж (csID)
|
||||||
|
! ocFN - генератор окончаний; disc - дискриминатор; prch - символ перед окончанием
|
||||||
|
[ CCaseEnd start end csID ocFN disc prch
|
||||||
|
i u v;
|
||||||
|
|
||||||
|
v = EndingPre (DL (start, (end-start)/4), prch);
|
||||||
|
|
||||||
|
! Выполнить поиск по таблицам...
|
||||||
|
for (i = 0: : ++ i) {
|
||||||
|
u = indirect (ocFN, csNom, i);
|
||||||
|
|
||||||
|
if (u == -1) {
|
||||||
|
if (i >= ADJ_TOP) ! (больше нет вариантов)
|
||||||
|
{ print "?"; return; }
|
||||||
|
else ! (прилагательные)
|
||||||
|
{ i = ADJ_TOP - 1; }
|
||||||
|
} else if (u == v) {
|
||||||
|
|
||||||
|
if (disc) { -- disc; continue; }
|
||||||
|
|
||||||
|
if (csID ~= csNom) u = EndingPost (indirect (ocFN, csID, i), prch);
|
||||||
|
else u = EndingPost (u, prch);
|
||||||
|
|
||||||
|
if (u) print (address) u;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
! Специфичная версия для 'LanguageRefers'
|
||||||
|
|
||||||
|
[ EndingLookup addr len csID
|
||||||
|
v u ocFN i;
|
||||||
|
|
||||||
|
if (csID == 0) rtrue; !! (любой падеж допустим)
|
||||||
|
|
||||||
|
if (len ~= 0) {
|
||||||
|
v = DL (addr, len);
|
||||||
|
if (v == 0) rfalse;
|
||||||
|
}
|
||||||
|
else v = 0;
|
||||||
|
|
||||||
|
ocFN = SM_Req;
|
||||||
|
|
||||||
|
for (::) {
|
||||||
|
for (i = 0: : ++ i) {
|
||||||
|
u = indirect (ocFN, csID, i);
|
||||||
|
|
||||||
|
if (u == -1) {
|
||||||
|
if (i >= ADJ_TOP) break; ! (больше нет вариантов)
|
||||||
|
else i = ADJ_TOP - 1; ! (прилагательные)
|
||||||
|
}
|
||||||
|
else if (u == v) rtrue;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (ocFN) {
|
||||||
|
SM_Req: ocFN = SF_Req;
|
||||||
|
SF_Req: ocFN = SN_Req;
|
||||||
|
SN_Req: ocFN = PL_Req;
|
||||||
|
PL_Req: rfalse; ! (больше нет вариантов)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
!
|
||||||
|
! Проверить корректность глагольного суффикса
|
||||||
|
!
|
||||||
|
[ IsVerbSuffix start len;
|
||||||
|
|
||||||
|
! ("-ся|-сь": убрать)
|
||||||
|
if (len >= 2 && start-->(len-2) == 'с' && start-->(len-1) == 'я' or 'ь')
|
||||||
|
len = len - 2;
|
||||||
|
|
||||||
|
if (len == 1 && start-->0 == 'и' or 'ь') rtrue;
|
||||||
|
|
||||||
|
! "[аеиоуыюя]([ийь]|ть)"
|
||||||
|
if (start-->0 == 'а' or 'е' or 'и' or 'о' or 'у' or 'ы' or 'ю' or 'я') {
|
||||||
|
start = start + 4;
|
||||||
|
len--;
|
||||||
|
|
||||||
|
if (len == 1 && start-->0 == 'й') rtrue;
|
||||||
|
}
|
||||||
|
|
||||||
|
! "ти|ть"
|
||||||
|
if (len == 2 && start-->0 == 'т' && start-->1 == 'ь' or 'и') rtrue;
|
||||||
|
|
||||||
|
! "нь|ни|нуть"
|
||||||
|
if (start-->0 == 'н' &&
|
||||||
|
((len == 2 && start-->1 == 'и' or 'ь') ||
|
||||||
|
(len == 4 && start-->1 == 'у' && start-->2 == 'т' && start-->3 == 'ь')))
|
||||||
|
rtrue;
|
||||||
|
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
!
|
||||||
|
! Проверить корректность глагольного префикса
|
||||||
|
!
|
||||||
|
[ IsVerbPrefix start len
|
||||||
|
w;
|
||||||
|
|
||||||
|
w = DL (start, len);
|
||||||
|
if (w == 0) return false;
|
||||||
|
|
||||||
|
return w ==
|
||||||
|
'в//' or 'вз' or 'во' or 'вы' or
|
||||||
|
'до' or
|
||||||
|
'за' or
|
||||||
|
'из' or 'ис' or
|
||||||
|
'на' or
|
||||||
|
'о//' or 'об' or 'обо' or 'от' or 'ото' or
|
||||||
|
'по' or 'под' or 'подо' or 'пре' or 'при' or 'про' or 'пере' or
|
||||||
|
'раз' or 'рас' or
|
||||||
|
'с//' or 'со' or 'съ' or 'у//';
|
||||||
|
];
|
||||||
|
|
||||||
|
!
|
||||||
|
! Проверить корректность глагола (#wnum)
|
||||||
|
!
|
||||||
|
[ LanguageIsVerb buffer parse wnum
|
||||||
|
adr beg len end w;
|
||||||
|
|
||||||
|
adr = buffer + (parse-->(wnum*3))*4;
|
||||||
|
len = parse-->(wnum*3-1);
|
||||||
|
|
||||||
|
w = DLx (adr, len, '!');
|
||||||
|
if (w) return w;
|
||||||
|
|
||||||
|
for (end = len: end > 0: -- end) {
|
||||||
|
if (end == len || IsVerbSuffix (adr + end * 4, len - end))
|
||||||
|
for (beg = 0: beg < end: ++ beg)
|
||||||
|
if (beg == 0 || IsVerbPrefix (adr, beg)) {
|
||||||
|
w = DL (adr + beg * 4, end - beg);
|
||||||
|
if (w ~= 0 && (w->#dict_par1 & 1) ~= 0)
|
||||||
|
return w; ! (verb entry found)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
! Расшифровка глаголов (LanguageVerb):
|
||||||
|
! просмотреть объекты в VerbDepot
|
||||||
|
|
||||||
|
[ LanguageVerb word
|
||||||
|
obj;
|
||||||
|
|
||||||
|
objectloop (obj in VerbDepot) {
|
||||||
|
if (WordInProperty (word, obj, name))
|
||||||
|
{ print (object) obj; rtrue; }
|
||||||
|
}
|
||||||
|
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
! Падеж по умолчанию для вывода LanguageRefers
|
||||||
|
Global csLR = 0;
|
||||||
|
Global csLRU = 0;
|
||||||
|
|
||||||
|
! Обработчик соответствующего символа парсера
|
||||||
|
[ c_token idtok csID
|
||||||
|
retval;
|
||||||
|
|
||||||
|
csLR = csID;
|
||||||
|
csLRU = csID; ! последний падеж, который вызывался
|
||||||
|
|
||||||
|
retval = ParseToken (ELEMENTARY_TT, idtok);
|
||||||
|
|
||||||
|
csLR = 0;
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
];
|
||||||
|
|
||||||
|
! LanguageRefers
|
||||||
|
! Запрос от парсера:
|
||||||
|
! может ли слово #wnum в данном контексте обращаться к объекту obj?
|
||||||
|
|
||||||
|
[ LanguageRefers obj wnum
|
||||||
|
adr len end w csID;
|
||||||
|
|
||||||
|
adr = WordAddress(wnum); len = WordLength(wnum);
|
||||||
|
|
||||||
|
! Для компасных направлений -- упрощенная обработка
|
||||||
|
if (parent (obj) == Compass) {
|
||||||
|
w = DL (adr, len);
|
||||||
|
if (w ~= 0 && WordInProperty (w, obj, name)) rtrue;
|
||||||
|
rfalse;
|
||||||
|
}
|
||||||
|
|
||||||
|
! Для мужских одушевленных предметов Acc -> Gen
|
||||||
|
csID = csLR;
|
||||||
|
if (csID == csAcc && obj has animate && obj has male && obj hasnt fem_grammar)
|
||||||
|
csID = csGen;
|
||||||
|
|
||||||
|
for (end = len: end ~= 0: -- end) {
|
||||||
|
w = DL (adr, end);
|
||||||
|
if (w ~= 0 && WordInProperty (w, obj, name) && EndingLookup (adr + end * 4, len - end, csID))
|
||||||
|
rtrue;
|
||||||
|
}
|
||||||
|
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
Constant ScrLen = 200;
|
||||||
|
Array Scratch --> ScrLen;
|
||||||
|
|
||||||
|
! CCase:
|
||||||
|
! перевести имя объекта (obj) в соответствующий падеж (csID)
|
||||||
|
|
||||||
|
[ CCase obj csID ucase as_obj
|
||||||
|
i dlm limit ocFN;
|
||||||
|
|
||||||
|
#iftrue DEBUG_CASES;
|
||||||
|
|
||||||
|
! (отладочный вывод)
|
||||||
|
csLabel (csID);
|
||||||
|
print " (", (object) obj, ")";
|
||||||
|
|
||||||
|
#ifnot;
|
||||||
|
|
||||||
|
if (as_obj == false && obj == player) {
|
||||||
|
if (ucase) {
|
||||||
|
switch (csID) {
|
||||||
|
csNom: print "Ты";
|
||||||
|
csGen: print "Себя";
|
||||||
|
csDat: print "Себе";
|
||||||
|
csAcc: print "Себя";
|
||||||
|
csIns: print "Собой";
|
||||||
|
csPre: print "Себе";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (csID) {
|
||||||
|
csNom: print "ты";
|
||||||
|
csGen: print "себя";
|
||||||
|
csDat: print "себе";
|
||||||
|
csAcc: print "себя";
|
||||||
|
csIns: print "собой";
|
||||||
|
csPre: print "себе";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (objID (obj)) {
|
||||||
|
ocSM: ocFN = SM_Req;
|
||||||
|
ocSF: ocFN = SF_Req;
|
||||||
|
ocSN: ocFN = SN_Req;
|
||||||
|
ocPL: ocFN = PL_Req;
|
||||||
|
default: return;
|
||||||
|
}
|
||||||
|
|
||||||
|
! Для мужских одушевленных предметов Acc -> Gen
|
||||||
|
if (csID == csAcc && obj has animate &&
|
||||||
|
obj has male && obj hasnt fem_grammar)
|
||||||
|
csID = csGen;
|
||||||
|
|
||||||
|
if (csID ~= 0) {
|
||||||
|
Scratch-->0 = VM_PrintToBuffer(Scratch, ScrLen, obj);
|
||||||
|
|
||||||
|
if (ucase) {
|
||||||
|
Scratch-->1 = CyrCharToUpperUni(Scratch-->1);
|
||||||
|
}
|
||||||
|
|
||||||
|
dlm = 0;
|
||||||
|
limit = Scratch-->0;
|
||||||
|
for (i = 1: i <= limit: ++ i) {
|
||||||
|
if (Scratch-->i == '/') {
|
||||||
|
if (dlm == 0) {
|
||||||
|
dlm = Scratch + i * 4;
|
||||||
|
} else {
|
||||||
|
CCaseF (obj, ocFN, csID, dlm + 4, Scratch + i * 4);
|
||||||
|
dlm = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (dlm ~= 0 && Scratch-->i == ' ') {
|
||||||
|
CCaseF (obj, ocFN, csID, dlm + 4, Scratch + i * 4);
|
||||||
|
dlm = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dlm == 0) print (char) (Scratch-->i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
!
|
||||||
|
if (dlm ~= 0) {
|
||||||
|
CCaseF (obj, ocFN, csID, dlm + 4, Scratch + i * 4);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print (object) obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ CCaseF obj ocFN csID beg end disc;
|
||||||
|
|
||||||
|
! (discriminator present?)
|
||||||
|
while (end-->(-1) == '!') { -- end; ++ disc; }
|
||||||
|
|
||||||
|
if (obj provides casegen && obj.casegen (beg, end, csID));
|
||||||
|
else CCaseEnd (beg, end, csID, ocFN, disc, beg-->(-2));
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
! Вывод краткого имени объекта (через CCase)
|
||||||
|
[ LanguagePrintShortName obj
|
||||||
|
sn;
|
||||||
|
|
||||||
|
sn = short_name;
|
||||||
|
|
||||||
|
if (obj provides sn && PrintOrRun(obj, sn, 1) ~= 0) rtrue;
|
||||||
|
|
||||||
|
CCase (obj, csDflt, false);
|
||||||
|
|
||||||
|
rtrue;
|
||||||
|
];
|
||||||
|
|
||||||
|
! Вывод списка в падеже csID
|
||||||
|
[ WriteListFromCase obj flag csID
|
||||||
|
rval csSV;
|
||||||
|
|
||||||
|
csSV = csDflt; csDflt = csID;
|
||||||
|
|
||||||
|
rval = WriteListFrom (obj, flag);
|
||||||
|
|
||||||
|
csDflt = csSV;
|
||||||
|
return rval;
|
||||||
|
];
|
||||||
|
|
||||||
|
! Подходящее местоимение для 'obj'
|
||||||
|
[ Pronoun obj;
|
||||||
|
print (string) (
|
||||||
|
IIF (obj == player, "Ты", IIF (obj has pluralname, "Они",
|
||||||
|
IIF (obj has female, "Она", IIF (obj has neuter, "Оно", "Он")))));
|
||||||
|
];
|
||||||
|
|
||||||
|
[ PronounS obj;
|
||||||
|
print (string) (
|
||||||
|
IIF (obj == player, "ты", IIF (obj has pluralname, "они",
|
||||||
|
IIF (obj has female, "она", IIF (obj has neuter, "оно", "он")))));
|
||||||
|
];
|
||||||
|
|
||||||
|
! Окончание краткой формы прилагательных/причастий, согласованных с 'obj'
|
||||||
|
! ("открыт[а|о|ы]", "пуст[а|о|ы]")
|
||||||
|
[ SAEnd obj;
|
||||||
|
|
||||||
|
switch (objID (obj)) {
|
||||||
|
ocSM: ;
|
||||||
|
ocSF: print (address) 'а//';
|
||||||
|
ocSN: print (address) 'о//';
|
||||||
|
ocPL: print (address) 'ы//';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
! Окончание глаголов, согласованных с 'obj':
|
||||||
|
! (f1 ? 1-ое : 2-ое) спряжение;
|
||||||
|
! f2 ? 'ют'/'ят' : 'ут'/'ат'
|
||||||
|
[ VEnd obj f1 f2;
|
||||||
|
|
||||||
|
print (address) IIF (obj has pluralname,
|
||||||
|
IIF (f1,
|
||||||
|
IIF (f2, 'ют', 'ут'),
|
||||||
|
IIF (f2, 'ят', 'ат')),
|
||||||
|
IIF (f1, 'ет', 'ит'));
|
||||||
|
];
|
||||||
|
|
||||||
|
! Окончание глаголов: '-ет'/'-ут'
|
||||||
|
[ V1aEnd x; VEnd (x, true, false); ];
|
||||||
|
|
||||||
|
! Окончание глаголов: '-ет'/'-ют'
|
||||||
|
[ V1bEnd x; VEnd (x, true, true); ];
|
||||||
|
|
||||||
|
! Окончание глаголов: '-ит'/'-ат'
|
||||||
|
[ V2aEnd x; VEnd (x, false, false); ];
|
||||||
|
|
||||||
|
! Окончание глаголов: '-ит'/'-ят'
|
||||||
|
[ V2bEnd x; VEnd (x, false, true); ];
|
||||||
|
|
||||||
|
! Окончание глаголов в прошедшем времени
|
||||||
|
[ VPEnd noun;
|
||||||
|
if (noun has pluralname) {print "и"; rtrue;}
|
||||||
|
else if (noun has neuter) {print "о"; rtrue;}
|
||||||
|
else if (noun has female) {print "а"; rtrue;}
|
||||||
|
else {print ""; rtrue;}
|
||||||
|
];
|
||||||
|
|
||||||
|
!
|
||||||
|
! Обработчик беглых гласных
|
||||||
|
! (возвращает true если обработана)
|
||||||
|
!
|
||||||
|
[ ICVowel csID beg end ch0 ch1;
|
||||||
|
|
||||||
|
if ((beg == end && ch0 == 0) || (beg + 4 == end && beg-->0 == ch0)) {
|
||||||
|
if (csID == csNom || csID == csAcc) {
|
||||||
|
if (ch0) print (char) ch0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (ch1) print (char) ch1;
|
||||||
|
}
|
||||||
|
rtrue;
|
||||||
|
}
|
||||||
|
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ AEnd noun;
|
||||||
|
if (noun has pluralname) {print "ые"; rtrue;}
|
||||||
|
else if (noun has neuter) {print "ое"; rtrue;}
|
||||||
|
else if (noun has female) {print "ая"; rtrue;}
|
||||||
|
else {print "ый"; rtrue;}
|
||||||
|
];
|
||||||
|
[ AEnd2 noun;
|
||||||
|
if (noun has pluralname) {print "ие"; rtrue;}
|
||||||
|
else if (noun has neuter) {print "ое"; rtrue;}
|
||||||
|
else if (noun has female) {print "ая"; rtrue;}
|
||||||
|
else {print "ий"; rtrue;}
|
||||||
|
];
|
||||||
|
[ AEnd3 noun;
|
||||||
|
if (noun has pluralname) {print "ие"; rtrue;}
|
||||||
|
else if (noun has neuter) {print "ое"; rtrue;}
|
||||||
|
else if (noun has female) {print "ая"; rtrue;}
|
||||||
|
else {print "ой"; rtrue;}
|
||||||
|
];
|
||||||
|
[ PEnding1 n;
|
||||||
|
if (n has pluralname) {print "ими"; rtrue;}
|
||||||
|
if (n has female) {print "ой"; rtrue;}
|
||||||
|
print "им"; rtrue;
|
||||||
|
];
|
||||||
|
[ PEnding2 n;
|
||||||
|
if (n has pluralname) {print "ыми"; rtrue;}
|
||||||
|
if (n has female) {print "ой"; rtrue;}
|
||||||
|
print "ым"; rtrue;
|
||||||
|
];
|
||||||
|
[ GenIt n;
|
||||||
|
if (n has female) {print "её"; rtrue;}
|
||||||
|
if (n has pluralname) {print "их"; rtrue;}
|
||||||
|
print "его"; rtrue;
|
||||||
|
];
|
||||||
|
[ GenIt2 n;
|
||||||
|
print "н";
|
||||||
|
if (n has female) {print "её"; rtrue;}
|
||||||
|
if (n has pluralname) {print "их"; rtrue;}
|
||||||
|
print "его"; rtrue;
|
||||||
|
];
|
||||||
|
[ DatIt n;
|
||||||
|
if (n has female) {print "ей"; rtrue;}
|
||||||
|
if (n has pluralname) {print "им"; rtrue;}
|
||||||
|
print "ему"; rtrue;
|
||||||
|
];
|
||||||
|
[ DatIt2 n;
|
||||||
|
print "н";
|
||||||
|
if (n has female) {print "ей"; rtrue;}
|
||||||
|
if (n has pluralname) {print "им"; rtrue;}
|
||||||
|
print "ему"; rtrue;
|
||||||
|
];
|
||||||
|
[ InsIt n;
|
||||||
|
if (n has female) {print "ей"; rtrue;}
|
||||||
|
if (n has pluralname) {print "ими"; rtrue;}
|
||||||
|
print "им"; rtrue;
|
||||||
|
];
|
||||||
|
[ InsIt2 n;
|
||||||
|
print "н";
|
||||||
|
if (n has female) {print "ей"; rtrue;}
|
||||||
|
if (n has pluralname) {print "ими"; rtrue;}
|
||||||
|
print "им"; rtrue;
|
||||||
|
];
|
970
library-glulx/RussiaG.h
Normal file
970
library-glulx/RussiaG.h
Normal file
|
@ -0,0 +1,970 @@
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
!
|
||||||
|
! RussiaG: Grammar table entries for the standard verbs library.
|
||||||
|
! Russian version
|
||||||
|
! Encoding: CP1251
|
||||||
|
!
|
||||||
|
! Supplied for use with Inform 6 Release 6/11
|
||||||
|
!
|
||||||
|
! (C) Grankin Andrey 2002
|
||||||
|
! (C) Gayev Denis 2003-2004
|
||||||
|
!
|
||||||
|
! Based on: English grammar Release 6/11 Serial number 040227
|
||||||
|
!
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
! "Мета-глаголы" (системные глаголы игры)
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Verb meta 'счет!'
|
||||||
|
* -> Score
|
||||||
|
* 'полн' -> FullScore;
|
||||||
|
|
||||||
|
Verb meta 'счетполн!'
|
||||||
|
* -> FullScore;
|
||||||
|
|
||||||
|
Verb meta 'q!' 'конец!' 'конец'
|
||||||
|
'конч'
|
||||||
|
* -> Quit;
|
||||||
|
|
||||||
|
Verb meta 'восст!' 'вос' 'восстан' 'восстанов'
|
||||||
|
'загр!' 'загр' 'загрузить' 'загруж'
|
||||||
|
'restore'
|
||||||
|
* -> Restore;
|
||||||
|
|
||||||
|
Verb meta 'провер' 'проверка!'
|
||||||
|
* -> Verify;
|
||||||
|
|
||||||
|
Verb meta 'сохр!' 'сохран'
|
||||||
|
'save'
|
||||||
|
* -> Save;
|
||||||
|
|
||||||
|
Verb meta 'нач' 'заново'
|
||||||
|
'начало!'
|
||||||
|
'перезапуск!'
|
||||||
|
'перезапуст' 'рестарт'
|
||||||
|
* -> Restart;
|
||||||
|
|
||||||
|
Verb meta 'скрипт!' 'транскрипт!' 'отчет!'
|
||||||
|
* -> ScriptOn
|
||||||
|
* 'вкл' -> ScriptOn
|
||||||
|
* 'выкл' -> ScriptOff;
|
||||||
|
|
||||||
|
Verb meta 'остотчет!' * -> ScriptOff;
|
||||||
|
|
||||||
|
! Запись команд
|
||||||
|
|
||||||
|
Verb meta 'запись!'
|
||||||
|
* -> CommandsOn
|
||||||
|
* 'вкл' -> CommandsOn
|
||||||
|
* 'выкл' -> CommandsOff;
|
||||||
|
|
||||||
|
Verb meta 'воспр!'
|
||||||
|
* -> CommandsRead;
|
||||||
|
|
||||||
|
Verb meta 'опис!'
|
||||||
|
* 'норм'/'нормал' -> LMode1
|
||||||
|
* 'дл'/'длин' -> LMode2
|
||||||
|
* 'кр'/'крат' -> LMode3;
|
||||||
|
|
||||||
|
Verb meta 'извещ!'
|
||||||
|
* 'вкл' -> NotifyOn
|
||||||
|
* 'выкл' -> NotifyOff;
|
||||||
|
|
||||||
|
Verb meta 'имена!' 'местоимения!'
|
||||||
|
* -> Pronouns;
|
||||||
|
|
||||||
|
Verb meta 'версия!'
|
||||||
|
* -> Version;
|
||||||
|
|
||||||
|
#IFNDEF NO_PLACES;
|
||||||
|
|
||||||
|
Verb meta 'места!'
|
||||||
|
* -> Places;
|
||||||
|
|
||||||
|
Verb meta 'предметы!'
|
||||||
|
* -> Objects;
|
||||||
|
|
||||||
|
#ENDIF;
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
! Отладочные глаголы и действия
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef DEBUG;
|
||||||
|
|
||||||
|
Verb meta 'мета!'
|
||||||
|
|
||||||
|
! трассировка парсера
|
||||||
|
* 'трасс' number -> TraceLevel
|
||||||
|
* 'трасс' 'вкл' -> TraceOn
|
||||||
|
* 'трасс' 'выкл' -> TraceOff
|
||||||
|
|
||||||
|
! активация действий
|
||||||
|
* 'акт' 'вкл' -> ActionsOn
|
||||||
|
* 'акт' 'выкл' -> ActionsOff
|
||||||
|
|
||||||
|
! вызовы подпрограмм
|
||||||
|
* 'вызов' 'вкл' -> RoutinesOn
|
||||||
|
* 'вызов' 'выкл' -> RoutinesOff
|
||||||
|
|
||||||
|
! выполнение таймеров/демонов
|
||||||
|
* 'таймер'/'демон' 'вкл' -> TimersOn
|
||||||
|
* 'таймер'/'демон' 'выкл' -> TimersOff
|
||||||
|
|
||||||
|
! изменения
|
||||||
|
* 'измен' 'вкл' -> ChangesOn
|
||||||
|
* 'измен' 'выкл' -> ChangesOff
|
||||||
|
|
||||||
|
! выключение случайностей
|
||||||
|
* 'неслуч' -> Predictable
|
||||||
|
|
||||||
|
! телекинез объектов multi
|
||||||
|
* 'тк' multi -> XPurloin
|
||||||
|
|
||||||
|
! абстрагирование noun в noun
|
||||||
|
* 'абс' noun 'в' noun -> XAbstract
|
||||||
|
|
||||||
|
! вывод иерархии объектов
|
||||||
|
* 'иерарх' -> XTree
|
||||||
|
* 'иерарх' noun -> XTree
|
||||||
|
|
||||||
|
! телепортация
|
||||||
|
* 'тп' 'в' number -> Goto
|
||||||
|
* 'тп' 'к' noun -> Gonear
|
||||||
|
|
||||||
|
! вывод области
|
||||||
|
* 'обл' -> Scope
|
||||||
|
* 'обл' noun -> Scope
|
||||||
|
|
||||||
|
! распечатка глагола
|
||||||
|
* 'глагол' special -> Showverb
|
||||||
|
|
||||||
|
! распечатка объекта
|
||||||
|
* 'объект' -> Showobj
|
||||||
|
* 'объект' multi -> Showobj
|
||||||
|
|
||||||
|
! падежные формы
|
||||||
|
* 'форм' noun -> Decline
|
||||||
|
;
|
||||||
|
|
||||||
|
#Ifdef TARGET_GLULX;
|
||||||
|
Verb meta 'глкспис'
|
||||||
|
* -> Glklist;
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
|
||||||
|
#ifnot;
|
||||||
|
|
||||||
|
[ NoMetaSub;
|
||||||
|
"Мета-глаголы доступны только в отладочной версии!";
|
||||||
|
];
|
||||||
|
|
||||||
|
Verb meta 'мета'
|
||||||
|
* -> NoMeta;
|
||||||
|
|
||||||
|
#endif;
|
||||||
|
|
||||||
|
! -----------------------------------------
|
||||||
|
! Объект-декодировщик глаголов
|
||||||
|
! -----------------------------------------
|
||||||
|
|
||||||
|
Object VerbDepot;
|
||||||
|
|
||||||
|
! -----------------------------------------
|
||||||
|
! Специфичные символы парсера
|
||||||
|
! -----------------------------------------
|
||||||
|
|
||||||
|
!! "noun" in nominative
|
||||||
|
[ cNom_noun; return c_token (NOUN_TOKEN, csNom); ];
|
||||||
|
|
||||||
|
!! "noun" in accusative
|
||||||
|
[ cAcc_noun; return c_token (NOUN_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
!! "noun" in genitive
|
||||||
|
[ cGen_noun; return c_token (NOUN_TOKEN, csGen); ];
|
||||||
|
|
||||||
|
!! "noun" in dative
|
||||||
|
[ cDat_noun; return c_token (NOUN_TOKEN, csDat); ];
|
||||||
|
|
||||||
|
!! "noun" in instrumental
|
||||||
|
[ cIns_noun; return c_token (NOUN_TOKEN, csIns); ];
|
||||||
|
|
||||||
|
!! "noun" in prepositive
|
||||||
|
[ cPre_noun; return c_token (NOUN_TOKEN, csPre); ];
|
||||||
|
|
||||||
|
!! "held" in instrumental
|
||||||
|
[ cIns_held; return c_token (HELD_TOKEN, csIns); ];
|
||||||
|
|
||||||
|
!! "held" in accusative
|
||||||
|
[ cAcc_held; return c_token (HELD_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
!! "held" in genitive
|
||||||
|
[ cGen_held; return c_token (HELD_TOKEN, csGen); ];
|
||||||
|
|
||||||
|
!! "worn" in accusative
|
||||||
|
!! (note: there's no 'worn' token)
|
||||||
|
[ cAcc_worn; return c_token (HELD_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
!! "creature" in accusative
|
||||||
|
[ cAcc_creat; return c_token (CREATURE_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
!! "creature" in genitive
|
||||||
|
[ cGen_creat; return c_token (CREATURE_TOKEN, csGen); ];
|
||||||
|
|
||||||
|
!! "creature" in dative
|
||||||
|
[ cDat_creat; return c_token (CREATURE_TOKEN, csDat); ];
|
||||||
|
|
||||||
|
!! "multi" in accusative
|
||||||
|
[ cAcc_multi; return c_token (MULTI_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
!! "multiheld" in accusative
|
||||||
|
[ cAcc_multiheld; return c_token (MULTIHELD_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
!! "multiexcept" in accusative
|
||||||
|
[ cAcc_multiexcept; return c_token (MULTIEXCEPT_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
!! "multiinside" in accusative
|
||||||
|
[ cAcc_multiinside; return c_token (MULTIINSIDE_TOKEN, csAcc); ];
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
! И собственно рабочие глаголы
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Verb 'да!' 'да'
|
||||||
|
* -> Yes;
|
||||||
|
|
||||||
|
Verb 'нет!' 'нет'
|
||||||
|
* -> No;
|
||||||
|
|
||||||
|
Verb 'бля' 'хуй' 'дерьмо' 'сука' 'говно' 'трахн' 'трах'
|
||||||
|
* -> Strong
|
||||||
|
* topic -> Strong;
|
||||||
|
Verb 'черт' 'блин'
|
||||||
|
* -> Mild
|
||||||
|
* topic -> Mild;
|
||||||
|
|
||||||
|
!
|
||||||
|
! Инвентарь
|
||||||
|
!
|
||||||
|
|
||||||
|
Verb 'и//' 'i!'
|
||||||
|
'инв!' 'инвент!' 'инвентарь!'
|
||||||
|
* -> Inv
|
||||||
|
* 'высок'/'выс' -> InvTall
|
||||||
|
* 'широк'/'шир' -> InvWide;
|
||||||
|
|
||||||
|
Object "инвентарь" VerbDepot
|
||||||
|
with name 'и//' 'i!' 'инв!' 'инвент!';
|
||||||
|
|
||||||
|
!
|
||||||
|
! Осмотр и поиск
|
||||||
|
!
|
||||||
|
|
||||||
|
! "смотреть"/"глядеть"
|
||||||
|
Verb 'l!' 'x!'
|
||||||
|
'смотр' 'см' 'о//'
|
||||||
|
'гл' 'гля' 'гляд'
|
||||||
|
* -> Look
|
||||||
|
* 'на' cAcc_noun -> Examine
|
||||||
|
* 'в'/'во' cAcc_noun -> Search
|
||||||
|
* 'внутри' cGen_noun -> Search
|
||||||
|
* 'под' cIns_noun -> LookUnder
|
||||||
|
* 'под' cAcc_noun -> LookUnder
|
||||||
|
* 'о'/'об'/'обо'/'про' topic 'в'/'во' cPre_noun -> Consult
|
||||||
|
* 'в'/'во' cPre_noun 'о'/'об'/'обо'/'про' topic -> Consult
|
||||||
|
* cNom_noun -> Examine
|
||||||
|
* cAcc_noun -> Examine;
|
||||||
|
|
||||||
|
Object "смотреть" VerbDepot
|
||||||
|
with name 'l!' 'x!' 'смотр' 'см' 'о//' 'гл' 'гля' 'гляд';
|
||||||
|
|
||||||
|
Verb 'изуч' 'исследов'
|
||||||
|
* cNom_noun -> Search
|
||||||
|
* cAcc_noun -> Search;
|
||||||
|
|
||||||
|
Object "изучить" VerbDepot
|
||||||
|
with name 'изуч' 'исследов';
|
||||||
|
|
||||||
|
! "читать"
|
||||||
|
Verb 'чит' 'прочесть'
|
||||||
|
* 'в'/'во' cPre_noun 'о'/'об'/'обо'/'про' topic -> Consult
|
||||||
|
* 'о'/'об'/'обо'/'про' topic 'в'/'во' cPre_noun -> Consult
|
||||||
|
* cAcc_noun -> Examine;
|
||||||
|
|
||||||
|
Object "читать" VerbDepot
|
||||||
|
with name 'чит' 'прочесть';
|
||||||
|
|
||||||
|
! "искать"
|
||||||
|
Verb 'иск' 'ищ'
|
||||||
|
'ыск' 'ыщ'
|
||||||
|
* 'в'/'во' cPre_noun -> Search
|
||||||
|
* 'в'/'во' cPre_noun 'о'/'об'/'обо'/'про' topic -> Consult
|
||||||
|
* 'о'/'об'/'обо'/'про' topic 'в'/'во' cPre_noun -> Consult
|
||||||
|
* topic 'в'/'во' cPre_noun -> Consult
|
||||||
|
* 'в'/'во' cPre_noun topic -> Consult
|
||||||
|
* cAcc_noun -> Search;
|
||||||
|
|
||||||
|
Object "искать" VerbDepot
|
||||||
|
with name 'иск' 'ищ' 'ыск' 'ыщ';
|
||||||
|
|
||||||
|
!
|
||||||
|
! Передвижение (идти; войти в/выйти из)
|
||||||
|
!
|
||||||
|
|
||||||
|
! Предикат, тестирующий направления
|
||||||
|
[ ADirection; if (noun in compass) rtrue; rfalse; ];
|
||||||
|
|
||||||
|
! "идти"/"бежать"/"ехать"
|
||||||
|
Verb 'ид'
|
||||||
|
'беж' 'бег'
|
||||||
|
'ех' 'езж' 'пойти'
|
||||||
|
* -> VagueGo
|
||||||
|
* noun=ADirection -> Go
|
||||||
|
* 'в'/'во'/'на' noun=ADirection -> Go
|
||||||
|
* cAcc_noun -> Enter
|
||||||
|
* 'в'/'во'/'на' cAcc_noun -> Enter
|
||||||
|
* 'к' cDat_noun -> Enter;
|
||||||
|
|
||||||
|
Object "идти" VerbDepot
|
||||||
|
with name 'ид' 'беж' 'бег' 'ех' 'езж' 'пойти';
|
||||||
|
|
||||||
|
! "войти", "зайти"
|
||||||
|
Verb 'вой' 'войд' 'зай' 'зайд'
|
||||||
|
* -> GoIn
|
||||||
|
* 'в'/'во'/'на' cAcc_noun -> Enter;
|
||||||
|
|
||||||
|
Object "войти" VerbDepot
|
||||||
|
with name 'вой' 'войд' 'зай' 'зайд';
|
||||||
|
|
||||||
|
! "выйти"
|
||||||
|
Verb 'вый' 'выйд'
|
||||||
|
'уй' 'уйд'
|
||||||
|
* -> Exit
|
||||||
|
* 'наружу' -> Exit
|
||||||
|
* 'из'/'с'/'со' cGen_noun -> Exit;
|
||||||
|
|
||||||
|
Object "выйти" VerbDepot
|
||||||
|
with name 'вый' 'выйд' 'уй' 'уйд';
|
||||||
|
|
||||||
|
! "встать"
|
||||||
|
Verb 'вст' 'вста'
|
||||||
|
* -> Exit
|
||||||
|
* 'из'/'с'/'со' cGen_noun -> Exit
|
||||||
|
* 'на'/'в'/'во' cAcc_noun -> Enter;
|
||||||
|
|
||||||
|
Object "встать" VerbDepot
|
||||||
|
with name 'вст' 'вста';
|
||||||
|
|
||||||
|
! "сесть"/"лечь"
|
||||||
|
Verb 'сесть' 'усесться' 'сяд' 'сад'
|
||||||
|
'леч' 'ляг'
|
||||||
|
* 'на'/'в'/'во' cAcc_noun -> Enter;
|
||||||
|
|
||||||
|
Object "сесть" VerbDepot
|
||||||
|
with name 'сесть' 'усесться' 'сяд' 'сад';
|
||||||
|
|
||||||
|
Object "лечь" VerbDepot
|
||||||
|
with name 'леч' 'ляг';
|
||||||
|
|
||||||
|
!
|
||||||
|
! (взять/положить; вынуть/вставить; бросить)
|
||||||
|
!
|
||||||
|
|
||||||
|
! "взять"/"брать"/"вынуть"/"извлечь"/"достать"
|
||||||
|
Verb 'вз' 'возьм'
|
||||||
|
'бра' 'бер'
|
||||||
|
'вын'
|
||||||
|
'извлеч' 'извлек'
|
||||||
|
'дост' 'доста' 'достав'
|
||||||
|
* multi -> Take
|
||||||
|
* cAcc_multi -> Take
|
||||||
|
* cAcc_multiinside 'из'/'с'/'со' cGen_noun -> Remove
|
||||||
|
* multiinside 'из'/'с'/'со' noun -> Remove
|
||||||
|
* 'из'/'с'/'со' cGen_noun cAcc_multiinside -> Remove reverse;
|
||||||
|
|
||||||
|
Object "взять" VerbDepot
|
||||||
|
with name 'вз' 'возьм' 'бра' 'бер' 'вын'
|
||||||
|
'извлеч' 'извлек' 'дост' 'доста' 'достав';
|
||||||
|
|
||||||
|
! "положи"/"клади"/"вставь"/"поместить"/"сунуть"
|
||||||
|
Verb 'лож'
|
||||||
|
'класт' 'клад'
|
||||||
|
'став'
|
||||||
|
'мест' 'мещ'
|
||||||
|
'сов' 'су'
|
||||||
|
* cAcc_multiheld -> Drop
|
||||||
|
* cAcc_multiexcept 'в'/'во' cAcc_noun -> Insert
|
||||||
|
* 'в'/'во' cAcc_noun cAcc_multiexcept -> Insert reverse
|
||||||
|
* cAcc_multiexcept 'внутрь' cGen_noun -> Insert
|
||||||
|
* 'внутрь' cGen_noun cAcc_multiexcept -> Insert reverse
|
||||||
|
* cAcc_multiexcept 'на' cAcc_noun -> PutOn
|
||||||
|
* 'на' cAcc_noun cAcc_multiexcept -> PutOn reverse;
|
||||||
|
|
||||||
|
Object "положить" VerbDepot
|
||||||
|
with name 'лож' 'класт' 'клад' 'став' 'мест' 'мещ' 'сов' 'су';
|
||||||
|
|
||||||
|
! "бросить"/"швырнуть"/"метнуть"/"кинуть"
|
||||||
|
Verb 'брос'
|
||||||
|
'швыр'
|
||||||
|
'мет'
|
||||||
|
'ки' 'кид'
|
||||||
|
* cAcc_multiheld -> Drop
|
||||||
|
* held 'в'/'во'/'на' cAcc_noun -> ThrowAt
|
||||||
|
* 'в'/'во'/'на' cAcc_noun held -> ThrowAt reverse
|
||||||
|
* held cDat_creat -> ThrowAt
|
||||||
|
* cDat_creat held -> ThrowAt reverse;
|
||||||
|
|
||||||
|
Object "бросить" VerbDepot
|
||||||
|
with name 'брос' 'швыр' 'мет' 'ки' 'кид';
|
||||||
|
|
||||||
|
! "[о]порожнить"/"вылить"/"высыпать"
|
||||||
|
Verb 'порожн'
|
||||||
|
'выл'
|
||||||
|
'высып'
|
||||||
|
* cAcc_noun -> Empty
|
||||||
|
* cAcc_noun 'в'/'во'/'на' cAcc_noun -> EmptyT
|
||||||
|
* 'в'/'во'/'на' cAcc_noun cAcc_noun -> EmptyT reverse;
|
||||||
|
|
||||||
|
Object "опорожнить" VerbDepot
|
||||||
|
with name 'порожн' 'выл' 'высып';
|
||||||
|
|
||||||
|
!
|
||||||
|
! (надеть/снять)
|
||||||
|
!
|
||||||
|
|
||||||
|
! "надеть"/"одеть"
|
||||||
|
Verb 'над' 'наде' 'оде'
|
||||||
|
* cAcc_held -> Wear;
|
||||||
|
|
||||||
|
Object "надеть" VerbDepot
|
||||||
|
with name 'над' 'наде' 'оде';
|
||||||
|
|
||||||
|
! "снять"
|
||||||
|
Verb 'снять' 'сним'
|
||||||
|
* cAcc_worn -> Disrobe;
|
||||||
|
|
||||||
|
Object "снять" VerbDepot
|
||||||
|
with name 'снять' 'сним';
|
||||||
|
|
||||||
|
!
|
||||||
|
! (открыть/закрыть; отпереть/запереть; включить/выключить)
|
||||||
|
!
|
||||||
|
|
||||||
|
! "открыть"
|
||||||
|
Verb 'откр'
|
||||||
|
* cAcc_noun -> Open
|
||||||
|
* cAcc_noun cIns_held -> Unlock
|
||||||
|
* cIns_held cAcc_noun -> Unlock reverse;
|
||||||
|
|
||||||
|
! "закрыть"
|
||||||
|
Verb 'закр'
|
||||||
|
* cAcc_noun -> Close
|
||||||
|
* cAcc_noun cIns_held -> Lock
|
||||||
|
* cIns_held cAcc_noun -> Lock reverse;
|
||||||
|
|
||||||
|
Object "открыть" VerbDepot
|
||||||
|
with name 'откр';
|
||||||
|
|
||||||
|
Object "закрыть" VerbDepot
|
||||||
|
with name 'закр';
|
||||||
|
|
||||||
|
! "отпереть"
|
||||||
|
Verb 'отпер' 'отпир' 'отопр'
|
||||||
|
* cAcc_noun cIns_held -> Unlock
|
||||||
|
* cIns_held cAcc_noun -> Unlock reverse;
|
||||||
|
|
||||||
|
! "запереть"
|
||||||
|
Verb 'запер' 'запир' 'запр'
|
||||||
|
* cAcc_noun cIns_held -> Lock
|
||||||
|
* cIns_held cAcc_noun -> Lock reverse;
|
||||||
|
|
||||||
|
Object "отпереть" VerbDepot
|
||||||
|
with name 'отпер' 'отпир' 'отопр';
|
||||||
|
|
||||||
|
Object "запереть" VerbDepot
|
||||||
|
with name 'запер' 'запир' 'запр';
|
||||||
|
|
||||||
|
! "включить"
|
||||||
|
Verb 'включ' 'вкл'
|
||||||
|
* cAcc_noun -> SwitchOn;
|
||||||
|
|
||||||
|
! "выключить"
|
||||||
|
Verb 'выключ' 'выкл'
|
||||||
|
* cAcc_noun -> SwitchOff;
|
||||||
|
|
||||||
|
Object "включить" VerbDepot
|
||||||
|
with name 'включ' 'вкл';
|
||||||
|
|
||||||
|
Object "выключить" VerbDepot
|
||||||
|
with name 'выключ' 'выкл';
|
||||||
|
|
||||||
|
!
|
||||||
|
! Общение с NPC
|
||||||
|
! (дать; показать; сказать; спросить; ответить)
|
||||||
|
!
|
||||||
|
|
||||||
|
! "дать"/"предложить"
|
||||||
|
Verb 'дат'
|
||||||
|
'предлаг' 'предлож'
|
||||||
|
* cAcc_held cDat_creat -> Give
|
||||||
|
* cDat_creat cAcc_held -> Give reverse;
|
||||||
|
|
||||||
|
Object "предложить" VerbDepot
|
||||||
|
with name 'дат' 'предлаг' 'предлож';
|
||||||
|
|
||||||
|
! "показать"
|
||||||
|
Verb 'показ' 'покаж'
|
||||||
|
* cAcc_held cDat_creat -> Show
|
||||||
|
* cDat_creat cAcc_held -> Show reverse;
|
||||||
|
|
||||||
|
Object "показать" VerbDepot
|
||||||
|
with name 'показ' 'покаж';
|
||||||
|
|
||||||
|
! "ответить"
|
||||||
|
Verb 'ответ' 'отвеч'
|
||||||
|
* cDat_creat topic -> Answer reverse
|
||||||
|
* topic 'для' cGen_creat -> Answer;
|
||||||
|
|
||||||
|
Object "ответить" VerbDepot
|
||||||
|
with name 'ответ' 'отвеч';
|
||||||
|
|
||||||
|
! "[рас]сказать"/"сообщить"
|
||||||
|
Verb 'сказ' 'скаж'
|
||||||
|
'сообщ'
|
||||||
|
* cDat_creat 'о'/'об'/'обо'/'про' topic -> Tell
|
||||||
|
* cDat_creat topic -> AskTo;
|
||||||
|
|
||||||
|
Object "сказать" VerbDepot
|
||||||
|
with name 'сказ' 'скаж' 'сообщ';
|
||||||
|
|
||||||
|
! "[рас]спросить"
|
||||||
|
Verb 'спрос'
|
||||||
|
* cAcc_creat 'о'/'об'/'обо'/'про' topic -> Ask
|
||||||
|
* 'у' cAcc_creat 'о'/'об'/'обо'/'про' topic -> Ask
|
||||||
|
* 'о'/'об'/'обо'/'про' topic 'у' cAcc_creat -> Ask reverse;
|
||||||
|
|
||||||
|
Object "спросить" VerbDepot
|
||||||
|
with name 'спрос';
|
||||||
|
|
||||||
|
! "[по/вы]просить"
|
||||||
|
Verb 'прос'
|
||||||
|
* topic 'у' cAcc_creat -> AskFor
|
||||||
|
* 'у' cAcc_creat topic -> AskFor reverse
|
||||||
|
* cAcc_creat topic -> AskTo;
|
||||||
|
|
||||||
|
Object "просить" VerbDepot
|
||||||
|
with name 'прос';
|
||||||
|
|
||||||
|
!
|
||||||
|
! Прочие действия
|
||||||
|
!
|
||||||
|
|
||||||
|
! "извиниться"/"простить"
|
||||||
|
Verb 'извин'
|
||||||
|
'прост' 'прощ'
|
||||||
|
* -> Sorry;
|
||||||
|
|
||||||
|
Object "извинить" VerbDepot
|
||||||
|
with name 'извин' 'прост' 'прощ';
|
||||||
|
|
||||||
|
! "[по]махать"
|
||||||
|
Verb 'мах' 'маш'
|
||||||
|
* -> WaveHands
|
||||||
|
* 'рукой'/'руками' -> WaveHands
|
||||||
|
* cIns_noun -> Wave;
|
||||||
|
|
||||||
|
Object "махать" VerbDepot
|
||||||
|
with name 'мах' 'маш';
|
||||||
|
|
||||||
|
! "установить"/"настроить"
|
||||||
|
Verb 'установ'
|
||||||
|
'настро'
|
||||||
|
* cAcc_noun -> Set
|
||||||
|
* cAcc_noun 'на' special -> SetTo
|
||||||
|
* 'на' special cAcc_noun -> SetTo reverse;
|
||||||
|
|
||||||
|
Object "настроить" VerbDepot
|
||||||
|
with name 'установ' 'настр';
|
||||||
|
|
||||||
|
! "[пере]двигать"
|
||||||
|
Verb 'дви' 'двиг'
|
||||||
|
* cAcc_noun -> Push
|
||||||
|
* cAcc_noun 'на'/'в'/'во' cAcc_noun -> Transfer
|
||||||
|
* 'на'/'в'/'во' cAcc_noun cAcc_noun -> Transfer reverse;
|
||||||
|
|
||||||
|
Object "двигать" VerbDepot
|
||||||
|
with name 'дви' 'двиг';
|
||||||
|
|
||||||
|
! "тянуть"/"тащить"/"волочь"
|
||||||
|
Verb 'тя' 'тяг'
|
||||||
|
'тащ'
|
||||||
|
'волоч' 'волок'
|
||||||
|
'дерн' 'дерг'
|
||||||
|
* cAcc_noun -> Pull
|
||||||
|
* 'за' cAcc_noun -> Pull
|
||||||
|
* cAcc_noun 'на'/'в'/'во' cAcc_noun -> Transfer
|
||||||
|
* 'на'/'в'/'во' cAcc_noun cAcc_noun -> Transfer reverse;
|
||||||
|
|
||||||
|
Object "тянуть" VerbDepot
|
||||||
|
with name 'тя' 'тяг' 'тащ' 'волоч' 'волок' 'дерн' 'дерг';
|
||||||
|
|
||||||
|
! "толкать"/"пихать"/"нажать"
|
||||||
|
Verb 'толк'
|
||||||
|
'пих'
|
||||||
|
'наж' 'нажм' 'нажим'
|
||||||
|
* cAcc_noun -> Push
|
||||||
|
* 'на' cAcc_noun -> Push
|
||||||
|
* cAcc_noun 'на'/'в'/'во' cAcc_noun -> Transfer
|
||||||
|
* 'на'/'в'/'во' cAcc_noun cAcc_noun -> Transfer reverse;
|
||||||
|
|
||||||
|
Object "толкать" VerbDepot
|
||||||
|
with name 'толк' 'пих' 'наж' 'нажм' 'нажим';
|
||||||
|
|
||||||
|
! "вертеть"/"[по]вернуть"/"вращать"
|
||||||
|
Verb 'вер' 'верт'
|
||||||
|
'вращ'
|
||||||
|
* cAcc_noun -> Turn;
|
||||||
|
|
||||||
|
Object "вертеть" VerbDepot
|
||||||
|
with name 'вер' 'верт' 'вращ';
|
||||||
|
|
||||||
|
! "ударить"/"[у]бить"/"атаковать"/"[с]ломать"/"[раз]рушить"
|
||||||
|
Verb 'би' 'бе'
|
||||||
|
'лом'
|
||||||
|
'удар'
|
||||||
|
'руш'
|
||||||
|
'атак' 'атаков'
|
||||||
|
* cAcc_noun -> Attack;
|
||||||
|
|
||||||
|
Object "атаковать" VerbDepot
|
||||||
|
with name 'би' 'бе' 'лом' 'удар' 'руш' 'атак' 'атаков';
|
||||||
|
|
||||||
|
! "напасть"
|
||||||
|
Verb 'напас' 'напад'
|
||||||
|
* 'на' cAcc_noun -> Attack;
|
||||||
|
|
||||||
|
Object "напасть" VerbDepot
|
||||||
|
with name 'напас' 'напад';
|
||||||
|
|
||||||
|
! "[о]ж[и]дать"
|
||||||
|
Verb 'z!'
|
||||||
|
'ж!'
|
||||||
|
'жд' 'жид'
|
||||||
|
* -> Wait;
|
||||||
|
|
||||||
|
Object "ждать" VerbDepot
|
||||||
|
with name 'z!' 'ж!' 'жд' 'жид';
|
||||||
|
|
||||||
|
! "[съ]есть"/"[со]жрать"/"[с]кушать"
|
||||||
|
Verb 'есть' 'еш'
|
||||||
|
'жр'
|
||||||
|
'куш'
|
||||||
|
* cAcc_held -> Eat;
|
||||||
|
|
||||||
|
Object "есть" VerbDepot
|
||||||
|
with name 'есть' 'еш' 'жр';
|
||||||
|
|
||||||
|
! "[вы]пить"
|
||||||
|
Verb 'пи'
|
||||||
|
* cAcc_noun -> Drink;
|
||||||
|
|
||||||
|
Object "пить" VerbDepot
|
||||||
|
with name 'пи';
|
||||||
|
|
||||||
|
! "спать"/"дремать"
|
||||||
|
Verb 'спа' 'уснуть' 'усни' 'дрем' 'засн'
|
||||||
|
* -> Sleep;
|
||||||
|
|
||||||
|
Object "спать" VerbDepot
|
||||||
|
with name 'спа' 'уснуть' 'усни' 'дрем' 'засн';
|
||||||
|
|
||||||
|
! "[раз]будить"
|
||||||
|
Verb 'буд'
|
||||||
|
* -> Wake
|
||||||
|
* cAcc_creat -> WakeOther;
|
||||||
|
|
||||||
|
Object "будить" VerbDepot
|
||||||
|
with name 'буд';
|
||||||
|
|
||||||
|
Verb 'просн'
|
||||||
|
* -> Wake;
|
||||||
|
|
||||||
|
Object "проснуться" VerbDepot
|
||||||
|
with name 'просн';
|
||||||
|
|
||||||
|
! "петь"
|
||||||
|
Verb 'пе' 'по'
|
||||||
|
* -> Sing;
|
||||||
|
|
||||||
|
Object "петь" VerbDepot
|
||||||
|
with name 'пе' 'по';
|
||||||
|
|
||||||
|
! "[за]лезть"
|
||||||
|
Verb 'лез' 'лаз'
|
||||||
|
* -> Exit
|
||||||
|
* 'на' cAcc_noun -> Climb
|
||||||
|
* 'по' cDat_noun -> Climb
|
||||||
|
* 'в'/'во' cAcc_noun -> Enter
|
||||||
|
* 'с'/'со' cGen_noun -> Exit;
|
||||||
|
|
||||||
|
|
||||||
|
Object "лезть" VerbDepot
|
||||||
|
with name 'лез' 'лаз';
|
||||||
|
|
||||||
|
! "[по]куп(и/а)ть"
|
||||||
|
Verb 'куп'
|
||||||
|
* cAcc_noun -> Buy;
|
||||||
|
|
||||||
|
Object "купить" VerbDepot
|
||||||
|
with name 'куп';
|
||||||
|
|
||||||
|
! "сжать"/"[с/раз]давить"
|
||||||
|
Verb 'сжа' 'жм' 'жим'
|
||||||
|
'дав'
|
||||||
|
* cAcc_noun -> Squeeze;
|
||||||
|
|
||||||
|
Object "сжать" VerbDepot
|
||||||
|
with name 'сжа' 'жм' 'жим' 'дав';
|
||||||
|
|
||||||
|
! "плавать"/"нырять"
|
||||||
|
Verb 'плав' 'плыв' 'пл'
|
||||||
|
'ныр'
|
||||||
|
* -> Swim;
|
||||||
|
|
||||||
|
Object "плавать" VerbDepot
|
||||||
|
with name 'плав' 'плыв' 'ныр' 'пл';
|
||||||
|
|
||||||
|
! "качать[ся]"
|
||||||
|
Verb 'кач'
|
||||||
|
* cAcc_noun -> Swing
|
||||||
|
* 'на' cPre_noun -> Swing; ! "качаться"
|
||||||
|
|
||||||
|
Object "качать" VerbDepot
|
||||||
|
with name 'кач';
|
||||||
|
|
||||||
|
! "дуть"
|
||||||
|
Verb 'ду'
|
||||||
|
* 'в'/'во' cAcc_held -> Blow
|
||||||
|
* cAcc_held -> Blow; ! "задуть"
|
||||||
|
|
||||||
|
Object "дуть" VerbDepot
|
||||||
|
with name 'ду';
|
||||||
|
|
||||||
|
! "молить[ся]"
|
||||||
|
Verb 'мол'
|
||||||
|
* -> Pray;
|
||||||
|
|
||||||
|
Object "молить" VerbDepot
|
||||||
|
with name 'мол';
|
||||||
|
|
||||||
|
! "целовать"/"обнимать"
|
||||||
|
Verb 'целов' 'целуй' 'обнять' 'обним'
|
||||||
|
* cAcc_creat -> Kiss;
|
||||||
|
|
||||||
|
Object "целовать" VerbDepot
|
||||||
|
with name 'целов' 'целуй' 'обнять' 'обним';
|
||||||
|
|
||||||
|
! "[за]думать[ся]"/"мыслить"
|
||||||
|
Verb 'дум'
|
||||||
|
'мысл' 'мышл'
|
||||||
|
* -> Think;
|
||||||
|
|
||||||
|
Object "думать" VerbDepot
|
||||||
|
with name 'дум' 'мысл' 'мышл';
|
||||||
|
|
||||||
|
! "нюхать"/"нюхнуть"
|
||||||
|
Verb 'нюх'
|
||||||
|
* -> Smell
|
||||||
|
* cAcc_noun -> Smell
|
||||||
|
* 'к' cDat_noun -> Smell; ! "принюхаться"
|
||||||
|
|
||||||
|
Object "нюхать" VerbDepot
|
||||||
|
with name 'нюх';
|
||||||
|
|
||||||
|
! "слушать"
|
||||||
|
Verb 'слух' 'слуш' 'слыш'
|
||||||
|
* -> Listen
|
||||||
|
* cAcc_noun -> Listen
|
||||||
|
* 'к' cDat_noun -> Listen; ! "прислушаться"
|
||||||
|
|
||||||
|
Object "слушать" VerbDepot
|
||||||
|
with name 'слух' 'слуш' 'слыш';
|
||||||
|
|
||||||
|
! "вку[сить/шать]"/"лизать"/"сосать"
|
||||||
|
Verb 'вкус' 'вкуш'
|
||||||
|
'лиз'
|
||||||
|
'сос'
|
||||||
|
* cAcc_noun -> Taste;
|
||||||
|
|
||||||
|
Object "вкусить" VerbDepot
|
||||||
|
with name 'вкус' 'вкуш' 'лиз';
|
||||||
|
|
||||||
|
! "трогать"/"тронуть"
|
||||||
|
Verb 'тро' 'трог'
|
||||||
|
'щуп'
|
||||||
|
* cAcc_noun -> Touch
|
||||||
|
* 'до' cGen_noun -> Touch; ! "дотронуться"
|
||||||
|
|
||||||
|
Object "трогать" VerbDepot
|
||||||
|
with name 'тро' 'трог' 'щуп';
|
||||||
|
|
||||||
|
! "коснуть[ся]"/"касать[ся]"
|
||||||
|
Verb 'кас' 'кос'
|
||||||
|
* cGen_noun -> Touch
|
||||||
|
* 'к' cDat_noun -> Touch; ! "прикоснуться"
|
||||||
|
|
||||||
|
Object "коснуться" VerbDepot
|
||||||
|
with name 'кас' 'кос';
|
||||||
|
|
||||||
|
! "тереть"
|
||||||
|
Verb 'тер' 'тир' 'тр'
|
||||||
|
* cAcc_noun -> Rub;
|
||||||
|
|
||||||
|
Object "тереть" VerbDepot
|
||||||
|
with name 'тер' 'тир' 'тр';
|
||||||
|
|
||||||
|
! "вязать"
|
||||||
|
Verb 'вяз' 'вяж'
|
||||||
|
* cAcc_noun -> Tie
|
||||||
|
* cAcc_noun 'к' cDat_noun -> Tie ! "привязать"
|
||||||
|
* 'к' cDat_noun cAcc_noun -> Tie reverse
|
||||||
|
* cAcc_noun 'с'/'со' cIns_noun -> Tie ! "связать"
|
||||||
|
* 'с'/'со' cIns_noun cAcc_noun -> Tie reverse;
|
||||||
|
|
||||||
|
Object "вязать" VerbDepot
|
||||||
|
with name 'вяз' 'вяж';
|
||||||
|
|
||||||
|
! "жечь"/"жги"
|
||||||
|
Verb 'жеч' 'жг'
|
||||||
|
* cAcc_noun -> Burn
|
||||||
|
* cAcc_noun cIns_held -> Burn
|
||||||
|
* cIns_held cAcc_noun -> Burn reverse;
|
||||||
|
|
||||||
|
Object "жечь" VerbDepot
|
||||||
|
with name 'жеч' 'жг';
|
||||||
|
|
||||||
|
! "наполнить"
|
||||||
|
Verb 'полн'
|
||||||
|
* cAcc_noun -> Fill;
|
||||||
|
|
||||||
|
Object "наполнить" VerbDepot
|
||||||
|
with name 'полн';
|
||||||
|
|
||||||
|
! "резать"
|
||||||
|
Verb 'рез' 'реж'
|
||||||
|
* cAcc_noun -> Cut;
|
||||||
|
|
||||||
|
Object "резать" VerbDepot
|
||||||
|
with name 'рез' 'реж';
|
||||||
|
|
||||||
|
! "прыгать"/"скакать"
|
||||||
|
Verb 'прыг'
|
||||||
|
'скак' 'скач' 'скок'
|
||||||
|
* -> Jump
|
||||||
|
* 'через' cAcc_noun -> JumpOver;
|
||||||
|
|
||||||
|
Object "прыгать" VerbDepot
|
||||||
|
with name 'прыг' 'скак' 'скач' 'скок';
|
||||||
|
|
||||||
|
! "копать"/"рыть"
|
||||||
|
Verb 'коп'
|
||||||
|
'ры' 'ро'
|
||||||
|
* cAcc_noun -> Dig
|
||||||
|
* cAcc_noun cIns_held -> Dig
|
||||||
|
* cIns_held cAcc_noun -> Dig reverse;
|
||||||
|
|
||||||
|
Object "копать" VerbDepot
|
||||||
|
with name 'коп' 'ры' 'ро';
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Global w_sense;
|
||||||
|
|
||||||
|
[ c_sense;
|
||||||
|
|
||||||
|
w_sense = NextWord ();
|
||||||
|
|
||||||
|
if (w_sense == 'вкус' or 'слух' or 'нюх' or 'запах' or 'ощупь')
|
||||||
|
return GPR_PREPOSITION;
|
||||||
|
|
||||||
|
return GPR_FAIL;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ SenseSub;
|
||||||
|
|
||||||
|
switch (w_sense) {
|
||||||
|
'слух': <<Listen noun>>;
|
||||||
|
'вкус': <<Taste noun>>;
|
||||||
|
'нюх', 'запах': <<Smell noun>>;
|
||||||
|
'ощупь': <<Touch noun>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
"Непонятно, как ты хочешь попробовать ", (cAcc) noun, ".";
|
||||||
|
];
|
||||||
|
|
||||||
|
! "пробовать"
|
||||||
|
Verb 'проб' 'пробов'
|
||||||
|
* cAcc_noun 'на' c_sense -> Sense
|
||||||
|
* 'на' c_sense cAcc_noun -> Sense;
|
||||||
|
|
||||||
|
Object "пробовать" VerbDepot
|
||||||
|
with name 'проб' 'пробов';
|
||||||
|
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
! В завершение тривиальные рутины (если они не заданы пользователем)
|
||||||
|
! ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#Stub AfterLife 0;
|
||||||
|
#Stub AfterPrompt 0;
|
||||||
|
#Stub Amusing 0;
|
||||||
|
#Stub BeforeParsing 0;
|
||||||
|
#Stub ChooseObjects 2;
|
||||||
|
#Stub DarkToDark 0;
|
||||||
|
#Stub DeathMessage 0;
|
||||||
|
#Stub GamePostRoutine 0;
|
||||||
|
#Stub GamePreRoutine 0;
|
||||||
|
#Stub InScope 1;
|
||||||
|
#Stub LookRoutine 0;
|
||||||
|
#Stub NewRoom 0;
|
||||||
|
#Stub ParseNumber 2;
|
||||||
|
#Stub ParserError 1;
|
||||||
|
#Stub PrintTaskName 1;
|
||||||
|
#Stub PrintVerb 1;
|
||||||
|
#Stub TimePasses 0;
|
||||||
|
#Stub UnknownVerb 1;
|
||||||
|
|
||||||
|
#Ifdef TARGET_GLULX;
|
||||||
|
#Stub HandleGlkEvent 2;
|
||||||
|
#Stub IdentifyGlkObject 4;
|
||||||
|
#Stub InitGlkWindow 1;
|
||||||
|
#Endif; ! TARGET_GLULX
|
||||||
|
|
||||||
|
#Ifndef PrintRank;
|
||||||
|
! Constant Make__PR;
|
||||||
|
! #Endif;
|
||||||
|
! #Ifdef Make__PR;
|
||||||
|
[ PrintRank; "."; ];
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
#Ifndef ParseNoun;
|
||||||
|
! Constant Make__PN;
|
||||||
|
! #Endif;
|
||||||
|
! #Ifdef Make__PN;
|
||||||
|
[ ParseNoun obj; obj = obj; return -1; ];
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
#Default Story 0;
|
||||||
|
#Default Headline 0;
|
||||||
|
|
||||||
|
#Ifdef INFIX;
|
||||||
|
#Include "infix";
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
Constant LIBRARY_RUSSIAG;
|
||||||
|
|
||||||
|
! ==============================================================================
|
1158
library-glulx/Russian.h
Normal file
1158
library-glulx/Russian.h
Normal file
File diff suppressed because it is too large
Load diff
55
library-glulx/VerbLib.h
Normal file
55
library-glulx/VerbLib.h
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
! ==============================================================================
|
||||||
|
! VERBLIB: Front end to standard verbs library.
|
||||||
|
!
|
||||||
|
! Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
||||||
|
!
|
||||||
|
! Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
||||||
|
!
|
||||||
|
! In your game file, Include three library files in this order:
|
||||||
|
! Include "Parser";
|
||||||
|
! Include "VerbLib";
|
||||||
|
! Include "Grammar";
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Default AMUSING_PROVIDED 1;
|
||||||
|
Default MAX_CARRIED 100;
|
||||||
|
Default MAX_SCORE 0;
|
||||||
|
Default NUMBER_TASKS 1;
|
||||||
|
Default OBJECT_SCORE 4;
|
||||||
|
Default ROOM_SCORE 5;
|
||||||
|
Default SACK_OBJECT 0;
|
||||||
|
Default TASKS_PROVIDED 1;
|
||||||
|
|
||||||
|
#Ifndef task_scores;
|
||||||
|
! Constant MAKE__TS;
|
||||||
|
! #Endif;
|
||||||
|
! #Ifdef MAKE__TS;
|
||||||
|
Array task_scores -> 0 0 0 0;
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
Array task_done -> NUMBER_TASKS;
|
||||||
|
|
||||||
|
#Ifndef LibraryMessages;
|
||||||
|
Object LibraryMessages;
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
#Ifndef NO_PLACES;
|
||||||
|
[ ObjectsSub; Objects1Sub(); ];
|
||||||
|
[ PlacesSub; Places1Sub(); ];
|
||||||
|
#Endif; ! NO_PLACES
|
||||||
|
|
||||||
|
#Ifdef USE_MODULES;
|
||||||
|
Link "verblibm";
|
||||||
|
#Ifnot;
|
||||||
|
Include "verblibm";
|
||||||
|
#Endif; ! USE_MODULES
|
||||||
|
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
Constant LIBRARY_VERBLIB; ! for dependency checking
|
||||||
|
|
||||||
|
! ==============================================================================
|
874
library-glulx/infglk.h
Normal file
874
library-glulx/infglk.h
Normal file
|
@ -0,0 +1,874 @@
|
||||||
|
! infglk.h -- auto-generated by parse_dispatch.py.
|
||||||
|
! Generated for Glk API version 0.7.5
|
||||||
|
|
||||||
|
! Declare as a system header unless we are in the I7 environment.
|
||||||
|
! (I7 does not use the System_file directive.)
|
||||||
|
#ifndef NI_BUILD_COUNT;
|
||||||
|
System_file;
|
||||||
|
#endif; ! NI_BUILD_COUNT
|
||||||
|
|
||||||
|
#ifndef INFGLK_H;
|
||||||
|
Constant INFGLK_H = 1;
|
||||||
|
#ifdef TARGET_GLULX;
|
||||||
|
|
||||||
|
Constant evtype_Arrange = 5;
|
||||||
|
Constant evtype_CharInput = 2;
|
||||||
|
Constant evtype_Hyperlink = 8;
|
||||||
|
Constant evtype_LineInput = 3;
|
||||||
|
Constant evtype_MouseInput = 4;
|
||||||
|
Constant evtype_None = 0;
|
||||||
|
Constant evtype_Redraw = 6;
|
||||||
|
Constant evtype_SoundNotify = 7;
|
||||||
|
Constant evtype_Timer = 1;
|
||||||
|
Constant evtype_VolumeNotify = 9;
|
||||||
|
Constant filemode_Read = 2;
|
||||||
|
Constant filemode_ReadWrite = 3;
|
||||||
|
Constant filemode_Write = 1;
|
||||||
|
Constant filemode_WriteAppend = 5;
|
||||||
|
Constant fileusage_BinaryMode = 0;
|
||||||
|
Constant fileusage_Data = 0;
|
||||||
|
Constant fileusage_InputRecord = 3;
|
||||||
|
Constant fileusage_SavedGame = 1;
|
||||||
|
Constant fileusage_TextMode = 256;
|
||||||
|
Constant fileusage_Transcript = 2;
|
||||||
|
Constant fileusage_TypeMask = 15;
|
||||||
|
Constant gestalt_CharInput = 1;
|
||||||
|
Constant gestalt_CharOutput = 3;
|
||||||
|
Constant gestalt_CharOutput_ApproxPrint = 1;
|
||||||
|
Constant gestalt_CharOutput_CannotPrint = 0;
|
||||||
|
Constant gestalt_CharOutput_ExactPrint = 2;
|
||||||
|
Constant gestalt_DateTime = 20;
|
||||||
|
Constant gestalt_DrawImage = 7;
|
||||||
|
Constant gestalt_Graphics = 6;
|
||||||
|
Constant gestalt_GraphicsCharInput = 23;
|
||||||
|
Constant gestalt_GraphicsTransparency = 14;
|
||||||
|
Constant gestalt_HyperlinkInput = 12;
|
||||||
|
Constant gestalt_Hyperlinks = 11;
|
||||||
|
Constant gestalt_LineInput = 2;
|
||||||
|
Constant gestalt_LineInputEcho = 17;
|
||||||
|
Constant gestalt_LineTerminatorKey = 19;
|
||||||
|
Constant gestalt_LineTerminators = 18;
|
||||||
|
Constant gestalt_MouseInput = 4;
|
||||||
|
Constant gestalt_ResourceStream = 22;
|
||||||
|
Constant gestalt_Sound = 8;
|
||||||
|
Constant gestalt_Sound2 = 21;
|
||||||
|
Constant gestalt_SoundMusic = 13;
|
||||||
|
Constant gestalt_SoundNotify = 10;
|
||||||
|
Constant gestalt_SoundVolume = 9;
|
||||||
|
Constant gestalt_Timer = 5;
|
||||||
|
Constant gestalt_Unicode = 15;
|
||||||
|
Constant gestalt_UnicodeNorm = 16;
|
||||||
|
Constant gestalt_Version = 0;
|
||||||
|
Constant imagealign_InlineCenter = 3;
|
||||||
|
Constant imagealign_InlineDown = 2;
|
||||||
|
Constant imagealign_MarginLeft = 4;
|
||||||
|
Constant imagealign_MarginRight = 5;
|
||||||
|
Constant imagealign_InlineUp = 1;
|
||||||
|
Constant keycode_Delete = 4294967289;
|
||||||
|
Constant keycode_Down = 4294967291;
|
||||||
|
Constant keycode_End = 4294967283;
|
||||||
|
Constant keycode_Escape = 4294967288;
|
||||||
|
Constant keycode_Func1 = 4294967279;
|
||||||
|
Constant keycode_Func10 = 4294967270;
|
||||||
|
Constant keycode_Func11 = 4294967269;
|
||||||
|
Constant keycode_Func12 = 4294967268;
|
||||||
|
Constant keycode_Func2 = 4294967278;
|
||||||
|
Constant keycode_Func3 = 4294967277;
|
||||||
|
Constant keycode_Func4 = 4294967276;
|
||||||
|
Constant keycode_Func5 = 4294967275;
|
||||||
|
Constant keycode_Func6 = 4294967274;
|
||||||
|
Constant keycode_Func7 = 4294967273;
|
||||||
|
Constant keycode_Func8 = 4294967272;
|
||||||
|
Constant keycode_Func9 = 4294967271;
|
||||||
|
Constant keycode_Home = 4294967284;
|
||||||
|
Constant keycode_Left = 4294967294;
|
||||||
|
Constant keycode_MAXVAL = 28;
|
||||||
|
Constant keycode_PageDown = 4294967285;
|
||||||
|
Constant keycode_PageUp = 4294967286;
|
||||||
|
Constant keycode_Return = 4294967290;
|
||||||
|
Constant keycode_Right = 4294967293;
|
||||||
|
Constant keycode_Tab = 4294967287;
|
||||||
|
Constant keycode_Unknown = 4294967295;
|
||||||
|
Constant keycode_Up = 4294967292;
|
||||||
|
Constant seekmode_Current = 1;
|
||||||
|
Constant seekmode_End = 2;
|
||||||
|
Constant seekmode_Start = 0;
|
||||||
|
Constant style_Alert = 5;
|
||||||
|
Constant style_BlockQuote = 7;
|
||||||
|
Constant style_Emphasized = 1;
|
||||||
|
Constant style_Header = 3;
|
||||||
|
Constant style_Input = 8;
|
||||||
|
Constant style_NUMSTYLES = 11;
|
||||||
|
Constant style_Normal = 0;
|
||||||
|
Constant style_Note = 6;
|
||||||
|
Constant style_Preformatted = 2;
|
||||||
|
Constant style_Subheader = 4;
|
||||||
|
Constant style_User1 = 9;
|
||||||
|
Constant style_User2 = 10;
|
||||||
|
Constant stylehint_BackColor = 8;
|
||||||
|
Constant stylehint_Indentation = 0;
|
||||||
|
Constant stylehint_Justification = 2;
|
||||||
|
Constant stylehint_NUMHINTS = 10;
|
||||||
|
Constant stylehint_Oblique = 5;
|
||||||
|
Constant stylehint_ParaIndentation = 1;
|
||||||
|
Constant stylehint_Proportional = 6;
|
||||||
|
Constant stylehint_ReverseColor = 9;
|
||||||
|
Constant stylehint_Size = 3;
|
||||||
|
Constant stylehint_TextColor = 7;
|
||||||
|
Constant stylehint_Weight = 4;
|
||||||
|
Constant stylehint_just_Centered = 2;
|
||||||
|
Constant stylehint_just_LeftFlush = 0;
|
||||||
|
Constant stylehint_just_LeftRight = 1;
|
||||||
|
Constant stylehint_just_RightFlush = 3;
|
||||||
|
Constant winmethod_Above = 2;
|
||||||
|
Constant winmethod_Below = 3;
|
||||||
|
Constant winmethod_Border = 0;
|
||||||
|
Constant winmethod_BorderMask = 256;
|
||||||
|
Constant winmethod_DirMask = 15;
|
||||||
|
Constant winmethod_DivisionMask = 240;
|
||||||
|
Constant winmethod_Fixed = 16;
|
||||||
|
Constant winmethod_Left = 0;
|
||||||
|
Constant winmethod_NoBorder = 256;
|
||||||
|
Constant winmethod_Proportional = 32;
|
||||||
|
Constant winmethod_Right = 1;
|
||||||
|
Constant wintype_AllTypes = 0;
|
||||||
|
Constant wintype_Blank = 2;
|
||||||
|
Constant wintype_Graphics = 5;
|
||||||
|
Constant wintype_Pair = 1;
|
||||||
|
Constant wintype_TextBuffer = 3;
|
||||||
|
Constant wintype_TextGrid = 4;
|
||||||
|
|
||||||
|
[ glk_exit _vararg_count;
|
||||||
|
! glk_exit()
|
||||||
|
@glk 1 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_tick _vararg_count;
|
||||||
|
! glk_tick()
|
||||||
|
@glk 3 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_gestalt _vararg_count ret;
|
||||||
|
! glk_gestalt(uint, uint) => uint
|
||||||
|
@glk 4 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_gestalt_ext _vararg_count ret;
|
||||||
|
! glk_gestalt_ext(uint, uint, uintarray, arraylen) => uint
|
||||||
|
@glk 5 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_iterate _vararg_count ret;
|
||||||
|
! glk_window_iterate(window, &uint) => window
|
||||||
|
@glk 32 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_rock _vararg_count ret;
|
||||||
|
! glk_window_get_rock(window) => uint
|
||||||
|
@glk 33 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_root _vararg_count ret;
|
||||||
|
! glk_window_get_root() => window
|
||||||
|
@glk 34 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_open _vararg_count ret;
|
||||||
|
! glk_window_open(window, uint, uint, uint, uint) => window
|
||||||
|
@glk 35 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_close _vararg_count;
|
||||||
|
! glk_window_close(window, &{uint, uint})
|
||||||
|
@glk 36 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_size _vararg_count;
|
||||||
|
! glk_window_get_size(window, &uint, &uint)
|
||||||
|
@glk 37 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_set_arrangement _vararg_count;
|
||||||
|
! glk_window_set_arrangement(window, uint, uint, window)
|
||||||
|
@glk 38 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_arrangement _vararg_count;
|
||||||
|
! glk_window_get_arrangement(window, &uint, &uint, &window)
|
||||||
|
@glk 39 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_type _vararg_count ret;
|
||||||
|
! glk_window_get_type(window) => uint
|
||||||
|
@glk 40 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_parent _vararg_count ret;
|
||||||
|
! glk_window_get_parent(window) => window
|
||||||
|
@glk 41 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_clear _vararg_count;
|
||||||
|
! glk_window_clear(window)
|
||||||
|
@glk 42 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_move_cursor _vararg_count;
|
||||||
|
! glk_window_move_cursor(window, uint, uint)
|
||||||
|
@glk 43 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_stream _vararg_count ret;
|
||||||
|
! glk_window_get_stream(window) => stream
|
||||||
|
@glk 44 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_set_echo_stream _vararg_count;
|
||||||
|
! glk_window_set_echo_stream(window, stream)
|
||||||
|
@glk 45 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_echo_stream _vararg_count ret;
|
||||||
|
! glk_window_get_echo_stream(window) => stream
|
||||||
|
@glk 46 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_set_window _vararg_count;
|
||||||
|
! glk_set_window(window)
|
||||||
|
@glk 47 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_get_sibling _vararg_count ret;
|
||||||
|
! glk_window_get_sibling(window) => window
|
||||||
|
@glk 48 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_iterate _vararg_count ret;
|
||||||
|
! glk_stream_iterate(stream, &uint) => stream
|
||||||
|
@glk 64 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_get_rock _vararg_count ret;
|
||||||
|
! glk_stream_get_rock(stream) => uint
|
||||||
|
@glk 65 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_open_file _vararg_count ret;
|
||||||
|
! glk_stream_open_file(fileref, uint, uint) => stream
|
||||||
|
@glk 66 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_open_memory _vararg_count ret;
|
||||||
|
! glk_stream_open_memory(nativechararray, arraylen, uint, uint) => stream
|
||||||
|
@glk 67 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_close _vararg_count;
|
||||||
|
! glk_stream_close(stream, &{uint, uint})
|
||||||
|
@glk 68 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_set_position _vararg_count;
|
||||||
|
! glk_stream_set_position(stream, int, uint)
|
||||||
|
@glk 69 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_get_position _vararg_count ret;
|
||||||
|
! glk_stream_get_position(stream) => uint
|
||||||
|
@glk 70 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_set_current _vararg_count;
|
||||||
|
! glk_stream_set_current(stream)
|
||||||
|
@glk 71 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_get_current _vararg_count ret;
|
||||||
|
! glk_stream_get_current() => stream
|
||||||
|
@glk 72 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_open_resource _vararg_count ret;
|
||||||
|
! glk_stream_open_resource(uint, uint) => stream
|
||||||
|
@glk 73 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_create_temp _vararg_count ret;
|
||||||
|
! glk_fileref_create_temp(uint, uint) => fileref
|
||||||
|
@glk 96 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_create_by_name _vararg_count ret;
|
||||||
|
! glk_fileref_create_by_name(uint, string, uint) => fileref
|
||||||
|
@glk 97 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_create_by_prompt _vararg_count ret;
|
||||||
|
! glk_fileref_create_by_prompt(uint, uint, uint) => fileref
|
||||||
|
@glk 98 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_destroy _vararg_count;
|
||||||
|
! glk_fileref_destroy(fileref)
|
||||||
|
@glk 99 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_iterate _vararg_count ret;
|
||||||
|
! glk_fileref_iterate(fileref, &uint) => fileref
|
||||||
|
@glk 100 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_get_rock _vararg_count ret;
|
||||||
|
! glk_fileref_get_rock(fileref) => uint
|
||||||
|
@glk 101 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_delete_file _vararg_count;
|
||||||
|
! glk_fileref_delete_file(fileref)
|
||||||
|
@glk 102 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_does_file_exist _vararg_count ret;
|
||||||
|
! glk_fileref_does_file_exist(fileref) => uint
|
||||||
|
@glk 103 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_fileref_create_from_fileref _vararg_count ret;
|
||||||
|
! glk_fileref_create_from_fileref(uint, fileref, uint) => fileref
|
||||||
|
@glk 104 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_char _vararg_count;
|
||||||
|
! glk_put_char(uchar)
|
||||||
|
@glk 128 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_char_stream _vararg_count;
|
||||||
|
! glk_put_char_stream(stream, uchar)
|
||||||
|
@glk 129 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_string _vararg_count;
|
||||||
|
! glk_put_string(string)
|
||||||
|
@glk 130 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_string_stream _vararg_count;
|
||||||
|
! glk_put_string_stream(stream, string)
|
||||||
|
@glk 131 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_buffer _vararg_count;
|
||||||
|
! glk_put_buffer(nativechararray, arraylen)
|
||||||
|
@glk 132 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_buffer_stream _vararg_count;
|
||||||
|
! glk_put_buffer_stream(stream, nativechararray, arraylen)
|
||||||
|
@glk 133 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_set_style _vararg_count;
|
||||||
|
! glk_set_style(uint)
|
||||||
|
@glk 134 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_set_style_stream _vararg_count;
|
||||||
|
! glk_set_style_stream(stream, uint)
|
||||||
|
@glk 135 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_get_char_stream _vararg_count ret;
|
||||||
|
! glk_get_char_stream(stream) => int
|
||||||
|
@glk 144 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_get_line_stream _vararg_count ret;
|
||||||
|
! glk_get_line_stream(stream, nativechararray, arraylen) => uint
|
||||||
|
@glk 145 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_get_buffer_stream _vararg_count ret;
|
||||||
|
! glk_get_buffer_stream(stream, nativechararray, arraylen) => uint
|
||||||
|
@glk 146 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_char_to_lower _vararg_count ret;
|
||||||
|
! glk_char_to_lower(uchar) => uchar
|
||||||
|
@glk 160 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_char_to_upper _vararg_count ret;
|
||||||
|
! glk_char_to_upper(uchar) => uchar
|
||||||
|
@glk 161 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stylehint_set _vararg_count;
|
||||||
|
! glk_stylehint_set(uint, uint, uint, int)
|
||||||
|
@glk 176 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stylehint_clear _vararg_count;
|
||||||
|
! glk_stylehint_clear(uint, uint, uint)
|
||||||
|
@glk 177 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_style_distinguish _vararg_count ret;
|
||||||
|
! glk_style_distinguish(window, uint, uint) => uint
|
||||||
|
@glk 178 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_style_measure _vararg_count ret;
|
||||||
|
! glk_style_measure(window, uint, uint, &uint) => uint
|
||||||
|
@glk 179 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_select _vararg_count;
|
||||||
|
! glk_select(&{uint, window, uint, uint})
|
||||||
|
@glk 192 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_select_poll _vararg_count;
|
||||||
|
! glk_select_poll(&{uint, window, uint, uint})
|
||||||
|
@glk 193 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_request_line_event _vararg_count;
|
||||||
|
! glk_request_line_event(window, nativechararray, arraylen, uint)
|
||||||
|
@glk 208 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_cancel_line_event _vararg_count;
|
||||||
|
! glk_cancel_line_event(window, &{uint, window, uint, uint})
|
||||||
|
@glk 209 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_request_char_event _vararg_count;
|
||||||
|
! glk_request_char_event(window)
|
||||||
|
@glk 210 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_cancel_char_event _vararg_count;
|
||||||
|
! glk_cancel_char_event(window)
|
||||||
|
@glk 211 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_request_mouse_event _vararg_count;
|
||||||
|
! glk_request_mouse_event(window)
|
||||||
|
@glk 212 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_cancel_mouse_event _vararg_count;
|
||||||
|
! glk_cancel_mouse_event(window)
|
||||||
|
@glk 213 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_request_timer_events _vararg_count;
|
||||||
|
! glk_request_timer_events(uint)
|
||||||
|
@glk 214 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_image_get_info _vararg_count ret;
|
||||||
|
! glk_image_get_info(uint, &uint, &uint) => uint
|
||||||
|
@glk 224 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_image_draw _vararg_count ret;
|
||||||
|
! glk_image_draw(window, uint, int, int) => uint
|
||||||
|
@glk 225 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_image_draw_scaled _vararg_count ret;
|
||||||
|
! glk_image_draw_scaled(window, uint, int, int, uint, uint) => uint
|
||||||
|
@glk 226 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_flow_break _vararg_count;
|
||||||
|
! glk_window_flow_break(window)
|
||||||
|
@glk 232 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_erase_rect _vararg_count;
|
||||||
|
! glk_window_erase_rect(window, int, int, uint, uint)
|
||||||
|
@glk 233 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_fill_rect _vararg_count;
|
||||||
|
! glk_window_fill_rect(window, uint, int, int, uint, uint)
|
||||||
|
@glk 234 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_window_set_background_color _vararg_count;
|
||||||
|
! glk_window_set_background_color(window, uint)
|
||||||
|
@glk 235 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_iterate _vararg_count ret;
|
||||||
|
! glk_schannel_iterate(schannel, &uint) => schannel
|
||||||
|
@glk 240 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_get_rock _vararg_count ret;
|
||||||
|
! glk_schannel_get_rock(schannel) => uint
|
||||||
|
@glk 241 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_create _vararg_count ret;
|
||||||
|
! glk_schannel_create(uint) => schannel
|
||||||
|
@glk 242 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_destroy _vararg_count;
|
||||||
|
! glk_schannel_destroy(schannel)
|
||||||
|
@glk 243 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_create_ext _vararg_count ret;
|
||||||
|
! glk_schannel_create_ext(uint, uint) => schannel
|
||||||
|
@glk 244 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_play_multi _vararg_count ret;
|
||||||
|
! glk_schannel_play_multi(schannelarray, arraylen, uintarray, arraylen, uint) => uint
|
||||||
|
@glk 247 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_play _vararg_count ret;
|
||||||
|
! glk_schannel_play(schannel, uint) => uint
|
||||||
|
@glk 248 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_play_ext _vararg_count ret;
|
||||||
|
! glk_schannel_play_ext(schannel, uint, uint, uint) => uint
|
||||||
|
@glk 249 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_stop _vararg_count;
|
||||||
|
! glk_schannel_stop(schannel)
|
||||||
|
@glk 250 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_set_volume _vararg_count;
|
||||||
|
! glk_schannel_set_volume(schannel, uint)
|
||||||
|
@glk 251 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_sound_load_hint _vararg_count;
|
||||||
|
! glk_sound_load_hint(uint, uint)
|
||||||
|
@glk 252 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_set_volume_ext _vararg_count;
|
||||||
|
! glk_schannel_set_volume_ext(schannel, uint, uint, uint)
|
||||||
|
@glk 253 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_pause _vararg_count;
|
||||||
|
! glk_schannel_pause(schannel)
|
||||||
|
@glk 254 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_schannel_unpause _vararg_count;
|
||||||
|
! glk_schannel_unpause(schannel)
|
||||||
|
@glk 255 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_set_hyperlink _vararg_count;
|
||||||
|
! glk_set_hyperlink(uint)
|
||||||
|
@glk 256 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_set_hyperlink_stream _vararg_count;
|
||||||
|
! glk_set_hyperlink_stream(stream, uint)
|
||||||
|
@glk 257 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_request_hyperlink_event _vararg_count;
|
||||||
|
! glk_request_hyperlink_event(window)
|
||||||
|
@glk 258 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_cancel_hyperlink_event _vararg_count;
|
||||||
|
! glk_cancel_hyperlink_event(window)
|
||||||
|
@glk 259 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_buffer_to_lower_case_uni _vararg_count ret;
|
||||||
|
! glk_buffer_to_lower_case_uni(uintarray, arraylen, uint) => uint
|
||||||
|
@glk 288 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_buffer_to_upper_case_uni _vararg_count ret;
|
||||||
|
! glk_buffer_to_upper_case_uni(uintarray, arraylen, uint) => uint
|
||||||
|
@glk 289 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_buffer_to_title_case_uni _vararg_count ret;
|
||||||
|
! glk_buffer_to_title_case_uni(uintarray, arraylen, uint, uint) => uint
|
||||||
|
@glk 290 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_buffer_canon_decompose_uni _vararg_count ret;
|
||||||
|
! glk_buffer_canon_decompose_uni(uintarray, arraylen, uint) => uint
|
||||||
|
@glk 291 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_buffer_canon_normalize_uni _vararg_count ret;
|
||||||
|
! glk_buffer_canon_normalize_uni(uintarray, arraylen, uint) => uint
|
||||||
|
@glk 292 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_char_uni _vararg_count;
|
||||||
|
! glk_put_char_uni(uint)
|
||||||
|
@glk 296 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_string_uni _vararg_count;
|
||||||
|
! glk_put_string_uni(unicode)
|
||||||
|
@glk 297 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_buffer_uni _vararg_count;
|
||||||
|
! glk_put_buffer_uni(uintarray, arraylen)
|
||||||
|
@glk 298 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_char_stream_uni _vararg_count;
|
||||||
|
! glk_put_char_stream_uni(stream, uint)
|
||||||
|
@glk 299 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_string_stream_uni _vararg_count;
|
||||||
|
! glk_put_string_stream_uni(stream, unicode)
|
||||||
|
@glk 300 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_put_buffer_stream_uni _vararg_count;
|
||||||
|
! glk_put_buffer_stream_uni(stream, uintarray, arraylen)
|
||||||
|
@glk 301 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_get_char_stream_uni _vararg_count ret;
|
||||||
|
! glk_get_char_stream_uni(stream) => int
|
||||||
|
@glk 304 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_get_buffer_stream_uni _vararg_count ret;
|
||||||
|
! glk_get_buffer_stream_uni(stream, uintarray, arraylen) => uint
|
||||||
|
@glk 305 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_get_line_stream_uni _vararg_count ret;
|
||||||
|
! glk_get_line_stream_uni(stream, uintarray, arraylen) => uint
|
||||||
|
@glk 306 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_open_file_uni _vararg_count ret;
|
||||||
|
! glk_stream_open_file_uni(fileref, uint, uint) => stream
|
||||||
|
@glk 312 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_open_memory_uni _vararg_count ret;
|
||||||
|
! glk_stream_open_memory_uni(uintarray, arraylen, uint, uint) => stream
|
||||||
|
@glk 313 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_stream_open_resource_uni _vararg_count ret;
|
||||||
|
! glk_stream_open_resource_uni(uint, uint) => stream
|
||||||
|
@glk 314 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_request_char_event_uni _vararg_count;
|
||||||
|
! glk_request_char_event_uni(window)
|
||||||
|
@glk 320 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_request_line_event_uni _vararg_count;
|
||||||
|
! glk_request_line_event_uni(window, uintarray, arraylen, uint)
|
||||||
|
@glk 321 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_set_echo_line_event _vararg_count;
|
||||||
|
! glk_set_echo_line_event(window, uint)
|
||||||
|
@glk 336 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_set_terminators_line_event _vararg_count;
|
||||||
|
! glk_set_terminators_line_event(window, uintarray, arraylen)
|
||||||
|
@glk 337 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_current_time _vararg_count;
|
||||||
|
! glk_current_time(&{int, uint, int})
|
||||||
|
@glk 352 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_current_simple_time _vararg_count ret;
|
||||||
|
! glk_current_simple_time(uint) => int
|
||||||
|
@glk 353 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_time_to_date_utc _vararg_count;
|
||||||
|
! glk_time_to_date_utc(&{int, uint, int}, &{int, int, int, int, int, int, int, int})
|
||||||
|
@glk 360 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_time_to_date_local _vararg_count;
|
||||||
|
! glk_time_to_date_local(&{int, uint, int}, &{int, int, int, int, int, int, int, int})
|
||||||
|
@glk 361 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_simple_time_to_date_utc _vararg_count;
|
||||||
|
! glk_simple_time_to_date_utc(int, uint, &{int, int, int, int, int, int, int, int})
|
||||||
|
@glk 362 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_simple_time_to_date_local _vararg_count;
|
||||||
|
! glk_simple_time_to_date_local(int, uint, &{int, int, int, int, int, int, int, int})
|
||||||
|
@glk 363 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_date_to_time_utc _vararg_count;
|
||||||
|
! glk_date_to_time_utc(&{int, int, int, int, int, int, int, int}, &{int, uint, int})
|
||||||
|
@glk 364 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_date_to_time_local _vararg_count;
|
||||||
|
! glk_date_to_time_local(&{int, int, int, int, int, int, int, int}, &{int, uint, int})
|
||||||
|
@glk 365 _vararg_count 0;
|
||||||
|
return 0;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_date_to_simple_time_utc _vararg_count ret;
|
||||||
|
! glk_date_to_simple_time_utc(&{int, int, int, int, int, int, int, int}, uint) => int
|
||||||
|
@glk 366 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ glk_date_to_simple_time_local _vararg_count ret;
|
||||||
|
! glk_date_to_simple_time_local(&{int, int, int, int, int, int, int, int}, uint) => int
|
||||||
|
@glk 367 _vararg_count ret;
|
||||||
|
return ret;
|
||||||
|
];
|
||||||
|
|
||||||
|
#endif; ! TARGET_GLULX
|
||||||
|
#endif; ! INFGLK_H
|
1085
library-glulx/infix.h
Normal file
1085
library-glulx/infix.h
Normal file
File diff suppressed because it is too large
Load diff
136
library-glulx/linklpa.h
Normal file
136
library-glulx/linklpa.h
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
! ==============================================================================
|
||||||
|
! LINKLPA: Link declarations of common properties and attributes.
|
||||||
|
!
|
||||||
|
! Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
||||||
|
!
|
||||||
|
! Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
||||||
|
!
|
||||||
|
! This file is automatically Included in your game file by "Parser".
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! Some VM-specific constants.
|
||||||
|
! (WORDSIZE and TARGET_XXX are defined by the compiler.)
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#Ifdef TARGET_ZCODE;
|
||||||
|
Constant NULL = $ffff;
|
||||||
|
Constant WORD_HIGHBIT = $8000;
|
||||||
|
#Ifnot; ! TARGET_GLULX
|
||||||
|
Constant NULL = $ffffffff;
|
||||||
|
Constant WORD_HIGHBIT = $80000000;
|
||||||
|
#Endif; ! TARGET_
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
! The common attributes and properties.
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Attribute animate;
|
||||||
|
#Ifdef USE_MODULES;
|
||||||
|
#Iffalse (animate == 0);
|
||||||
|
Message error "Please move your Attribute declarations after the Include ~Parser~ line:
|
||||||
|
otherwise it will be impossible to USE_MODULES";
|
||||||
|
#Endif;
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
Attribute absent;
|
||||||
|
Attribute clothing;
|
||||||
|
Attribute concealed;
|
||||||
|
Attribute container;
|
||||||
|
Attribute door;
|
||||||
|
Attribute edible;
|
||||||
|
Attribute enterable;
|
||||||
|
Attribute general;
|
||||||
|
Attribute light;
|
||||||
|
Attribute lockable;
|
||||||
|
Attribute locked;
|
||||||
|
Attribute moved;
|
||||||
|
Attribute on;
|
||||||
|
Attribute open;
|
||||||
|
Attribute openable;
|
||||||
|
Attribute proper;
|
||||||
|
Attribute scenery;
|
||||||
|
Attribute scored;
|
||||||
|
Attribute static;
|
||||||
|
Attribute supporter;
|
||||||
|
Attribute switchable;
|
||||||
|
Attribute talkable;
|
||||||
|
Attribute transparent;
|
||||||
|
Attribute visited;
|
||||||
|
Attribute workflag;
|
||||||
|
Attribute worn;
|
||||||
|
|
||||||
|
Attribute male;
|
||||||
|
Attribute female;
|
||||||
|
Attribute neuter;
|
||||||
|
Attribute pluralname;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Property additive before NULL;
|
||||||
|
Property additive after NULL;
|
||||||
|
Property additive life NULL;
|
||||||
|
|
||||||
|
Property n_to;
|
||||||
|
Property s_to;
|
||||||
|
Property e_to;
|
||||||
|
Property w_to;
|
||||||
|
Property ne_to;
|
||||||
|
Property nw_to;
|
||||||
|
Property se_to;
|
||||||
|
Property sw_to;
|
||||||
|
Property u_to;
|
||||||
|
Property d_to;
|
||||||
|
Property in_to;
|
||||||
|
Property out_to;
|
||||||
|
|
||||||
|
#Ifdef USE_MODULES;
|
||||||
|
#Iffalse (7 >= n_to);
|
||||||
|
Message error "Please move your Property declarations after the Include ~Parser~ line:
|
||||||
|
otherwise it will be impossible to USE_MODULES";
|
||||||
|
#Endif;
|
||||||
|
#Endif;
|
||||||
|
|
||||||
|
Property door_to;
|
||||||
|
Property with_key;
|
||||||
|
Property door_dir;
|
||||||
|
Property invent;
|
||||||
|
Property plural;
|
||||||
|
Property add_to_scope;
|
||||||
|
Property list_together;
|
||||||
|
Property react_before;
|
||||||
|
Property react_after;
|
||||||
|
Property grammar;
|
||||||
|
Property additive orders;
|
||||||
|
|
||||||
|
Property initial;
|
||||||
|
Property when_open;
|
||||||
|
Property when_closed;
|
||||||
|
Property when_on;
|
||||||
|
Property when_off;
|
||||||
|
Property description;
|
||||||
|
Property additive describe NULL;
|
||||||
|
Property article "a";
|
||||||
|
|
||||||
|
Property cant_go;
|
||||||
|
|
||||||
|
Property found_in; ! For fiddly reasons this can't alias
|
||||||
|
|
||||||
|
Property time_left;
|
||||||
|
Property number;
|
||||||
|
Property additive time_out NULL;
|
||||||
|
Property daemon;
|
||||||
|
Property additive each_turn NULL;
|
||||||
|
|
||||||
|
Property capacity 100;
|
||||||
|
|
||||||
|
Property short_name 0;
|
||||||
|
Property short_name_indef 0;
|
||||||
|
Property parse_name 0;
|
||||||
|
|
||||||
|
Property articles;
|
||||||
|
Property inside_description;
|
||||||
|
|
||||||
|
! ==============================================================================
|
165
library-glulx/linklv.h
Normal file
165
library-glulx/linklv.h
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
! ==============================================================================
|
||||||
|
! LINKLV: Link declarations of library variables.
|
||||||
|
!
|
||||||
|
! Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
||||||
|
!
|
||||||
|
! Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
||||||
|
!
|
||||||
|
! This file is automatically Included in your game file by "verblibm" only if
|
||||||
|
! you supply the -U compiler switch to use pre-compiled Modules.
|
||||||
|
! ==============================================================================
|
||||||
|
|
||||||
|
System_file;
|
||||||
|
|
||||||
|
! ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Import global location;
|
||||||
|
Import global sline1;
|
||||||
|
Import global sline2;
|
||||||
|
|
||||||
|
Import global top_object;
|
||||||
|
Import global standard_interpreter;
|
||||||
|
Import global undo_flag;
|
||||||
|
Import global transcript_mode;
|
||||||
|
|
||||||
|
Import global xcommsdir;
|
||||||
|
|
||||||
|
Import global turns;
|
||||||
|
Import global the_time;
|
||||||
|
Import global time_rate;
|
||||||
|
Import global time_step;
|
||||||
|
Import global active_timers;
|
||||||
|
|
||||||
|
Import global score;
|
||||||
|
Import global last_score;
|
||||||
|
Import global notify_mode;
|
||||||
|
Import global places_score;
|
||||||
|
Import global things_score;
|
||||||
|
|
||||||
|
Import global player;
|
||||||
|
Import global deadflag;
|
||||||
|
|
||||||
|
Import global lightflag;
|
||||||
|
Import global real_location;
|
||||||
|
Import global visibility_ceiling;
|
||||||
|
Import global lookmode;
|
||||||
|
Import global print_player_flag;
|
||||||
|
Import global lastdesc;
|
||||||
|
|
||||||
|
Import global c_style;
|
||||||
|
Import global lt_value;
|
||||||
|
Import global listing_together;
|
||||||
|
Import global listing_size;
|
||||||
|
Import global wlf_indent;
|
||||||
|
Import global inventory_stage;
|
||||||
|
Import global inventory_style;
|
||||||
|
Import global pretty_flag;
|
||||||
|
Import global menu_nesting;
|
||||||
|
Import global menu_item;
|
||||||
|
Import global item_width;
|
||||||
|
Import global item_name;
|
||||||
|
Import global lm_n;
|
||||||
|
Import global lm_o;
|
||||||
|
|
||||||
|
#Ifdef DEBUG;
|
||||||
|
Import global debug_flag;
|
||||||
|
Import global x_scope_count;
|
||||||
|
#Endif; ! DEBUG
|
||||||
|
|
||||||
|
Import global action;
|
||||||
|
Import global inp1;
|
||||||
|
Import global inp2;
|
||||||
|
Import global noun;
|
||||||
|
Import global second;
|
||||||
|
Import global keep_silent;
|
||||||
|
Import global reason_code;
|
||||||
|
Import global receive_action;
|
||||||
|
|
||||||
|
Import global parser_trace;
|
||||||
|
Import global parser_action;
|
||||||
|
Import global parser_one;
|
||||||
|
Import global parser_two;
|
||||||
|
Import global parser_inflection;
|
||||||
|
Import global actor;
|
||||||
|
Import global actors_location;
|
||||||
|
Import global meta;
|
||||||
|
Import global multiflag;
|
||||||
|
Import global toomany_flag;
|
||||||
|
|
||||||
|
Import global special_word;
|
||||||
|
Import global special_number;
|
||||||
|
Import global parsed_number;
|
||||||
|
Import global consult_from;
|
||||||
|
Import global consult_words;
|
||||||
|
Import global notheld_mode;
|
||||||
|
Import global onotheld_mode;
|
||||||
|
Import global not_holding;
|
||||||
|
Import global etype;
|
||||||
|
Import global best_etype;
|
||||||
|
Import global nextbest_etype;
|
||||||
|
Import global pcount;
|
||||||
|
Import global pcount2;
|
||||||
|
Import global parameters;
|
||||||
|
Import global nsns;
|
||||||
|
Import global special_number1;
|
||||||
|
Import global special_number2;
|
||||||
|
Import global params_wanted;
|
||||||
|
Import global inferfrom;
|
||||||
|
Import global inferword;
|
||||||
|
Import global dont_infer;
|
||||||
|
Import global action_to_be;
|
||||||
|
Import global action_reversed;
|
||||||
|
Import global advance_warning;
|
||||||
|
Import global found_ttype;
|
||||||
|
Import global found_tdata;
|
||||||
|
Import global token_filter;
|
||||||
|
Import global lookahead;
|
||||||
|
Import global multi_mode;
|
||||||
|
Import global multi_wanted;
|
||||||
|
Import global multi_had;
|
||||||
|
Import global multi_context;
|
||||||
|
Import global indef_mode;
|
||||||
|
Import global indef_type;
|
||||||
|
Import global indef_wanted;
|
||||||
|
Import global indef_guess_p;
|
||||||
|
Import global indef_owner;
|
||||||
|
Import global indef_cases;
|
||||||
|
Import global indef_possambig;
|
||||||
|
Import global indef_nspec_at;
|
||||||
|
Import global allow_plurals;
|
||||||
|
Import global take_all_rule;
|
||||||
|
Import global pronoun_word;
|
||||||
|
Import global pronoun_obj;
|
||||||
|
Import global scope_reason;
|
||||||
|
Import global scope_token;
|
||||||
|
Import global scope_error;
|
||||||
|
Import global scope_stage;
|
||||||
|
Import global ats_flag;
|
||||||
|
Import global ats_hls;
|
||||||
|
Import global placed_in_flag;
|
||||||
|
Import global number_matched;
|
||||||
|
Import global number_of_classes;
|
||||||
|
Import global match_length;
|
||||||
|
Import global match_from;
|
||||||
|
Import global bestguess_score;
|
||||||
|
Import global wn;
|
||||||
|
Import global num_words;
|
||||||
|
Import global verb_word;
|
||||||
|
Import global verb_wordnum;
|
||||||
|
Import global usual_grammar_after;
|
||||||
|
Import global oops_from;
|
||||||
|
Import global saved_oops;
|
||||||
|
Import global held_back_mode;
|
||||||
|
Import global hb_wn;
|
||||||
|
Import global short_name_case;
|
||||||
|
|
||||||
|
#Ifdef EnglishNaturalLanguage;
|
||||||
|
Import global itobj;
|
||||||
|
Import global himobj;
|
||||||
|
Import global herobj;
|
||||||
|
Import global old_itobj;
|
||||||
|
Import global old_himobj;
|
||||||
|
Import global old_herobj;
|
||||||
|
#Endif; ! EnglishNaturalLanguage
|
||||||
|
|
||||||
|
! ==============================================================================
|
6680
library-glulx/parserm.h
Normal file
6680
library-glulx/parserm.h
Normal file
File diff suppressed because it is too large
Load diff
2610
library-glulx/verblibm.h
Normal file
2610
library-glulx/verblibm.h
Normal file
File diff suppressed because it is too large
Load diff
30
objects.h
Normal file
30
objects.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
Object gallery "Выставочный зал"
|
||||||
|
with description
|
||||||
|
"Вы стоите в маленьком зале.",
|
||||||
|
has light;
|
||||||
|
|
||||||
|
Object photo "маленьк/ое фото/" gallery
|
||||||
|
with name 'маленьк' 'фото',
|
||||||
|
|
||||||
|
describe [;
|
||||||
|
"Перед вами стоит маленькое фото.";
|
||||||
|
],
|
||||||
|
|
||||||
|
description [;
|
||||||
|
print "На маленькой фотографии изображён мужчина с клавиатурой.
|
||||||
|
Он сосредоточенно что-то печатает.";
|
||||||
|
],
|
||||||
|
has static neuter;
|
||||||
|
|
||||||
|
Object teapot "глинян/ый чайник/" gallery
|
||||||
|
with name 'глин' 'чай',
|
||||||
|
|
||||||
|
describe [;
|
||||||
|
"Слева от фото выставлен невысокий глиняный чайник.";
|
||||||
|
],
|
||||||
|
|
||||||
|
description [;
|
||||||
|
print "По легендам, древние писатели пили много чая.
|
||||||
|
Они верили, что это поможет им понять Информ.";
|
||||||
|
],
|
||||||
|
has static male;
|
36
source.inf
Normal file
36
source.inf
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
Constant MANUAL_PRONOUNS;
|
||||||
|
|
||||||
|
Constant Story "Галерея";
|
||||||
|
Constant Headline "^Тест Информа.^";
|
||||||
|
|
||||||
|
Include "Parser";
|
||||||
|
Include "VerbLib";
|
||||||
|
Include "./objects";
|
||||||
|
|
||||||
|
Global the_word_was = "";
|
||||||
|
|
||||||
|
[ Initialise;
|
||||||
|
location = gallery;
|
||||||
|
"^^Ни один уважающий себя фотограф не может пройти мимо выставки
|
||||||
|
«Парсер 2019». По крайней мере, в этом убеждал вас организатор.";
|
||||||
|
];
|
||||||
|
|
||||||
|
[ UnknownVerb word i;
|
||||||
|
objectloop (i in location) {
|
||||||
|
if (
|
||||||
|
!word == (i.&name) --> 0 &&
|
||||||
|
i has scenery
|
||||||
|
) {
|
||||||
|
the_word_was = i;
|
||||||
|
return 'осм';
|
||||||
|
}
|
||||||
|
rfalse;
|
||||||
|
}
|
||||||
|
rfalse;
|
||||||
|
];
|
||||||
|
|
||||||
|
[ DeathMessage; print "Вы проиграли"; ];
|
||||||
|
|
||||||
|
! ============================================================================ !
|
||||||
|
|
||||||
|
Include "RussiaG";
|
Loading…
Reference in a new issue