1
0
Fork 0

English example

This commit is contained in:
Alexander Yakovlev 2019-08-12 17:54:47 +07:00
parent e2dff232f6
commit 4556705761
Signed by: oreolek
GPG key ID: 1CDC4B7820C93BD3
16 changed files with 14814 additions and 52 deletions

5
.gitignore vendored
View file

@ -1,4 +1 @@
out.z5
out.ulx
interpreter/main.css
interpreter/main.css.map
*.ulx

View file

@ -1,5 +1,7 @@
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
english:
inform -D -DG -Cu +library_en +language_name=English '$$MAX_UNICODE_CHARS=1024' '$$MAX_STATIC_DATA=20000' english.inf english.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

44
english.inf Normal file
View file

@ -0,0 +1,44 @@
Constant Story "Gallery";
Constant Headline "^Inform test.^";
Release 1;
Include "parser";
Include "verblib";
Include "./examine";
Include "grammar";
[ Initialise;
location = gallery;
"^^Every photographer worth his salet has to visit „Parser 2019“ gallery.
At least that's what the organizer told you.";
];
Object gallery "Gallery room"
with description
"You are standing in a small room.",
has light;
Object photo "small photo" gallery
with name 'small' 'photo' 'card',
describe [;
"There is a small photo on the wall before you.";
],
description [;
print "The photo depicts a man with a keyboard. He's typing something.";
],
has static neuter;
Object teapot "clay teapot" gallery
with name 'clay' 'tea',
describe [;
"To the left of it stands a clay teapot.";
],
description [;
print "Legends say the old writers drank a lot of tea.
They believed this would help them learn the ways of Inform.";
],
has static male;

15
examine.h Normal file
View file

@ -0,0 +1,15 @@
Global the_word_was = "";
[ UnknownVerb word i;
objectloop (i in location) {
if (
!word == (i.&name) --> 0 &&
i has scenery
) {
the_word_was = i;
return 'examine';
}
rfalse;
}
rfalse;
];

1469
library_en/English.h Normal file

File diff suppressed because it is too large Load diff

584
library_en/grammar.h Normal file
View file

@ -0,0 +1,584 @@
! ==============================================================================
! GRAMMAR: Grammar table entries for the standard verbs library.
!
! Supplied for use with Inform 6 -- Release 6.12.1 -- Serial number 160605
!
! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2016
! This code is licensed under either the traditional Inform license as
! described by the DM4 or the Artistic License version 2.0. See the
! file COPYING in the distribution archive or at
! https://github.com/DavidGriffith/inform6lib/
!
! In your game file, Include three library files in this order:
! Include "Parser";
! Include "VerbLib";
! Include "Grammar";
! ==============================================================================
System_file;
#Ifdef LIBRARY_STAGE;
#Iffalse LIBRARY_STAGE >= AFTER_GRAMMAR; ! if not already included
#Iftrue LIBRARY_STAGE == AFTER_VERBLIB; ! if okay to include it
! ------------------------------------------------------------------------------
! The "meta-verbs", commands to the game rather than in the game, come first:
! ------------------------------------------------------------------------------
Verb meta 'brief'
* -> LMode1;
Verb meta 'verbose' 'long'
* -> LMode2;
Verb meta 'superbrief' 'short'
* -> LMode3;
Verb meta 'normal'
* -> LModeNormal;
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'
* anynumber -> GoNear
* noun -> Gonear;
Verb meta 'goto'
* anynumber -> Goto;
Verb meta 'random'
* -> Predictable;
Verb meta 'routines' 'messages'
* -> RoutinesOn
* 'on' -> RoutinesOn
* 'verbose' -> RoutinesVerbose
* 'off' -> RoutinesOff;
Verb meta 'scope'
* -> Scope
* anynumber -> Scope
* noun -> Scope;
Verb meta 'showdict' 'dict'
* -> ShowDict
* topic -> ShowDict;
Verb meta 'showobj'
* -> Showobj
* anynumber -> 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'
* anynumber 'to' anynumber -> XAbstract
* noun 'to' noun -> XAbstract;
Verb meta 'purloin'
* anynumber -> XPurloin
* multi -> XPurloin;
Verb meta 'tree'
* -> XTree
* anynumber -> 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
* 'in' noun -> Dig
* 'in' noun 'with' held -> Dig;
Verb 'disrobe' 'doff' 'shed'
* held -> Disrobe;
Verb 'drink' 'sip' 'swallow'
* noun -> Drink;
Verb 'drop' 'discard'
* multiheld -> Drop
* multiexcept 'in'/'into'/'down' noun -> Insert
* multiexcept 'on'/'onto' noun -> PutOn;
Verb 'throw'
* 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
* noun 'from' noun -> Fill;
Verb 'get'
* 'out'/'off'/'up' 'of'/'from' noun -> Exit
* multi -> Take
* 'in'/'into'/'on'/'onto' noun -> Enter
* 'off' noun -> GetOff
* multiinside 'from'/'off' noun -> Remove;
Verb 'give' 'feed' 'offer' 'pay'
* creature held -> Give reverse
* held 'to' creature -> Give
* 'over' held 'to' creature -> Give;
Verb 'go' 'run' 'walk'
* -> VagueGo
* noun=ADirection -> Go
* noun -> Enter
* 'out'/'outside' -> Exit
* 'in'/'inside' -> GoIn
* '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
* 'in' noun -> JumpIn
* 'into' noun -> JumpIn
* 'on' noun -> JumpOn
* 'upon' noun -> JumpOn
* '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 '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' held -> Disrobe
* multiinside 'from'/'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' 'connect' '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 'unlock'
* noun 'with' held -> Unlock;
Verb 'wait' 'z//'
* -> Wait;
Verb 'wake' 'awake' 'awaken'
* -> Wake
* 'up' -> Wake
* creature -> WakeOther
* creature 'up' -> WakeOther
* 'up' creature -> WakeOther;
Verb 'wave'
* -> WaveHands
* noun -> Wave
* noun 'at' noun -> Wave
* 'at' noun -> WaveHands;
Verb 'wear' 'don'
* held -> Wear;
Verb 'yes' 'y//'
* -> Yes;
! ------------------------------------------------------------------------------
! 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:
! ------------------------------------------------------------------------------
Default Story 0;
Default Headline 0;
Default d_obj NULL;
Default u_obj NULL;
Stub AfterLife 0;
Stub AfterPrompt 0;
Stub Amusing 0;
Stub BeforeParsing 0;
Stub ChooseObjects 2;
Stub DarkToDark 0;
Stub DeathMessage 0;
Stub Epilogue 0;
Stub GamePostRoutine 0;
Stub GamePreRoutine 0;
Stub InScope 1;
Stub LookRoutine 0;
Stub NewRoom 0;
Stub ObjectDoesNotFit 2;
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;
[ PrintRank; "."; ];
#Endif;
#Ifndef ParseNoun;
[ ParseNoun obj; obj = obj; return -1; ];
#Endif;
#Ifdef INFIX;
Include "infix";
#Endif;
! ==============================================================================
Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_GRAMMAR;
#Ifnot; ! LIBRARY_STAGE < AFTER_GRAMMAR but ~= AFTER_VERBLIB
Message "Error: 'verblib' needs to be correctly included before including 'grammar'. This will cause a big number of errors!";
#Endif;
#Ifnot; ! LIBRARY_STAGE >= AFTER_GRAMMAR : already included
Message "Warning: 'grammar' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
#Endif;
#Ifnot; ! LIBRARY_STAGE is not defined
Message "Error: 'parser', then 'verblib' need to be correctly included before including 'grammar'. This will cause a big number of errors!";
#Endif;
! ==============================================================================

