Initial commit

This commit is contained in:
Alexander Yakovlev 2018-12-16 16:01:37 +07:00
commit 648475b3e8
53 changed files with 33849 additions and 0 deletions

13
.editorconfig Normal file
View file

@ -0,0 +1,13 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[Makefile]
indent_style = tab
indent_size = 4

4
.gitignore vendored Normal file
View file

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

15
Makefile Normal file
View file

@ -0,0 +1,15 @@
all: glulx
z5:
inform -D +library-z,libext +charset_map=library-z/cyrwin.cm +language_name=Russian -v5 source.inf out.z5
glulx:
inform -D -DG -Cu +library-glulx,libext +language_name=Russian '$$MAX_UNICODE_CHARS=1024' '$$MAX_STATIC_DATA=20000' '$$DICT_CHAR_SIZE=4' source.inf out.ulx
release:
inform +library-z,libext +charset_map=library-z/cyrwin.cm +language_name=Russian -v5 source.inf out.z5
css:
sass interpreter/scss/main.scss:interpreter/main.css
css-watch:
sass --watch interpreter/scss/main.scss:interpreter/main.css
css-release:
cd interpreter/scss
sass interpreter/scss/main.scss:interpreter/main.css --no-source-map --style=compressed

51
index.html Normal file
View file

@ -0,0 +1,51 @@
<!doctype html>
<html>
<head>
<title>Vorple</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="interpreter/main.css">
</head>
<body>
<main id="haven">
<div id="output">
<div id="window0" aria-live="polite" aria-atomic="false" aria-relevant="additions"></div>
</div>
<form id="lineinput">
<label id="lineinput-prefix" for="lineinput-field">&gt; </label>
<input name="lineinput" placeholder="Enter a command" id="lineinput-field" type="text" autocapitalize="none">
</form>
<div id="loader">
<h2 id="loader-message">Loading scripts</h2>
<div id="spinner">V</div>
</div>
</main>
<script src="interpreter/vorple.min.js"></script>
<script>
vorple.options = {
autosave: false,
engineColors: false,
resource_paths: {
images: "resources/images",
audio: "resources/audio"
},
// URL to the game file
story: "game.ulx"
};
Module.locateFile = function( name ) {
return "interpreter/" + name;
};
vorple.debug.off();
vorple.init();
</script>
</body>
</html>

BIN
interpreter/engine.bin Normal file

Binary file not shown.

17
interpreter/engine.js Normal file

File diff suppressed because one or more lines are too long

BIN
interpreter/engine.js.mem Normal file

Binary file not shown.

313
interpreter/scss/haven.scss Normal file
View file

@ -0,0 +1,313 @@
body, html {
margin: 0;
padding: 0;
}
body {
overflow-y: scroll;
}
body, input, label, #loader {
color: #000;
background-color: #fff;
}
input[type=text] {
height: auto;
font-size: inherit;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
html.theme-dark body,
html.theme-dark input,
html.theme-dark label,
html.theme-dark #loader {
color: #aaa;
background-color: #000;
}
html.monospace body,
html.monospace input,
html.monospace label,
html.monospace #loader {
font-family: monospace;
}
body, input, label {
font-size: 17px;
}
#output {
max-width: 751px;
padding: 0 15px 10px 15px;
margin: 0 auto;
}
#output span {
white-space: pre-wrap;
}
#lineinput-field {
border: 0;
box-shadow: none;
display: inline;
outline: 0;
padding: 0;
width: 100%;
}
#prompt {
display: inline-block;
width: 500px;
}
.hugowindow {
position: fixed;
overflow: hidden;
}
.safarifix .hugowindow {
position: absolute;
}
#fatal-error {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 1em;
color: #fff;
background-color: #600;
white-space: pre-wrap;
}
#loader {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
#loader-message {
margin-top: 90px;
text-align: center;
}
#loader.stopped #loader-message {
text-decoration: line-through;
}
#spinner {
position: fixed;
font-family: serif;
color: #888;
top: 180px;
left: 0;
width: 100%;
text-align: center;
height: 50px;
line-height: 100%;
font-size: 50px;
animation: spin 2s ease-in-out forwards;
animation-iteration-count: infinite;
}
@-ms-keyframes spin {
from {
-ms-transform: rotate(0deg);
}
to {
-ms-transform: rotate(360deg);
}
}
@-moz-keyframes spin {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(360deg);
}
}
@-webkit-keyframes spin {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* Text colors and font styles */
.font-bold {
font-weight: bold;
}
.font-italic {
font-style: italic;
}
.font-underline {
text-decoration: underline;
}
.font-proportional {
font-family: serif;
font-size: 17px;
}
.font-fixed-width {
font-family: monospace;
font-size: 15px;
padding: 2px 0;
}
.textcolor-0 { /* black */
color: #000;
}
.textcolor-1 { /* blue */
color: #00a;
}
.textcolor-2 { /* green */
color: #0a0;
}
.textcolor-3 { /* cyan */
color: #0aa;
}
.textcolor-4 { /* red */
color: #a00;
}
.textcolor-5 { /* magenta */
color: #a0a;
}
.textcolor-6 { /* brown */
color: #a50;
}
.textcolor-7 { /* white */
color: #aaa;
}
.textcolor-8 { /* dark gray */
color: #555;
}
.textcolor-9 { /* light blue */
color: #55f;
}
.textcolor-10 { /* light green */
color: #5f5;
}
.textcolor-11 { /* light cyan */
color: #5ff;
}
.textcolor-12 { /* light red */
color: #f55;
}
.textcolor-13 { /* light magenta */
color: #f5f;
}
.textcolor-14 { /* yellow */
color: #ff5;
}
.textcolor-15 { /* bright white */
color: #fff;
}
.bgcolor-0 { /* black */
background-color: #000;
}
.bgcolor-1 { /* blue */
background-color: #00a;
}
.bgcolor-2 { /* green */
background-color: #0a0;
}
.bgcolor-3 { /* cyan */
background-color: #0aa;
}
.bgcolor-4 { /* red */
background-color: #a00;
}
.bgcolor-5 { /* magenta */
background-color: #a0a;
}
.bgcolor-6 { /* brown */
background-color: #a50;
}
.bgcolor-7 { /* white */
background-color: #aaa;
}
.bgcolor-8 { /* dark gray */
background-color: #555;
}
.bgcolor-9 { /* light blue */
background-color: #55f;
}
.bgcolor-10 { /* light green */
background-color: #5f5;
}
.bgcolor-11 { /* light cyan */
background-color: #5ff;
}
.bgcolor-12 { /* light red */
background-color: #f55;
}
.bgcolor-13 { /* light magenta */
background-color: #f5f;
}
.bgcolor-14 { /* yellow */
background-color: #ff5;
}
.bgcolor-15 { /* bright white */
background-color: #fff;
}

View file

@ -0,0 +1,29 @@
@import 'toastr';
@import 'vex';
@import 'vex-theme-plain';
@import 'haven';
@import 'vorple';
html {
height: 100%;
}
body {
background-image: url('../resources/images/refectory.jpg');
background-size: cover;
background-repeat: no-repeat;
#window0 {
padding: 1em;
}
color: white;
text-shadow: black 1px 1px;
}
input, label, #loader {
color: white;
background-color: transparent;
}
#lineinput {
display: flex;
label {
margin-right: 0.5em;
}
}

View file