874
library_en/infglk.h Normal file
View file

@ -0,0 +1,874 @@
! infglk.h -- auto-generated by parse_dispatch.py.
! Generated for Glk API version 0.7.4
! 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

1202
library_en/infix.h Normal file

File diff suppressed because it is too large Load diff

141
library_en/linklpa.h Normal file
View file

@ -0,0 +1,141 @@
! ==============================================================================
! LINKLPA: Link declarations of common properties and attributes.
!
! Supplied for use with Inform 6 -- Release 6.12.1 -- Serial number 160605
!
! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2016
!
! This code is licensed under either the traditional Inform license as
! described by the DM4 or the Artistic License version 2.0. See the
! file COPYING in the distribution archive or at
! https://github.com/DavidGriffith/inform6lib/
!
! 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 non_floating alias 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;
! ==============================================================================

198
library_en/linklv.h Normal file
View file

@ -0,0 +1,198 @@
! ==============================================================================
! LINKLV: Link declarations of library variables.
!
! Supplied for use with Inform 6 -- Release 6.12.1 -- Serial number 160429
!
! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2015
!
! This code is licensed under either the traditional Inform license as
! described by the DM4 or the Artistic License version 2.0. See the
! file COPYING in the distribution archive or at
! https://github.com/DavidGriffith/inform6lib/
!
! 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 just_undone;
Import global transcript_mode;
Import global xcommsdir;
Import global sys_statusline_flag;
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 prev_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;
Import global lm_s;
#Ifdef COLOUR;
Import global clr_fg;
Import global clr_bg;
Import global clr_fgstatus;
Import global clr_bgstatus;
#Endif; ! COLOUR
Import global statuswin_current;
#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 asking_player;
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 length_of_noun;
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 dict_flags_of_noun;
Import global pronoun_word;
Import global pronoun_obj;
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 caps_mode;
Import global print_anything_result;
Import global initial_lookmode;
Import global before_first_turn;
Import global short_name_case;
Import global dict_start;
Import global dict_entry_size;
Import global dict_end;
#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
! ==============================================================================

149
library_en/parser.h Normal file
View file