@ -0,0 +1,228 @@
.toast-title {
font-weight: bold;
}
.toast-message {
-ms-word-wrap: break-word;
word-wrap: break-word;
}
.toast-message a,
.toast-message label {
color: #FFFFFF;
}
.toast-message a:hover {
color: #CCCCCC;
text-decoration: none;
}
.toast-close-button {
position: relative;
right: -0.3em;
top: -0.3em;
float: right;
font-size: 20px;
font-weight: bold;
color: #FFFFFF;
-webkit-text-shadow: 0 1px 0 #ffffff;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
filter: alpha(opacity=80);
line-height: 1;
}
.toast-close-button:hover,
.toast-close-button:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
opacity: 0.4;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
filter: alpha(opacity=40);
}
.rtl .toast-close-button {
left: -0.3em;
float: left;
right: 0.3em;
}
/*Additional properties for button version
iOS requires the button element instead of an anchor tag.
If you want the anchor version, it requires `href="#"`.*/
button.toast-close-button {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.toast-top-center {
top: 0;
right: 0;
width: 100%;
}
.toast-bottom-center {
bottom: 0;
right: 0;
width: 100%;
}
.toast-top-full-width {
top: 0;
right: 0;
width: 100%;
}
.toast-bottom-full-width {
bottom: 0;
right: 0;
width: 100%;
}
.toast-top-left {
top: 12px;
left: 12px;
}
.toast-top-right {
top: 12px;
right: 12px;
}
.toast-bottom-right {
right: 12px;
bottom: 12px;
}
.toast-bottom-left {
bottom: 12px;
left: 12px;
}
#toast-container {
position: fixed;
z-index: 999999;
pointer-events: none;
/*overrides*/
}
#toast-container * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#toast-container > div {
position: relative;
pointer-events: auto;
overflow: hidden;
margin: 0 0 6px;
padding: 15px 15px 15px 50px;
width: 300px;
-moz-border-radius: 3px 3px 3px 3px;
-webkit-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
background-position: 15px center;
background-repeat: no-repeat;
-moz-box-shadow: 0 0 12px #999999;
-webkit-box-shadow: 0 0 12px #999999;
box-shadow: 0 0 12px #999999;
color: #FFFFFF;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
filter: alpha(opacity=80);
}
#toast-container > div.rtl {
direction: rtl;
padding: 15px 50px 15px 15px;
background-position: right 15px center;
}
#toast-container > div:hover {
-moz-box-shadow: 0 0 12px #000000;
-webkit-box-shadow: 0 0 12px #000000;
box-shadow: 0 0 12px #000000;
opacity: 1;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
filter: alpha(opacity=100);
cursor: pointer;
}
#toast-container > .toast-info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-error {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
}
#toast-container > .toast-success {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
}
#toast-container > .toast-warning {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
}
#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
width: 300px;
margin-left: auto;
margin-right: auto;
}
#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
width: 96%;
margin-left: auto;
margin-right: auto;
}
.toast {
background-color: #030303;
}
.toast-success {
background-color: #51A351;
}
.toast-error {
background-color: #BD362F;
}
.toast-info {
background-color: #2F96B4;
}
.toast-warning {
background-color: #F89406;
}
.toast-progress {
position: absolute;
left: 0;
bottom: 0;
height: 4px;
background-color: #000000;
opacity: 0.4;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
filter: alpha(opacity=40);
}
/*Responsive Design*/
@media all and (max-width: 240px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 11em;
}
#toast-container > div.rtl {
padding: 8px 50px 8px 8px;
}
#toast-container .toast-close-button {
right: -0.2em;
top: -0.2em;
}
#toast-container .rtl .toast-close-button {
left: -0.2em;
right: 0.2em;
}
}
@media all and (min-width: 241px) and (max-width: 480px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 18em;
}
#toast-container > div.rtl {
padding: 8px 50px 8px 8px;
}
#toast-container .toast-close-button {
right: -0.2em;
top: -0.2em;
}
#toast-container .rtl .toast-close-button {
left: -0.2em;
right: 0.2em;
}
}
@media all and (min-width: 481px) and (max-width: 768px) {
#toast-container > div {
padding: 15px 15px 15px 50px;
width: 25em;
}
#toast-container > div.rtl {
padding: 15px 50px 15px 15px;
}
}

View file

@ -0,0 +1,107 @@
@-webkit-keyframes vex-pulse {
0% {
box-shadow: inset 0 0 0 300px transparent; }
70% {
box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25); }
100% {
box-shadow: inset 0 0 0 300px transparent; } }
@keyframes vex-pulse {
0% {
box-shadow: inset 0 0 0 300px transparent; }
70% {
box-shadow: inset 0 0 0 300px rgba(255, 255, 255, 0.25); }
100% {
box-shadow: inset 0 0 0 300px transparent; } }
.vex.vex-theme-plain {
padding-top: 160px;
padding-bottom: 160px; }
.vex.vex-theme-plain .vex-content {
font-family: "Helvetica Neue", sans-serif;
background: #fff;
color: #444;
padding: 1em;
position: relative;
margin: 0 auto;
max-width: 100%;
width: 450px;
font-size: 1.1em;
line-height: 1.5em; }
.vex.vex-theme-plain .vex-content h1, .vex.vex-theme-plain .vex-content h2, .vex.vex-theme-plain .vex-content h3, .vex.vex-theme-plain .vex-content h4, .vex.vex-theme-plain .vex-content h5, .vex.vex-theme-plain .vex-content h6, .vex.vex-theme-plain .vex-content p, .vex.vex-theme-plain .vex-content ul, .vex.vex-theme-plain .vex-content li {
color: inherit; }
.vex.vex-theme-plain .vex-close {
position: absolute;
top: 0;
right: 0;
cursor: pointer; }
.vex.vex-theme-plain .vex-close:before {
position: absolute;
content: "\00D7";
font-size: 26px;
font-weight: normal;
line-height: 31px;
height: 30px;
width: 30px;
text-align: center;
top: 3px;
right: 3px;
color: #bbb;
background: transparent; }
.vex.vex-theme-plain .vex-close:hover:before, .vex.vex-theme-plain .vex-close:active:before {
color: #777;
background: #e0e0e0; }
.vex.vex-theme-plain .vex-dialog-form .vex-dialog-message {
margin-bottom: .5em; }
.vex.vex-theme-plain .vex-dialog-form .vex-dialog-input {
margin-bottom: 1em; }
.vex.vex-theme-plain .vex-dialog-form .vex-dialog-input select, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input textarea, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="date"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="datetime"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="datetime-local"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="email"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="month"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="number"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="password"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="search"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="tel"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="text"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="time"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="url"], .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="week"] {
background: #f0f0f0;
width: 100%;
padding: .25em .67em;
border: 0;
font-family: inherit;
font-weight: inherit;
font-size: inherit;
min-height: 2.5em;
margin: 0 0 .25em; }
.vex.vex-theme-plain .vex-dialog-form .vex-dialog-input select:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input textarea:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="date"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="datetime"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="datetime-local"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="email"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="month"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="number"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="password"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="search"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="tel"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="text"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="time"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="url"]:focus, .vex.vex-theme-plain .vex-dialog-form .vex-dialog-input input[type="week"]:focus {
box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.2);
outline: none; }
.vex.vex-theme-plain .vex-dialog-form .vex-dialog-buttons {
*zoom: 1; }
.vex.vex-theme-plain .vex-dialog-form .vex-dialog-buttons:after {
content: "";
display: table;
clear: both; }
.vex.vex-theme-plain .vex-dialog-button {
border-radius: 0;
border: 0;
float: right;
margin: 0 0 0 .5em;
font-family: inherit;
text-transform: uppercase;
letter-spacing: .1em;
font-size: .8em;
line-height: 1em;
padding: .75em 2em; }
.vex.vex-theme-plain .vex-dialog-button.vex-last {
margin-left: 0; }
.vex.vex-theme-plain .vex-dialog-button:focus {
-webkit-animation: vex-pulse 1.1s infinite;
animation: vex-pulse 1.1s infinite;
outline: none; }
@media (max-width: 568px) {
.vex.vex-theme-plain .vex-dialog-button:focus {
-webkit-animation: none;
animation: none; } }
.vex.vex-theme-plain .vex-dialog-button.vex-dialog-button-primary {
background: #3288e6;
color: #fff; }
.vex.vex-theme-plain .vex-dialog-button.vex-dialog-button-secondary {
background: #e0e0e0;
color: #777; }
.vex-loading-spinner.vex-theme-plain {
height: 2.5em;
width: 2.5em; }

117
interpreter/scss/vex.scss Normal file
View file

@ -0,0 +1,117 @@
@-webkit-keyframes vex-fadein {
0% {
opacity: 0; }
100% {
opacity: 1; } }
@keyframes vex-fadein {
0% {
opacity: 0; }
100% {
opacity: 1; } }
@-webkit-keyframes vex-fadeout {
0% {
opacity: 1; }
100% {
opacity: 0; } }
@keyframes vex-fadeout {
0% {
opacity: 1; }
100% {
opacity: 0; } }
@-webkit-keyframes vex-rotation {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg); } }
@keyframes vex-rotation {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg); } }
.vex, .vex *, .vex *:before, .vex *:after {
-moz-box-sizing: border-box;
box-sizing: border-box; }
.vex {
position: fixed;
overflow: auto;
-webkit-overflow-scrolling: touch;
z-index: 1111;
top: 0;
right: 0;
bottom: 0;
left: 0; }
.vex-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll; }
.vex-overlay {
-webkit-animation: vex-fadein .5s;
animation: vex-fadein .5s;
position: fixed;
z-index: 1111;
background: rgba(0, 0, 0, 0.4);
top: 0;
right: 0;
bottom: 0;
left: 0; }
.vex-overlay.vex-closing {
-webkit-animation: vex-fadeout .5s forwards;
animation: vex-fadeout .5s forwards; }
.vex-content {
-webkit-animation: vex-fadein .5s;
animation: vex-fadein .5s;
background: #fff; }
.vex.vex-closing .vex-content {
-webkit-animation: vex-fadeout .5s forwards;
animation: vex-fadeout .5s forwards; }
.vex-close:before {
font-family: Arial, sans-serif;
content: "\00D7"; }
.vex-dialog-form {
margin: 0; }
.vex-dialog-button {
text-rendering: optimizeLegibility;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
cursor: pointer;
-webkit-tap-highlight-color: transparent; }
.vex-loading-spinner {
-webkit-animation: vex-rotation .7s linear infinite;
animation: vex-rotation .7s linear infinite;
box-shadow: 0 0 1em rgba(0, 0, 0, 0.1);
position: fixed;
z-index: 1112;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 2em;
width: 2em;
background: #fff; }
body.vex-open {
overflow: hidden; }

View file

@ -0,0 +1,351 @@
html,
body,
input {
font-family: "Roboto", sans-serif;
}
a, a:visited {
color: #369;
}
blockquote {
border: 1px solid #ccc;
padding: 0.5em 1em;
}
#output {
line-height: 1.5em;
}
.force-hidden {
visibility: hidden;
}
.uiblock {
position: fixed;
bottom: 0;
left: 0;
right: 0;
top: 0;
z-index: 999999;
}
/* Basic styles */
.font-bold {
font-weight: bold;
}
.font-italic {
font-style: italic;
}
.font-underline {
text-decoration: underline;
}
/* the following two are specified by the Haven interpreter but are unused in Vorple at the moment */
.font-proportional {
font-family: "Roboto", serif;
}
.font-fixed-width {
font-family: "Roboto Mono", monospace;
}
/* Vorple Screen Effects */
.center-align {
text-align: center;
}
.right-align {
text-align: right;
}
.cursive-font {
font-style: italic;
}
.emphasized-font {
font-style: italic;
}
.fantasy-font {
font-family: fantasy;
}
.monospace-font {
font-family: "Roboto Mono", monospace;
}
#output span.nowrap-font,
#output span.nowrap-font * {
white-space: nowrap;
}
.strikethrough-font {
text-decoration: line-through;
}
.strong-font {
font-weight: bold;
}
.underlined-font {
text-decoration: underline;
}
.xx-small-font {
font-size: xx-small;
}
.x-small-font {
font-size: x-small;
}
.small-font {
font-size: small;
}
.large-font {
font-size: large;
}
.x-large-font {
font-size: x-large;
}
.xx-large-font {
font-size: xx-large;
}
.white-letters {
color: #fff;
}
.black-letters {
color: #000;
}
.blue-letters {
color: #00a;
}
.green-letters {
color: #0a0;
}
.cyan-letters {
color: #0aa;
}
.red-letters {
color: #a00;
}
.magenta-letters {
color: #a0a;
}
.brown-letters {
color: #a50;
}
.yellow-letters {
color: #ff5;
}
.dark-gray-letters {
color: #555;
}
.light-gray-letters {
color: #aaa;
}
.light-blue-letters {
color: #55f;
}
.light-green-letters {
color: #5f5;
}
.light-cyan-letters {
color: #5ff;
}
.light-red-letters {
color: #f55;
}
.light-magenta-letters {
color: #f5f;
}
.white-background {
background-color: #fff;
}
.black-background {
background-color: #000;
}
.blue-background {
background-color: #00a;
}
.green-background {
background-color: #0a0;
}
.cyan-background {
background-color: #0aa;
}
.red-background {
background-color: #a00;
}
.magenta-background {
background-color: #a0a;
}
.brown-background {
background-color: #a50;
}
.yellow-background {
background-color: #ff5;
}
.dark-gray-background {
background-color: #555;
}
.light-gray-background {
background-color: #aaa;
}
.light-blue-background {
background-color: #55f;
}
.light-green-background {
background-color: #5f5;
}
.light-cyan-background {
background-color: #5ff;
}
.light-red-background {
background-color: #f55;
}
.light-magenta-background {
background-color: #f5f;
}
/* Status line */
.status-line-container {
display: flex;
background-color: #fff;
border-bottom: 3px double #ccc;
position: fixed;
top: 0;
white-space: pre-wrap;
max-width: inherit;
width: 100%;
}
#output > .status-line-container {
margin-left: -15px;
}
.status-line-left {
flex: 1;
text-align: left;
}
.status-line-middle,
.status-line-mobile {
flex: 1;
text-align: center;
}
.status-line-right {
flex: 1;
text-align: right;
}
/* Image alignments */
.vorple-image img {
max-width: 100%;
}
.centered {
text-align: center;
}
.left-aligned {
text-align: left;
}
.right-aligned {
text-align: right;
}
.left-floating {
float: left;
}
.right-floating {
float: right;
}
/* Modal windows */
.vex {
z-index: 9999999;
}
body .vex.vex-theme-plain .vex-content {
max-width: 850px;
width: 90%;
}
.vex-dialog-message {
white-space: pre-wrap;
}
/* Tooltips */
#powerTip {
max-width: 90%;
white-space: pre-wrap;
}
/* Responsive classes */
@media screen and (min-width: 569px) {
.sm-only {
display: none;
}
}
@media screen and (max-width: 568px) {
.lg-only {
display: none;
}
}