@ -0,0 +1,149 @@
! ==============================================================================
! PARSER: Front end to parser.
!
! Supplied for use with Inform 6 -- Release 6.12.1 -- Serial number 160605
!
! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2016
!
! This code is licensed under either the traditional Inform license as
! described by the DM4 or the Artistic License version 2.0. See the
! file COPYING in the distribution archive or at
! https://github.com/DavidGriffith/inform6lib/
!
! In your game file, Include three library files in this order:
! Include "Parser";
! Include "VerbLib";
! Include "Grammar";
! ==============================================================================
System_file;
#Ifndef LIBRARY_STAGE; ! This file is the first one to define LIBRARY_STAGE.
! "This file already included" <=> "LIBRARY_STAGE exists"
! ------------------------------------------------------------------------------
#Ifndef VN_1633;
Message fatalerror "*** Library 6.12.1 needs Inform v6.33 or later to work ***";
#Endif; ! VN_
Constant LibSerial "160605";
Constant LibRelease "6.12.1";
Constant LIBRARY_VERSION 612;
Constant Grammar__Version 2;
Constant BEFORE_PARSER 10;
Constant AFTER_PARSER 20;
Constant AFTER_VERBLIB 30;
Constant AFTER_GRAMMAR 40;
Constant LIBRARY_STAGE = BEFORE_PARSER;
Default COMMENT_CHARACTER '*';
#Ifdef INFIX;
Default DEBUG 0;
#Endif; ! INFIX
#Ifndef WORDSIZE; ! compiling with Z-code only compiler
Default TARGET_ZCODE 0;
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
Include "infglk";
#Endif; ! TARGET_
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;
Fake_Action Going;
#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
! ==============================================================================
Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_PARSER;
#Ifnot;
Message "Warning: 'parser' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
#Endif;
! ==============================================================================

7123
library_en/parserm.h Normal file

File diff suppressed because it is too large Load diff

74
library_en/verblib.h Normal file
View file

@ -0,0 +1,74 @@
! ==============================================================================
! VERBLIB: Front end to standard verbs library.
!
! Supplied for use with Inform 6 -- Release 6.12.1 -- Serial number 160605
!
! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2016
!
! This code is licensed under either the traditional Inform license as
! described by the DM4 or the Artistic License version 2.0. See the
! file COPYING in the distribution archive or at
! https://github.com/DavidGriffith/inform6lib/
!
! In your game file, Include three library files in this order:
! Include "Parser";
! Include "VerbLib";
! Include "Grammar";
! ==============================================================================
System_file;
#Ifdef LIBRARY_STAGE;
#Iffalse LIBRARY_STAGE >= AFTER_VERBLIB; ! if not already included
#Iftrue LIBRARY_STAGE == AFTER_PARSER; ! if okay to include it
! ------------------------------------------------------------------------------
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;
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
! ==============================================================================
Undef LIBRARY_STAGE; Constant LIBRARY_STAGE = AFTER_VERBLIB;
#Ifnot; ! LIBRARY_STAGE < AFTER_VERBLIB but ~= AFTER_PARSER
! (this shouldn't happen because if 'parser' isn't there, LIBRARY_STAGE isn't defined)
Message "Error: 'parser' needs to be correctly included before including 'verblib'. This will cause a big number of errors!";
#Endif;
#Ifnot; ! LIBRARY_STAGE >= AFTER_VERBLIB: already included
Message "Warning: 'verblib' included twice; ignoring second inclusion. (Ignore this if this is on purpose.)";
#Endif;
#Ifnot; ! LIBRARY_STAGE is not defined (likely, 'parser' hasn't been included)
Message "Error: 'parser' needs to be correctly included before including 'verblib'. This will cause a big number of errors!";
#Endif;
! ==============================================================================

2909
library_en/verblibm.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,30 +0,0 @@
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;

View file

@ -5,9 +5,7 @@ Constant Headline "^Тест Информа.^";
Include "Parser";
Include "VerbLib";
Include "./objects";
Global the_word_was = "";
Include "./examine";
[ Initialise;
location = gallery;
@ -15,22 +13,35 @@ Global the_word_was = "";
«Парсер 2019». По крайней мере, в этом убеждал вас организатор.";
];
[ UnknownVerb word i;
objectloop (i in location) {
if (
!word == (i.&name) --> 0 &&
i has scenery
) {
the_word_was = i;
return 'осм';
}
rfalse;
}
rfalse;
];
Object gallery "Выставочный зал"
with description
"Вы стоите в маленьком зале.",
has light;
[ DeathMessage; print "Вы проиграли"; ];
Object photo "маленьк/ое фото/" gallery
with name 'маленьк' 'фото',
! ============================================================================ !
describe [;
"Перед вами стоит маленькое фото.";
],
description [;
print "На маленькой фотографии изображён мужчина с клавиатурой.
Он сосредоточенно что-то печатает.";
],
has static neuter;
Object teapot "глинян/ый чайник/" gallery
with name 'глин' 'чай',
describe [;
"Слева от фото выставлен невысокий глиняный чайник.";
],
description [;
print "По легендам, древние писатели пили много чая.
Они верили, что это поможет им понять Информ.";
],
has static male;
Include "RussiaG";