56
interpreter/vorple.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

647
libext/HelpRoutines.h Normal file
View file

@ -0,0 +1,647 @@
!---------------------------------------------------------------------------
! HelpRoutines.h, by Emily Short (emshort@mindspring.com)
! Version 1.0
! 8/16/02
!
! Being a file of straightforward routines that will make your game print
! wodges and wodges of text about IF playing.
!
! Some portions based on paraphrase of instructional text by
! Stephen Granade.
!---------------------------------------------------------------------------
!
! RIGHTS:
!
! This library file may be treated as public domain. It may be
! used in source with or without credit to the original author. It may be
! modified at the user's discretion. It may be freely redistributed.
! The textual content of the routines may be lifted from their context
! and reused elsewhere.
!
!
! INSTALLATION:
!
! Include "HelpRoutines" in your gamefile.
!
!
! CONTENTS:
!
! -- Three basic formatting routines for doing bold and italic text
! and for awaiting a keypress. (The only reason to define these
! is to provide z-code/Glulx flexibility.)
!
! -- LongIntro. A description of IF, which prints both of
! -- BasicBrief. A quick description of IF in the abstract
! -- BasicIntro. A somewhat longer description of same, discuss
!
! -- ExplainPrompt. What a prompt is.
! -- StartingInstructions. Suggests that the player look, examine items,
! and check his inventory.
! -- StuckInstructions. A list of tips for a player in trouble
!
! -- AllCommunication. Prints all of the following:
! -- Communication. Basic instructions on how to form valid commands.
! -- OnMovement
! -- OnObjects
! -- OnNPCs, which will also call one of
! -- AskTellNPC (Define NPC_ASKTELL before including this file)
! -- MenuNPC (Define NPC_MENU before including this file)
! -- TalkToNPC (Define NPC_TALKTO before including this file)
! -- TopicMenuNPC (Define NPC_TOPIC before including this file)
! -- MetaCommands. Introduces SAVE, QUIT, RESTART, RESTORE, UNDO.
!
! -- StandardVerbs. A list of standard verbs. Self-adjusting to reflect
! the instructions about NPCS; it will list SCORE only if you have a MAX_SCORE
! greater than 0, and the OBJECTS/PLACES commands only if you have not defined
! NO_PLACES.
! -- Abbreviations. A list of abbreviations and their meanings.
!
! -- OnlineHelp. How to find online IF manuals.
! -- MoreGames. How to find more IF.
!
! SEE ALSO:
! -- SampleTranscript.h: contains several sample transcripts formatted
! for inclusion in IF games.
!
! CAVEAT
!
! Note that in some cases this material may be incorrect for your game.
! You are advised to read the resulting text and determine whether it suits
! your ends.
!
!---------------------------------------------------------------------------
system_file;
!---------------------------------------------------------------------------
! Special effects -- bold-texting and pauses for display purposes
!---------------------------------------------------------------------------
#ifdef TARGET_GLULX;
[ ES_Pause i;
i = KeyCharPrimitive();
if (i=='q') rtrue;
rfalse;
];
#ifnot;
[ ES_Pause i;
@read_char 1 i;
if (i == 'q') rtrue;
rfalse;
];
#endif;
#ifdef TARGET_GLULX;
[ ESB str; ! print something in bold
if (str==0) rfalse;
glk_set_style(style_Input);
print (string) str;
glk_set_style(style_Normal);
rtrue;
];
#ifnot;
[ ESB str; ! print something in bold
if (str==0) rfalse;
style bold;
print (string) str;
style roman;
rtrue;
];
#endif;
#ifdef TARGET_GLULX;
[ ESI str; ! print something in italics
if (str==0) rfalse;
glk_set_style(style_Emphasized);
print (string) str;
glk_set_style(style_Normal);
rtrue;
];
#ifnot;
[ ESI str; ! print something in italics
if (str==0) rfalse;
style underline;
print (string) str;
style roman;
rtrue;
];
#endif;
!---------------------------------------------------------------------------
! Introductions
!---------------------------------------------------------------------------
[ LongIntro;
BasicBrief();
new_line;
BasicIntro();
];
[ BasicBrief;
print (ESB) "Об Интерактивной Литературе^";
print "Игра, которую вы скачали — это произведение в жанре Интерактивной Литературы (ИЛ).
В интерактивной литературе вы играете за главного героя истории. Команды, которые
вы вводите, определяют действия персонажа и течение сюжета. В некоторых ИЛ-играх
есть графика, но в большинстве её нет образы создаёт ваше воображение. С другой
стороны, вам доступен обширный выбор действий в то время как в других играх
ваши действия могут быть ограничены стрельбой, передвижением или исследованием вещей
с помощью мыши, ИЛ позволяет использовать множество глаголов.^";
];
[ BasicIntro;
print "Существуют различные виды интерактивной литературы: в некоторых акцент
поставлен на разгадывании загадок, некоторые хотят провести вас по череде
событий, некоторые предлагают исследовать что-либо.^^";
print "В играх со множеством загадок вы будете проводить большее количество времени
слоняясь повсюду и пытаясь понять, что же делать дальше, в этом заключается основное
развлечение. (Если вам нравится подобное времяпрепровождение, конечно.)
В начале игры вы обычно можете понять, игра какого рода перед вами, и каких
действий автор от вас ожидает. Внимательно прочитайте вступительный текст:
в нём может содержаться информация о персонаже, которым вы играете, об игровых
задачах и тому подобное.^^";
print "Если игра предлагает ввести слово @<<инфо@>>, перед тем как начать, вам
лучше это сделать: скорее всего, вы узнаете особые команды, или другие данные,
без которых не сможете дойти до конца.^^";
print (ESB) "КАК УСТРОЕН МИР^^";
print "Пространство: Действие большинства игр ИЛ происходит в мире, сделанном из комнат, которые сами по
себе не разделены. Можно переходить между комнатами, но по самой комнате ходить нельзя.
>ПОДОЙТИ К СТОЛУ вряд ли сработает. С другой стороны, если про что-то написано,
что оно находится где-то высоко или вне досягаемости, то иногда имеет смысл
встать на какой-нибудь объект, чтобы стать выше.^^";
print "Расположение: Одна из вещей, которая тщательно выполнена в ИЛ, это расположение предметов. Лежит ли
что-то внутри чего-то или на чём-то? Игра следит за этим, и множество головоломок
зависят от того, где находятся предметы у игрока или на полу комнаты, на столе,
в коробке и т.д.^^";
print "Типы действий: Большинство действий, осуществимых в мире ИЛ краткие и точные. >ИДТИ НА ЗАПАД
или >ОТКРЫТЬ ДВЕРЬ наверняка сработают. >ПОЕХАТЬ В ПУТЕШЕСТВИЕ или >СДЕЛАТЬ СТОЛ наверняка нет.
Действия наподобие >ПОЙТИ К ОТЕЛЮ зависят от игры в
некоторых это сработает, но в большинстве нет. Чаще всего сложные действия нужно
разбивать на отдельные команды, чтобы игра смогла их понять.^^";
print "Прочие персонажи: Прочие (неигровые) персонажи в ИЛ часто весьма ограничены, хотя существуют игры, в
которых общение с персонажами играет важнейшую роль. Если персонаж отвечает на
многие вопросы, помнит, что ему говорили, двигается сам по себе и т.д., то скорее всего,
он может быть важен в игре. Если же у него стандартные ответы и непохоже, что автор
много в него вложил, то, наверное, он добавлен как массовка или чтобы помочь при
выполнении какой-то головоломки. В играх, сильно ориентированных на разгадки головоломок,
персонажей часто приходится подкупать, угрожать им, или заставить сделать
что-то, что сам игрок сделать не может выдать информацию или предмет, достать
куда-нибудь высоко, позволить игроку пройти в недоступную локацию и т.д.
Стандартные команды для общения с персонажами: >СПРОСИТЬ <персонажа> ПРО
<тему>, >РАССКАЗАТЬ <персонажу> ПРО <тему>, >ДАТЬ <предмет> <персонажу>, >ПОКАЗАТЬ
<предмет> <персонажу>.^";
rtrue;
];
!---------------------------------------------------------------------------
! Explain Prompt, Starting Instructions, Stuck Instructions
!---------------------------------------------------------------------------
[ ExplainPrompt;
print (ESB) "ПОДСКАЗКА^";
print "Знаком ", (ESB) ">", " игра спрашивает вас, что вы хотите сейчас сделать.
Отвечать следует командой. Обычно это глагол, за которым идут предлоги и объекты.
Например, ПОСМОТРЕТЬ, ПОСМОТРЕТЬ НА РЫБУ, ВЗЯТЬ РЫБУ.^";
];
[ StartingInstructions;
print (ESB) "С ЧЕГО НАЧАТЬ?^";
print "Первым делом при запуске игры следует ознакомиться с окружением и понять цель игры.^^";
print (ESB) "Внимательно прочтите вступительный текст. ", "Иногда в нём содержатся подсказки.^";
print (ESB) "Также вам будет нужно ОСМОТРЕТЬ (ОСМ или просто О) комнату, ", "в которой вы
находитесь. Узнайте, где находятся выходы, и какие объекты здесь описаны. Если какие-то
из них кажутся интересными, ОСМОТРИТЕ их.^";
print (ESB) "Вам также следует ОСМОТРЕТЬ СЕБЯ, ", "чтобы узнать, оставил ли автор какие-то сведения
о вашем персонаже. ИНВЕНТАРЬ (ИНВ) покажет, что вы несёте с собой.^";
print (ESB) "Как только вы сориентируетесь, начинайте изучение. ", "Двигайтесь от комнаты к комнате и
осматривайте каждую доступную локацию.^";
];
[ StuckInstructions;
print (ESB) "Изучайте. ", "Осматривайте все объекты вокруг и в вашем инвентаре.
Открывайте все двери, которые
находите, и заходите в них. Смотрите внутрь закрытых контейнеров. Убедитесь, что сделали
всё, что можно, с тем, что находится вокруг.^^";
print (ESB) "Используйте все пять чувств. ", "Если в игре упоминается какая-то поверхность,
запах или звук, попробуйте прикоснуться/понюхать/послушать или попробовать на вкус.^^";
print (ESB) "Будьте внимательны и скрупулёзны. ", "Если вы всё ещё не понимаете что делать, попробуйте
открывать окна, заглядывать под кровати и т.п. Иногда объекты очень хорошо спрятаны.^^";
print (ESB) "Перечитывайте. ", "Возвращайтесь к вещам, которые уже видели; порой это может натолкнуть на идею,
которая вас раньше не посещала.^^";
if (ES_Pause()) jump end;
print (ESB) "Ищите подсказки в тексте игры. ",
"Объекты с обширным описанием, возможно, более важны, чем описанные одной
строкой. Поэкспериментируйте с ними. Если в описании машины указано, что она состоит из
деталей, попробуйти взаимодействовать с ними. Обращайте внимание на то, какие
глаголы использует сама игра. Попробуйти употребить их сами. В играх часто
встречаются специальные глаголы названия магических заклинаний или другие
особые слова. Никогда не повредит попробовать сделать то, на что намекает игра.^^";
print (ESB) "Перефразируйте. ",
"Если вы задумали что-то сделать, но игра вас не понимает, попробуйте сказать это
другими словами. Зачастую синонимы подходят. Обычно разработчик пытается предусмотреть
все синонимы, но, возможно, ваши не пришли ему в голову.^^";
if (ES_Pause()) jump end;
print (ESB) "Пробуйте разные варианты. ",
"Иногда действие не срабатывает, но даёт какой-то неожиданный результат. Чаще всего
это означает, что вы на правильном пути, даже если не до конца понятно, что делать.
Если нажатие на красную кнопку вызывает скрежет за стеной, то, быть может, нажатие
сначала синей, а потом красной кнопки, откроет скрытую дверь.^^";
print (ESB) "Постарайтесь понять логику игры. ",
"Иногда игровая система использует понятия, не встречающиеся в повседневности --
к примеру, различная магия или технологии, не существующие в современном
мире. Если в игре использована подобная система, подумайте, как её использование
может помочь вам решить поставленные задачи.^^";
if (ES_Pause()) jump end;
print (ESB) "Исследуйте весь экран. ",
"Кроме главного окна есть ли ещё дополнительные? Что в них происходит? Проверьте
строку состояния в ней может содержаться название локации, в которой вы
находитесь, количество очков, время суток, состояние здоровья персонажа, и
многая другая ценная информация. Если её содержимое изменилось, это тоже
заслуживает внимания. Когда и почему произошло изменение? Если изменилось
значение здоровья персонажа, вы можете быть уверены, что это важная информация.^^";
print (ESB) "Учитывайте жанр игры. ",
"В детективах, романах и триллерах разные действия и мотивации. Что
пытаетесь сделать вы, и что бы сделал типичный персонаж? Каково разумное поведение
для детектива, героини романа или шпиона?^^";
if (ES_Pause()) jump end;
print (ESB) "Играйте вместе с кем-нибудь ещё. ", "Две головы обычно лучше одной.^^";
print (ESB) "Попробуйте ввести ИНФО или СПРАВКА: ", "часто среди информации об игре можно найти
подсказки, как пройти сложные места. Если это не сработает, напишите письмо автору,
спросите на форумах ifiction или в чатах Discord. Желательно
указать название игры в теме сообщения, и оставить пустое место в начале, чтобы тот
эпизод, который вы описываете, не бросался в глаза тем, кто ещё не дошёл до него. Затем
опишите проблему как можно более ясно. Скорее всего, вскоре найдтся кто-нибудь, кто
поможет разгадать эту загадку.^^";
if (ES_Pause()) jump end;
print (ESB) "Напишите автору: ",
"Если вы застряли в совсем неожиданном месте, возможно, это баг. Если
вы уверены в этом, напишите автору e-mail (корректно) с описанием проблемы,
и спросите, как её избежать.^";
.end;
"Удачи!";
];
!---------------------------------------------------------------------------
! Standard Verbs list
!---------------------------------------------------------------------------
[ StandardVerbs flag;
print "Здесь вы найдёте список стандартных команд для игр вроде этой.
Учтите, что в этой игре могут встречаться и другие глаголы. Этот список
пригодится вам для начала:^^";
#ifdef TARGET_GLULX;
glk_set_style(style_Preformatted);
#ifnot;
font off;
#endif;
print "ОСМОТРЕТЬ ";
print "ИЗУЧИТЬ ";
print "ОБЫСКАТЬ ";
print "ПОСМОТРЕТЬ ПОД";
print "^";
print "^";
print "ИНВЕНТАРЬ ";
print "ВЗЯТЬ ";
print "ВЫБРОСИТЬ ";
print "ОПОРОЖНИТЬ ";
print "^";
print "ПОЛОЖИТЬ НА ";
print "ПОЛОЖИТЬ В ";
print "^";
print "^";
print "СЕВЕР [С] ";
print "ЮГ [Ю] ";
print "ВОСТОК [В] ";
print "ЗАПАД [З] ";
print "^";
print "[СВ] ";
print "[СЗ] ";
print "[ЮВ] ";
print "[ЮЗ] ";
print "^";
print "ВВЕРХ ";
print "ВНИЗ ";
print "ВОЙТИ ";
print "ВЫЙТИ ";
print "^";
print "СЛЕЗТЬ ";
print "ЗАЛЕЗТЬ ";
print "ПЛЫТЬ ";
print "ПРЫГНУТЬ ";
print "^";
print "^";
print "ЗАПЕРЕТЬ ";
print "ОТПЕРЕТЬ ";
print "ОТКРЫТЬ ";
print "ЗАКРЫТЬ ";
print "^";
print "ВКЛЮЧИТЬ ";
print "ВЫКЛЮЧИТЬ ";
print "УСТАНОВИТЬ ";
print "ПОВЕРНУТЬ ^";
print "ОБЫСКАТЬ ";
print "ПОТЯНУТЬ ";
print "ТОЛКНУТЬ ";
print "БРОСИТЬ В ";
print "^";
print "^";
print "КАЧНУТЬ ";
print "МАХНУТЬ ";
print "ПОТЕРЕТЬ ";
print "СЖАТЬ ";
print "^";
print "ЕСТЬ ";
print "ПИТЬ ";
print "НАДЕТЬ ";
print "СНЯТЬ ";
print "^";
print "СЛУШАТЬ ";
print "ЛИЗНУТЬ ";
print "КОСНУТЬСЯ ";
print "НЮХАТЬ ";
print "^";
print "ЗАЖЕЧЬ ";
print "КОПАТЬ ";
print "РЕЗАТЬ ";
print "СВЯЗАТЬ ";
print "^";
print "ЗАДУТЬ ";
print "СЛОМАТЬ ";
print "НАПОЛНИТЬ ";
print "ЖДАТЬ ";
print "^";
print "СПАТЬ ";
print "ПЕТЬ ";
print "ДУМАТЬ ";
print "^";
print "^";
print "ДАТЬ ";
print "ПОКАЗАТЬ ";
print "ПРОСНУТЬСЯ ";
print "ПОЦЕЛОВАТЬ ";
print "^";
print "УДАРИТЬ ";
print "КУПИТЬ ";
#ifdef NPC_ASKTELL;
print "ГОВОРИТЬ ";
print "^";
print "^";
print "СКАЗАТЬ О ";
print "СПРОСИТЬ О ";
#endif;
#ifdef NPC_TOPIC;
print "СКАЗАТЬ ";
print "СПРОСИТЬ ";
#endif;
#ifdef NPC_TALKTO;
print "ГОВОРИТЬ С ";
#endif;
#ifdef NPC_MENU;
print "ГОВОРИТЬ С ";
#endif;
print "^";
#ifdef TARGET_GLULX;
glk_set_style(style_Normal);
#ifnot;
font on;
#endif;
print "^^Команды, управляющие самой игрой:^^";
#ifdef TARGET_GLULX;
glk_set_style(style_Preformatted);
#ifnot;
font off;
#endif;
print "ПЕРЕЗАПУСК ЗАГРУЗИТЬ СОХРАНИТЬ^";
print "КОНЕЦ ОТКАТ МЕСТОИМЕНИЯ^";
print "СКРИПТ ВКЛ СКРИПТ ВЫКЛ ПРОВЕРИТЬ^";
#ifndef NO_PLACES;
print "ПРЕДМЕТЫ МЕСТА ^";
#endif;
#ifdef MAX_SCORE;
if (max_score > 0)
{ print "СЧЕТ ";
print "ИЗВЕЩ ВКЛ ";
print "ИЗВЕЩ ВЫКЛ ";
flag = 1;
}
#endif;
#ifdef TASKS_PROVIDED;
if (max_score > 0)
{
print "СЧЕТ";
flag = 1;
}
#endif;
if (flag) print "^";
#ifdef TARGET_GLULX;
glk_set_style(style_Normal);
#ifnot;
font on;
#endif;
];
[ Abbreviations;
print "Стандартные сокращения:^^";
print "ВН — ВНИЗ.^";
print "ВВОСТОК.^";
print "И — ИНВЕНТАРЬ. Посмотреть, что у вас с собой.^";
print "О — ОСМОТРЕТЬСЯ. Посмотреть вокруг.^";
print "О <предмет> — Изучить предмет.^";
print "ССЕВЕР.^";
print "СВСЕВЕРО-ВОСТОК.^";
print "СЗСЕВЕРО-ЗАПАД.^";
!print "Q — QUIT.^";
print "Ю — ЮГ.^";
print "ЮВ — ЮГО-ВОСТОК.^";
print "ЮЗ — ЮГО-ЗАПАД.^";
print "ВВВВЕРХ.^";
print "З — ЗАПАД.^";
print "Ж — ЖДАТЬ.^";
new_line;
];
!---------------------------------------------------------------------------
! Communication etc.
!---------------------------------------------------------------------------
[ AllCommunication;
Communication();
OnMovement();
OnObjects();
OnNPCs();
MetaCommands();
];
[ Communication;
print (ESB) "ВЗАИМОДЕЙСТВИЕ^";
print "Для управления игрой вам требуется вводить команды, начинающиеся с
глагола в инфинитиве. Например, >ЗАКРЫТЬ ДВЕРЬ или >ПОСМОТРЕТЬ ПОД КРОВАТЬЮ.^^";
];
[ OnMovement;
print (ESB) "КОМНАТЫ И ПЕРЕМЕЩЕНИЕ^";
print "В каждый момент вы находитесь в определённой локации (комнате). Когда вы заходите в
комнату, игра выведет описание того, что вы видите этой комнате. В этом описании
содержатся два важных момента: предметы, с которыми можно взаимодействовать, и список
выходов (путей наружу). Чтобы снова увидеть описание комнаты, просто введите ОСМ.^^";
print "Чтобы покинуть комнату и перейти в другую, используйте стороны света,
например ИДТИ НА СЕВЕР. Для простоты можно опускать слово ИДТИ и сокращать направление.
Можно ввести СЕВЕР, ЮГ, ВОСТОК, ЗАПАД, СЕВЕРОВОСТОК, ЮГОВОСТОК, СЕВЕРОЗАПАД,
ЮГОЗАПАД, ВВЕРХ и ВНИЗ, или кратко С, Ю, В, З, СВ, ЮВ, СЗ, СВ, ВВ, ВН.^^";
print "В некоторых локациях можно зайти ВНУТРЬ и выйти НАРУЖУ.^^";
];
[ OnObjects;
print (ESB) "ОБЪЕКТЫ^";
print "В течение игры вы встретите различные объекты, с которыми можно
выполнять всевозможные действия. Предмет можно ВЗЯТЬ (ПОДНЯТЬ) и ПОЛОЖИТЬ
(когда он вам надоел). ИНВЕНТАРЬ (или ИНВ) выведет список предметов,
которые вы несёте с собой.^^";
print "С объектами можно выполнять ряд действий, и самые частые это — ОТКРЫТЬ,
ЗАКРЫТЬ, НАДЕТЬ, СЪЕСТЬ, ЗАПЕРЕТЬ, ОТПЕРЕТЬ.^^";
print "Иногда в игре может встретиться объект, название которого игра не распознаёт,
хотя объект был указан в описании локации. Это значит, что этот объект является
всего лишь декорацией, и с ним ничего не нужно делать.^^";
];
[ OnNPCs;
print (ESB) "ПЕРСОНАЖИ^";
#ifdef NPC_MENU;
MenuNPC();
rtrue;
#endif;
#ifdef NPC_TALKTO;
TalkToNPC();
rtrue;
#endif;
#ifdef NPC_TOPIC;
TopicMenuNPC();
rtrue;
#endif;
AskTellNPC();
rtrue;
];
[ AskTellNPC;
print "Время от времени вы будете встречать людей и других существ. Вы не сможете объясняться
с ними на разговорном русском. Вместо этого, для общения используется более ограниченная система.
Четыре способа поговорить с персонажем:^^";
print "Спросить его про объект.^";
print (ESB) ">СПРОСИТЬ ПАВЛА О ЕГО БРАТЕ^";
print (ESB) ">СПРОСИТЬ ЭЛЛИ ОБ УРАГАНЕ^^";
print "Показать ему объект.^";
print (ESB) ">ПОКАЗАТЬ ОРДЕР НАРКОБАРОНУ^";
print (ESB) ">ПОКАЗАТЬ ВЕДРО ВОДЫ ЗЛОЙ ВЕДЬМЕ^^";
print "Сказать ему про объект.^";
print (ESB) ">СКАЗАТЬ МОРОЖЕНЩИКУ ПРО ЕГО ФУРГОН^";
print (ESB) ">СКАЗАТЬ ДОРОТИ ПРО ЛЕТАЮЩИХ ОБЕЗЬЯН^^";
print "Обратиться к ним.^";
print (ESB) ">ФРЕДДИ, ПРИВЕТ^";
print (ESB) ">МАЛЕНЬКИЙ МУК, ПОЛОЖИ ФРУКТ НА СТОЛ^";
print "@<<ФРЕДДИ, ПРИВЕТ@>>, — это не обычная команда, и не все игры смогут понять её,
но можете попробовать на всякий случай.^^";
];
[ MenuNPC;
print "Время от времени вы будете встречать людей и других существ. Вы можете использовать
команду >ГОВОРИТЬ С персонажем. В ответ игра предложит меню, с помощью которого станет
возможно общение с персонажем на естественном языке.^^";
print "Также может оказваться полезным продемонстрировать какие-либо объекты:^^";
print (ESB) ">ПОКАЗАТЬ ОРДЕР НАРКОБАРОНУ^";
print (ESB) ">ПОКАЗАТЬ ВЕДРО ВОДЫ ЗЛОЙ ВЕДЬМЕ^^";
print "Или обратиться к ним.^";
print (ESB) ">ФРЕДДИ, ПРИВЕТ^";
print (ESB) ">МАЛЕНЬКИЙ МУК, ПОЛОЖИ ФРУКТ НА СТОЛ^";
print "Но если вы ещё не совсем освоились, положитесь на меню.^";
];
[ TalkToNPC;
print "Время от времени вы будете встречать людей и других существ. Вы не сможете объясняться
с ними на разговорном русском. Вместо этого, можете использовать команду >ГОВОРИТЬ С
персонажем, и игра решит, что должен сказать персонаж.^";
];
[ TopicMenuNPC;
print "Время от времени вы будете встречать людей и других существ. Вы не сможете объясняться
с ними на разговорном русском. Вместо этого, для общения используется более ограниченная система.
Три способа поговорить с персонажем:^^";
print "Поднять тему для обсуждения.^";
print (ESB) ">СКАЗАТЬ БОБУ ПРО ФЛАГ^";
print (ESB) ">СПРОСИТЬ БЕТТИ О ШОКОЛАДНОМ ПЕЧЕНЬЕ^^";
print "Показать объект.^";
print (ESB) ">ПОКАЗАТЬ ОРДЕР НАРКОБАРОНУ^";
print (ESB) ">ПОКАЗАТЬ ВЕДРО ВОДЫ ЗЛОЙ ВЕДЬМЕ^^";
print "Обратиться.^";
print (ESB) ">ФРЕДДИ, ПРИВЕТ^";
print (ESB) ">МАЛЕНЬКИЙ МУК, ПОЛОЖИ ФРУКТ НА СТОЛ^";
print "Большинство персонажей не будет охотно исполнять ваши команды.^^";
];
[ MetaCommands;
print (ESB) "МЕТАКОМАНДЫ^";
print "Несколько простейших команд для управления самой игрой:^^";
print (ESB) "СОХРАНИТЬ", " — Сохраняет текущее состояние игры.^";
print (ESB) "ЗАГРУЗИТЬ", " — Возвращает игру к сохранённому состоянию. (Вы можете сохранять столько состояний,
сколько хотите.)^";
print (ESB) "ПЕРЕЗАПУСК", " — Начинает игру сначала.^";
print (ESB) "ОТМЕНА", " — Отменяет последнее действие и возвращает игру на один ход назад.^";
print (ESB) "КОНЕЦ", " — Закрывает игру.^";
];
!---------------------------------------------------------------------------
! About the IF community online
!---------------------------------------------------------------------------
[ OnlineHelp;
print (ESB) "ПОМОЩЬ В ИНТЕРНЕТЕ^^";
print "Некоторые сетевые источники информации для новичков в ИЛ:^^";
print "Инструкция для начинающих Фредерика Рамсберга (Frederik Ramsberg), www.octagate.com/Fredrik/IFGuide/^";
print "Интерактивная литература — Начало, adamcadre.ac/content/if.txt^";
print "Введение в интерактивную литературу, www.tads.org/if.htm^^";
print "Для более подробной информации о ИЛ, связи с ИЛ-сообществом и поиска других игр,
попробуйте зайти на:^^";
print "Латунный фонарь, www.brasslantern.org^";
print "Baf's Гид по интерактивной литературе Бэфа (Baf), www.wurb.com/if/index^^";
print "Вы также можете найти специфическую информацию и подсказки по играм в новостной группе google:
rec.games.int-fiction.^^";
print "Если вы не знакомы с новостными группами, и у вас не настроена программа для чтения новостей,
вы можете найти группу, зайдя на groups.google.com, и выбрав @<<rec@>>, затем @<<rec.games@>>,
затем @<<rec.games.int-fiction@>>. Вы увидите длинный перечень тем, которые обсуждались ранее.
Если вы никогда прежде не читали эту группу, прежде всего, найдите темы, содержащие аббревиатуру
@<<FAQ@>>, и прочтите их. Так вы узнаете правила размещения постов, и прочие правила этикета,
действующие в сообществе.^^";
];
[ MoreGames;
print (ESB) "РУССКОЯЗЫЧНОЕ ИЛ-СООБЩЕСТВО^^";
print "Дружелюбный Discord-сервер: https://discord.gg/X86kkzM^^";
print "Главный форум, посвящённый интерактивной литературе, написанной для любых платформ: http://ifiction.ru/^^";
print "Сайт, посвящённый русской адаптации платформы Inform (на которой написана эта игра), http://rinform.stormway.ru/^^";
print "IRC-канал, на котором можно найти активных участников сообщества: #ifrus в сети irc.forestnet.org^";
];

270
libext/SmartCantGo.h Normal file
View file

@ -0,0 +1,270 @@
!
! (With appropriate modifications to support Russian language -- D.Gayev, sep'2004)
!
! ==============================================================================
! SmartCantGo.h -- lists the exits from a room, more helpful than simply saying
! "You can't go that way".
!
! Version 6.2 (Jul04) by Roger Firth (roger@firthworks.com)
!
! Compatibility: for Inform 6.3 (Z-code and Glulx).
!
! Dependencies: none.
!
! License: The Creative Commons Attribution-ShareAlike License published at
! http://creativecommons.org/licenses/by-sa/2.0/ applies to this software.
! In summary: you must credit the original author(s); if you alter, transform,
! or build upon this software, you may distribute the SOURCE FORM of the
! resulting work only under a license identical to this one. Note that the
! ShareAlike clause does not affect the way in which you distribute the COMPILED
! FORM of works built upon this software.
! Copyright remains with the original author(s), from whom you must seek
! permission if you wish to vary any of the terms of this license.
! The author(s) would also welcome bug reports and enhancement suggestions.
!
! ------------------------------------------------------------------------------
! INSTALLATION
!
! Place this line anywhere after VerbLib.h:
!
! Constant CANTGO_SHOWROOMS; ! optional; includes destination room names
! Constant CANTGO_EXITS; ! optional; implements EXITS verb
! Include "SmartCantGo";
!
! ------------------------------------------------------------------------------
! USAGE
!
! You need do nothing more; the following room:
!
! Object Crystal_Cave "Crystal Cave"
! with description "A passage leads south...",
! s_to Narrow_Passage,
! ...;
!
! produces the message "You can go only south" if the player tries to move in
! any of the other directions.
!
! ------------------------------------------------------------------------------
! CUSTOMISATION
!
! You can define CANTGO_SHOWROOMS before Including this extension; the message
! then becomes "You can go only south (to the Narrow passage)".
!
! You can similarly define CANTGO_EXITS to provide a EXITS verb which lists the
! possible exits.
!
! You can change the default values of CANTGO_NOEXITS, CANTGO_PREFIX,
! CANTGO_SUFFIX, CANTGO_TO and CANTGO_THROUGH. Before Including this extension,
! define the appropriate constant as a string, or as a routine which prints one:
!
! Constant CANTGO_NOEXITS "Looks like there's no way out.";
!
! [ MyCANTGO_NOEXITS; "Looks like there's no way out."; ];
! Constant CANTGO_NOEXITS MyCANTGO_NOEXITS;
!
! ------------------------------------------------------------------------------
! NOTES
!
! 1. If the room is dark and hasn't been visited previously, the message is
! just "You can't go that way."
!
! 2. SmartCantGo executes direction and door_to properties which are
! routines, on the assumption that the routine will silently return
! something sensible. If your routine generates any output, you should
! test the keep_silent variable, and display nothing if it's true.
!
! 3. SmartCantGo ignores direction objects (in the Compass) which have a
! 'concealed' attribute.
!
! 4. SmartCantGo ignores direction properties which point to 'concealed'
! doors or which are strings. Therefore this code won't work quite as
! intended in the following room:
!
! Object Library "Library"
! with description
! "A small wood-panelled library. An open window to the
! west affords a stunning view of the Tuscan coastline.",
! w_to
! "Ouch! You discover that the ~window~ is really
! an incredibly lifelike mural painted on the wall.",
! ...;
!
! ------------------------------------------------------------------------------
! HISTORY
!
! Version 6.2: (Jul04) EXITS verb, optional display of destination names.
! Version 6.1: (Apr04) More internationalisation (thanks to DG).
! Version 6.0: (Feb04) Reworked for Inform 6.3. Self-initialises.
! Internationalisation (thanks to SK, FR, HH, GR).
! Version 5.0: (Feb99) Minor corrections.
! Version 4.0: (Nov98) Reworked by Roger Firth for Inform 6.
! Version 3.0: (Nov95) Original by David Wagner. All rights given away.
!
! ==============================================================================
System_file;
#Ifdef LIBRARY_VERBLIB; #Ifndef LIBRARY_GRAMMAR; ! Between VerbLib and Grammar
#Ifndef LIBRARY_VERSION;
Message fatalerror "SMARTCANTGO requires library 6/11 or later";
#Endif;
#Iftrue (LIBRARY_VERSION < 611);
Message fatalerror "SMARTCANTGO requires library 6/11 or later";
#Endif;
#Ifdef SMARTCANTGO_H;
Message warning "SMARTCANTGO already Included";
#Ifnot;
Constant SMARTCANTGO_H 62;
#Ifdef DEBUG; Message "[Including SMARTCANTGO]"; #Endif;
Object "(SmartCantGo)" LibraryExtensions
with ext_initialise [; ChangeDefault(cant_go, SmartCantGo); ];
! ==============================================================================
#Ifdef CANTGO_EXITS;
[ DirsSub; SmartCantGo(); ];
Verb meta 'dirs' 'directions' 'exits' * -> Dirs;
#ifdef LIBRARY_RUSSIAN;
Verb meta 'выходы!' 'пути!' * -> Dirs;
#endif;
#Endif; ! CANTGO_EXITS
! ------------------------------------------------------------------------------
#Ifdef LIBRARY_DUTCH;
Default CANTGO_NOEXITS "Er zijn hier geen uitgangen.";
Default CANTGO_PREFIX "U kunt alleen naar ";
Default CANTGO_TO "to ";
Default CANTGO_THROUGH "through ";
#Endif;
#Ifdef LIBRARY_FRENCH;
Default CANTGO_NOEXITS "Il n'ya a pas de sortie.";
Default CANTGO_PREFIX "Vous pouvez aller seulement vers ";
Default CANTGO_TO "to ";
Default CANTGO_THROUGH "through ";
#Ifdef CANTGO_EXITS; Verb 'sorties' 'issues' = 'dirs'; #Endif;
#Endif;
#Ifdef LIBRARY_GERMAN;
Default CANTGO_NOEXITS "Es gibt keinen Ausgang.";
Default CANTGO_PREFIX "Du kannst nur nach ";
Default CANTGO_SUFFIX " gehen.";
Default CANTGO_TO "to ";
Default CANTGO_THROUGH "through ";
#Endif;
#Ifdef LIBRARY_ITALIAN;
Default CANTGO_NOEXITS "Non ci sono uscite.";
Default CANTGO_PREFIX "Puoi andare solo a ";
Default CANTGO_TO "to ";
Default CANTGO_THROUGH "through ";
#Endif;
#Ifdef LIBRARY_RUSSIAN; ! Uses Windows Cyrillic CP 1251
Default CANTGO_NOEXITS "Отсюда не заметно ни одного выхода.";
Default CANTGO_PREFIX "Вы можете идти только ";
#Endif;
#Ifdef LIBRARY_SPANISH;
Default CANTGO_NOEXITS "No hay ninguna salida.";
Default CANTGO_PREFIX "S@'olo puedes ir hacia el ";
Default CANTGO_TO "to ";
Default CANTGO_THROUGH "through ";
#Endif;
#Ifdef LIBRARY_SWEDISH;
Default CANTGO_NOEXITS "Det finns inga utg@oangar.";
Default CANTGO_PREFIX "Du kan bara g@oa ";
Default CANTGO_TO "to ";
Default CANTGO_THROUGH "through ";
#Endif;
Default CANTGO_NOEXITS "There are no exits.";
Default CANTGO_PREFIX "You can go only ";
Default CANTGO_SUFFIX ".";
Default CANTGO_TO "to ";
Default CANTGO_THROUGH "through ";
! ------------------------------------------------------------------------------
[ SmartCantGo room dest dirObj dirCount ks;
if (location == thedark && real_location hasnt visited) return L__M(##Go, 2);
! Find what room the player is in.
room = location;
while (parent(room)) room = parent(room);
! Count the number of exits.
dirCount = 0;
ks = keep_silent; keep_silent = true;
objectloop (dirObj in compass)
if (DestIsRoomOrDoor(room.(dirObj.door_dir)) && dirObj hasnt concealed)
dirCount++;
if (dirCount == 0) {
keep_silent = ks;
return PrintOrRunVar(CANTGO_NOEXITS);
}
! Print the exits.
PrintOrRunVar(CANTGO_PREFIX, true);
objectloop (dirObj in compass) {
dest = DestIsRoomOrDoor(room.(dirObj.door_dir));
if (dest && dirObj hasnt concealed) {
LanguageDirection(dirObj.door_dir);
#Ifdef CANTGO_SHOWROOMS;
print " (";
#Ifdef LIBRARY_RUSSIAN;
if (dest has door) print "через ";
else print "в ";
print "@<<", (cAcc) dest, "@>>";
#ifnot;
if (dest has door) PrintOrRunVar(CANTGO_THROUGH, true);
else PrintOrRunVar(CANTGO_TO, true);
print (the) dest;
#endif;
print ")";
#Endif;
switch (--dirCount) {
0: keep_silent = ks;
return PrintOrRunVar(CANTGO_SUFFIX);
1: print (string) OR__TX;
default: print (string) COMMA__TX;
}
}
}
];
[ DestIsRoomOrDoor dest;
while (true) {
if (dest == false or true || dest ofclass String or Class) rfalse;
if (dest ofclass Routine) { dest = dest(); continue; }
if (dest hasnt door) break;
if (dest has concealed) rfalse;
if (dest hasnt open) break;
dest = dest.door_to();
}
return dest;
];
! ------------------------------------------------------------------------------
#Endif; ! SMARTCANTGO_H
#Endif; #Endif; ! Between VerbLib and Grammar
! ==============================================================================

941
library-glulx/English.h Normal file
View 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
View 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
View 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
View 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
View 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

File diff suppressed because it is too large Load diff

55
library-glulx/VerbLib.h Normal file
View 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
View 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

File diff suppressed because it is too large Load diff

136
library-glulx/linklpa.h Normal file
View 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
View 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

File diff suppressed because it is too large Load diff

2610
library-glulx/verblibm.h Normal file

File diff suppressed because it is too large Load diff

19
library-z/CyrDef.h Normal file
View file

@ -0,0 +1,19 @@
! ===========================================================================
!
! CyrDef.h:
! Определение Z-таблицы для кириллицы.
! (Этот файл должен быть ПЕРВЫМ, включенным в любую программу,
! использующую русский язык!)
!
! Source encoding: CP1251
!
! (c) Gayev D.G. 2003-2004
!
! ---------------------------------------------------------------------------
Zcharacter
"абвгдежзийклмнопрстуфхьэюя"
"АБВГДЕЖЗИЙКЛМНОПРСТУФХЬЭЮЯ"
"ёЁцЦчЧшШщЩыЫъЪ():;,.!?/";
Zcharacter table + @<< @>>;

941
library-z/English.h Normal file
View 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-z/Grammar.h Normal file
View 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-z/Parser.h Normal file
View 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
! ==============================================================================

986
library-z/RusMCE.h Normal file
View file

@ -0,0 +1,986 @@
! ===========================================================================
!
! RusMCE.h:
! Системный модуль для русской грамматики
! (генератор падежей, проверка глаголов, пр.)
! Source encoding: CP1251
!
! (c) Gayev D.G. 2003
!
! ---------------------------------------------------------------------------
System_file;
Constant Tlimit = 31; ! (не больше)
Array Tbuffer -> 3+TLimit;
Array Tparse -> 6;
! DL: слегка модифицированная версия для DictionaryLookup
! (из "ParserM.h")
[ DL buf len
i;
if (len == 0 || len > Tlimit) return 0;
Tbuffer->1 = len;
for (i = 0: i ~= len: i ++) Tbuffer->(2+i) = buf->i;
Tbuffer->(2+len) = 0;
Tparse->0 = 1;
@tokenise Tbuffer Tparse;
return Tparse-->1;
];
! DLx:
! как DL, но для поиска элементов словаря на 'term'
[ DLx buf len term
i;
if (len == 0 || len >= Tlimit) return 0;
Tbuffer->1 = len+1;
for (i = 0: i ~= len: i ++) Tbuffer->(2+i) = buf->i;
Tbuffer->(2+len) = term;
Tbuffer->(3+len) = 0;
Tparse->0 = 1;
@tokenise Tbuffer Tparse;
return Tparse-->1;
];
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), 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; -- 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*4+1);
len = parse->(wnum*4);
w = DLx (adr, len, '!');
if (w) return w;
for (end = len: end ~= 0: -- end) {
if (end == len || IsVerbSuffix (adr+end, len-end))
for (beg = 0: beg ~= end: ++ beg)
if (beg == 0 || IsVerbPrefix (adr, beg)) {
w = DL (adr+beg, 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, 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 = ScrLen-1;
@output_stream 3 Scratch;
print (object) obj;
@output_stream -3;
if (ucase) Scratch->2 = LtoU (Scratch->2); ! (в верхний регистр)
dlm = 0;
limit = (Scratch-->0) + 2;
for (i = 2: i ~= limit: ++ i) {
if (Scratch->i == '/') {
if (dlm == 0) {
dlm = Scratch+i;
} else {
CCaseF (obj, ocFN, csID, dlm+1, Scratch+i);
dlm = 0;
}
} else {
if (dlm ~= 0 && Scratch->i == ' ') {
CCaseF (obj, ocFN, csID, dlm+1, Scratch+i);
dlm = 0;
}
if (dlm == 0) print (char) (Scratch->i);
}
}
if (dlm ~= 0) {
CCaseF (obj, ocFN, csID, dlm+1, Scratch+i);
}
} else {
print (object) obj;
}
#endif;
];
[ CCaseF obj ocFN csID beg end disc;
disc = 0;
! (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+1 == 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;
];

969
library-z/RussiaG.h Normal file
View file

@ -0,0 +1,969 @@
! ----------------------------------------------------------------------------
!
! 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;
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;
! ==============================================================================

1210
library-z/Russian.h Normal file

File diff suppressed because it is too large Load diff

55
library-z/VerbLib.h Normal file
View 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
! ==============================================================================

18
library-z/cyrwin.cm Normal file
View file

@ -0,0 +1,18 @@
! Convert "Windows Cyrillic" (CP 1251) to ISO 8859-5
C5
0, 63, 63, 63, 63, 63, 63, 63, 63, 32, 10, 63, 10, 10, 63, 63
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111
112,113,114,115,116,117,118,119,120,121,122,123,124,125,126, 63
162,163, 44,243, 34, 46, 63, 63, 63, 63,169, 60,170,172,171,175
242, 39, 39, 34, 34, 46, 45, 45,152, 84,249, 62,250,252,251,255
32,174,254,168, 36, 63,124,253,161, 67,164, 60, 63, 45, 82,167
63, 63,166,246, 63, 63, 63, 46,241,240,244, 62,248,165,245,247
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207
208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239

1085
library-z/infix.h Normal file

File diff suppressed because it is too large Load diff

136
library-z/linklpa.h Normal file
View 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-z/linklv.h Normal file
View 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
! ==============================================================================

6517
library-z/parserm.h Normal file

File diff suppressed because it is too large Load diff

2586
library-z/verblibm.h Normal file

File diff suppressed because it is too large Load diff

2
resources/CREDITS.md Normal file
View file

@ -0,0 +1,2 @@
# Images
* [Refectory](https://commons.wikimedia.org/wiki/File:Interior_of_the_Refectory_of_the_Church_of_the_Deposition_of_the_Robe_0842.jpg) - CC-BY-SA

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

141
source.inf Normal file
View file

@ -0,0 +1,141 @@
! ============================================================================ !
! Cloak of Darkness - a simple demonstration of Interactive Fiction
! This version for Inform written by Roger Firth on 17Sep99
!
! Русский перевод: Д.Г. Гаев, 2004
! ============================================================================ !
Constant MANUAL_PRONOUNS;
Constant MAX_SCORE 2;
Constant Story "Плащ Тьмы";
Constant Headline "^Тривиальная Информ-демонстрация.^";
Include "Parser";
Include "VerbLib";
! ============================================================================ !
Object foyer "Фойе Оперного Театра"
with description
"Вы стоите в центре просторного холла,
полного роскоши и декорированного красным и золотым.
Массивные люстры ярко сияют под потолком.
На север отсюда имеется выход на улицу,
две другие двери ведут в южном и западном направлении.",
s_to bar,
w_to cloakroom,
n_to
"Вы только пришли сюда. К тому же, погода снаружи заметно ухудшается.",
has light;
Object cloakroom "Гардероб"
with description
"Когда-то на стенах этой комнаты было множество крючков,
предназначенных для одежды, но сохранился только один.
Единственный выход отсюда -- восточная дверь.",
e_to foyer,
has light;
Object hook "маленьк/ий бронзов/ый крюч/о/к/" cloakroom
with name 'маленьк' 'бронзов' 'крюк' 'крючок' 'крючк' 'вешалк',
casegen [ beg end csID;
return ICVowel (csID, beg, end, 'о', 0);
],
description [;
print "Всего лишь маленький бронзовый крючок для одежды, ";
if (self == parent(cloak)) "с которого свисает черный бархатный плащ.";
"привинченный к стене.";
],
has scenery supporter male;
Object bar "Буфет"
with description
"Театральный буфет (намного более скромный,
чем можно было предположить после роскоши фойе,
расположенного к северу отсюда) совершенно пуст.
Но похоже, что в пыли на полу написано что-то важное.",
n_to foyer,
before [;
Go:
if (self hasnt light && noun ~= n_obj) {
message.number = message.number + 2;
"Слоняться в кромешной тьме -- не самая лучшая идея.";
}
default:
if (self hasnt light) {
message.number = message.number + 1;
"В непроглядной темноте это очень трудно...";
}
],
has ~light;
Object cloak "бархатн/ый плащ/"
with name 'бархатн' 'атласн' 'черн' 'плащ',
description
"Хороший плащ (из черного бархата с атласной прокладкой),
немного промокший от дождя. Его чернота настолько глубока,
что возникает ощущение, словно он втягивает в себя весь свет
из окружающего мира.",
before [;
Drop, PutOn:
if (location == cloakroom) {
give bar light;
if (action == ##PutOn && self has general) {
give self ~general;
score++;
}
}
else
"Не самое подходящее место для того,
чтобы оставлять здесь свою одежду.";
],
after [;
Take: give bar ~light;
],
has clothing general male;
Object message "нацарапанн/ая надпис/ь" bar
with name 'нацарапанн' 'начертанн' 'надпис' 'пыл',
description [;
if (self.number < 2) {
score++;
deadflag = 2;
print "Начертанная в пыли надпись сообщает Вам, что...";
}
else {
deadflag = 3;
print "Полустертую надпись разобрать очень трудно.
С трудом можно различить такие слова...";
}
],
number 0,
has scenery female;
[ Initialise;
location = foyer;
move cloak to player;
give cloak worn;
"^^Торопливо пробираясь сквозь дождливую и холодную ноябрьскую ночь,
Вы радостно заметили неподалеку ярко горящие огни Оперного театра.^
Конечно, очень странно, что рядом не заметно ни одной живой души...
но стоит ли ждать слишком много от простенькой демонстрационной игры?..^";
];
[ DeathMessage; print "Вы проиграли"; ];
! ============================================================================ !
Include "RussiaG";
! "повесить"
Verb 'повес'
* cAcc_held 'на' cAcc_noun -> PutOn
* 'на' cAcc_noun cAcc_held -> PutOn reverse;
! ============================================================================ !