German
version 3/111222 by Team GerX
Section - Printing
Include (-
[ print_yourself k;
switch (k) {
0: print "@20";
1: print "@26";
2: print "@21";
3: print "@22";
}
rtrue;
];
-) before "Object Names I" in "Printing.i6t".
Include (-
[ SetLowStrings k g;
! Endungen für Substantive: @01 bis @04
if (k==Dat || (g==1 && k~=Nom))
string 1 "n"; else string 1 "";
if (k~=Nom) string 2 "en"; else string 2 "";
if (k==Gen) { string 3 "s"; string 4 "es"; }
else { string 3 ""; string 4 ""; }
! Endungen für Adjektive: @00
if (indef_mode==0) {
switch(k*4 + g) {
1, 2, 3, 14, 15: string 0 "e";
default: string 0 "en";
}
} else if (indef_mode==1){
switch(k*4 + g) {
0, 2, 12, 14: string 0 "e";
1, 4: string 0 "er";
3, 15: string 0 "es";
default: string 0 "en";
}
} else {
switch(k*4 + g) {
0, 2, 12, 14: string 0 "e";
1, 4, 6, 10: string 0 "er";
3, 15: string 0 "es";
9, 11: string 0 "em";
default: string 0 "en";
}
}
];
! WriteListFromCase o style case depth old_case old_indef;
[ WriteListFromCase o style case depth no_action iter old_case old_indef;
! Das ISARE_BIT ist nur sinnvoll, wenn man die Liste im Nominativ
! ausgibt, daher wird die Liste im Nominativ ausgegeben.
if (case ~= Nom && style & ISARE_BIT) case = Nom;
old_case = short_name_case; ! Alten Fall merken. (In ListWriteR gab es keine
short_name_case = case; ! freien lokalen Var. mehr, um case zu übergeben.)
old_indef = indef_mode;
if (style & DEFART_BIT) indef_mode = 0;
else if (style & NOARTICLE_BIT) indef_mode = -1;
else indef_mode = 1;
#ifdef NO_NESTED_LISTS;
if (~~ignore_append_bit) {
if ((style & RECURSE_BIT) && (style & ENGLISH_BIT)) style = style | APPEND_BIT;
}
#endif;
WriteListFrom(o, style, depth, no_action, iter);
short_name_case = old_case;
indef_mode = old_indef;
];
#ifdef NO_NESTED_LISTS;
[ WriteSublists first force_line_break o n ld;
! In der Liste gespeicherte Objekte noch abarbeiten.
while (list_buffer-->0) {
o = list_buffer-->(list_buffer-->0);
ld = list_depth-->(list_buffer-->0);
!*** 1: write the sublists;
! 2: write the sublists with line break;
! 3: write the sublists with paragraph break;
! 4: write the sublists with space;
!
! Innerhalb einer Listenebene wird zwischen den Unterlisten
! ein Leerzeichen oder ein Absatz geschrieben, je nachdem, ob
! "Use non-nested lists" oder "Use non-nested lists with separate
! paragraphs" gewählt wurde.
switch (first) {
1: print "";
2: print "^";
3: print "^^";
4: print " ";
default:
if (ld && NO_NESTED_LISTS == 0) print " ";
else print "^^";
}
(list_buffer-->0)--;
L__M(##Look, -2, o);
n++;
}
if (force_line_break && n==0) print "^";
return n;
];
#ifnot;
[ WriteSublists; rfalse; ];
#Endif;
[ PrefaceByArticle o acode pluralise capitalise g s;
SetPreviouslyNamedNoun(o);
! acode ist die von Inform vorgesehene Art des Artikels
! 0 "The ", 1 "the ", 2, "a(n) ". Das dieses System in deform
! abgeschafft ist, müssen wir uns was anderes überlegen.
!
! capitalise gibt an, ob das Gedruckte groß geschrieben werden
! soll. Das wird in deform direkt in GDer() usw. festgelegt,
! diese Flagge wird also hier ignoriert.
if (pluralise) {
SetLowStrings(short_name_case, 0);
if (acode < 2) {
! Modus ist 0 (best. artikel) und Genus ist auch 0 (Plural)
s = LanguageArticles-->(short_name_case*4);
if (capitalise) print (Cap) s;
else print (string) s;
print " ";
}
! *** Die Anzahl wird in PRINTING_A_NUMBER_OF_ACT/
! "Rule for printing a number of something"
! in |WriteSingleClassGroup| ausgegeben. Dort wird nun
! auch über die Großschreibung entschieden.
} else {
if (indef_mode >= 0) {
g = Gender(o);
s = LanguageArticles-->(indef_mode*16 + short_name_case*4 + g);
if (s) {
if (capitalise) print (Cap) s;
else print (string) s;
print " ";
}
}
print (PSN__) o;
}
capitalise = 0;
];
-) instead of "Object Names II" in "Printing.i6t".
Include (-
[ IndefArt obj k i g art;
if (obj == 0) return PrintNothing(k);
SetPreviouslyNamedNoun(obj);
i = indef_mode; indef_mode = true;
g = Gender(obj);
short_name_case = k;
SetLowStrings(k, g);
if (obj has proper) { indef_mode = NULL; print (PSN__) obj; indef_mode = i; return; }
! *** Um zu verhindern, dass die Property "article"
! doppelt vergeben wird, was zu einem Compiler-Fehler führt,
! werden die speziellen unbestimmten Artikel "definite", "yours" und
! "no article" in der Property sepecial_article definiert und
! nicht wie zuvor ebenfalls in article (in I7 kann eine Eigenschaft
! nur von einem einzigen Typ sein).
! Der "special indefinite article" dominiert einen möglicherweise
! vorhandenen "indefinite article".
if ((obj provides article) && (obj.article ~= EMPTY_TEXT_VALUE)) art = obj.article;
if ((obj provides special_article) && (obj.special_article ~= pending))
art = obj.special_article;
if (art) {
if (art == definite) {
return DefArt(obj, k);
} else if (art == yours) {
!*** Die Low-Strings für die Ausgabe des Plurals mit "dein" anpassen.
! Flektiert wird wie beim bestimmten Artikel:
! "nervige Nachbarn" vs. "deine nervigen Nachbarn"
if (obj has pluralname) {
indef_mode = false;
SetLowStrings(k, g);
}
print "@23",
(string) LanguageSuffixes-->(possessive_suffix_base + 4*k + g),
" ", (PSN__) obj; indef_mode = i; return;
} else if (art ~= no_article) {
PrintOrRun(obj, article, 1); print " ";
} else {
indef_mode = -1;
SetLowStrings(k, g);
}
print (PSN__) obj; indef_mode = i; return;
}
PrefaceByArticle(obj, 2); indef_mode = i;
];
[ CIndefArt obj k;
if (obj == 0) return PrintNothing(k, CFIRSTART_BIT);
RunCapitalised(IndefArt, obj, k);
];
[ DefArt obj k i g;
if (obj == 0) return PrintNothing(k);
SetPreviouslyNamedNoun(obj);
i = indef_mode; indef_mode = false;
!*** (30.11.2011) Adjektive in Proper-Objekten werden im "bare mode" dekliniert,
! wie z.B. in "Bernds kleines Auto"
if (obj has proper) indef_mode = -1;
g = Gender(obj);
short_name_case = k;
SetLowStrings(k, g);
if ((~~obj ofclass Object) || obj has proper) {
indef_mode = NULL; print (PSN__) obj; indef_mode = i;
return;
}
PrefaceByArticle(obj, 1); indef_mode = i;
];
[ CDefArt obj k;
if (obj == 0) return PrintNothing(k, CFIRSTART_BIT);
RunCapitalised(Defart, obj, k);
];
[ PrintShortName obj i;
i = indef_mode; indef_mode = NULL;
PSN__(obj); indef_mode = i;
];
[ WithoutArt obj k mode i g;
SetPreviouslyNamedNoun(obj);
i = indef_mode;
! *** AUFGEBOHRT:
! Default ist indef_mode = -1; mode kann dazu verwendet werden,
! den bestimmten oder unbestimmten Modus zu setzen
! (1: bestimmt, 2: unbestimmt). Damit erhält man
! die Form wie mit bestimmtem/unbestimmten Artikel, nur eben ohne
! den dazugehörigen Artikel.
! Das wird z.B. bei den Say-Phrasen "[<Objekt> bestimmt im <Kasus>]",
! "[<Objekt> unbestimmt im <Kasus>]" usw. benutzt.
indef_mode = mode - 1;
g = Gender(obj);
short_name_case = k;
SetLowStrings(k, g);
if ((~~obj ofclass Object) || obj has proper) {
indef_mode = NULL; print (PSN__) obj; indef_mode = i;
return;
}
if (indef_mode >= 0) { print (PSN__) obj; indef_mode = i; return; }
PrefaceByArticle(obj, 1); indef_mode = i;
];
[ NegativeArt obj k;
print (string) LanguageArticles-->(neg_article_base + 4*k + Gender(obj)), " ";
! *** Hier wird jetzt der Objektname in der
! unbestimmten Form (mode 2) mit ausgegeben
WithoutArt(obj, k, 2);
];
[ PersonalPron obj k;
SetPreviouslyNamedNoun(obj);
print (string) PersonalPronouns-->(4*k + Gender(obj, true));
];
[ RunCapitalised a b c i length;
! Wie PrintCapitalised, nur für Routinen, so dass die Ausgabe von
! a(b, c) am Anfang groß geschrieben wird.
if (~~(a ofclass Routine)) return;
VM_PrintToBuffer(StorageForShortName, 160, a, b, c);
StorageForShortName->WORDSIZE = VM_LowerToUpperCase(StorageForShortName->WORDSIZE);
length = StorageForShortName-->0;
for (i=WORDSIZE: i<length+WORDSIZE: i++) print (char) StorageForShortName->i;
];
-) instead of "Object Names III" in "Printing.i6t".
Include (-
Global caps_mode = false;
[ STANDARD_NAME_PRINTING_R obj;
obj = parameter_object;
if (obj == 0) return PrintNothing();
switch (metaclass(obj)) {
Routine: print "<routine ", obj, ">"; return;
String: print "<string ~", (string) obj, "~>"; return;
nothing: print "<illegal object number ", obj, ">"; return;
}
SetPreviouslyNamedNoun(obj); ! *** obj als "zuvor genanntes Objekt" merken
if (obj == player) return print_yourself(short_name_case);
#Ifdef LanguagePrintShortName;
if (LanguagePrintShortName(obj)) return;
#Endif; ! LanguagePrintShortName
if (indef_mode && obj.&short_name_indef ~= 0 &&
PrintOrRun(obj, short_name_indef, true) ~= 0) return;
if (caps_mode &&
obj.&cap_short_name ~= 0 && PrintOrRun(obj, cap_short_name, true) ~= 0) {
caps_mode = false;
return;
}
if (obj.&short_name ~= 0 && PrintOrRun(obj, short_name, true) ~= 0) return;
print (object) obj;
];
-) instead of "Standard Name Printing Rule" in "Printing.i6t".
Include (-
! *** Eine deutsche Default-Headline (Original-Code von Martin Oehm)
! und ein Default-Titel (CB)
Constant GERMAN_HEADLINE "Ein Textadventure";
Constant GERMAN_STORY "Willkommen";
Array HLAuxBuffer1 buffer 128;
Array HLAuxBuffer2 buffer 24;
[ __Print_Headline l1 l2 i;
VM_PrintToBuffer(HLAuxBuffer1, 128, Headline);
VM_PrintToBuffer(HLAuxBuffer2, 24,
"An Interactive Fiction");
l1 = HLAuxBuffer1-->0;
l2 = HLAuxBuffer2-->0;
if (l1 ~= l2) {
print (string) Headline;
return;
}
for (i = 0 : i < l1 : i++) {
if (HLAuxBuffer1->(i + WORDSIZE) ~= HLAuxBuffer2->(i + WORDSIZE)) {
print (string) Headline;
return;
}
}
print (string) GERMAN_HEADLINE;
];
[ __Print_Story l1 l2 i;
VM_PrintToBuffer(HLAuxBuffer1, 128, Story);
VM_PrintToBuffer(HLAuxBuffer2, 24, "Welcome");
l1 = HLAuxBuffer1-->0;
l2 = HLAuxBuffer2-->0;
if (l1 ~= l2) {
print (string) Story;
return;
}
for (i = 0 : i < l1 : i++) {
if (HLAuxBuffer1->(i + WORDSIZE) ~= HLAuxBuffer2->(i + WORDSIZE)) {
print (string) Story;
return;
}
}
print (string) GERMAN_STORY;
];
[ Banner;
BeginActivity(PRINTING_BANNER_TEXT_ACT);
if (ForActivity(PRINTING_BANNER_TEXT_ACT) == false) {
VM_Style(HEADER_VMSTY);
!print (string) Story;
__Print_Story();
VM_Style(NORMAL_VMSTY);
new_line;
!print (string) Headline;
__Print_Headline();
#ifdef Story_Author;
#ifdef NEW_LINE_BEFORE_AUTHOR;
new_line;
#ifnot;
print " ";
#endif; ! NEW_LINE_BEFORE_AUTHOR
print "von ", (string) Story_Author;
#endif; ! Story_Author
new_line;
VM_Describe_Release();
print " / Inform 7 build ", (string) NI_BUILD_COUNT, " ";
print "(I6/v"; inversion;
print " lib ", (string) LibRelease, ") ";
#Ifdef STRICT_MODE;
print "S";
#Endif; ! STRICT_MODE
#Ifdef DEBUG;
print "D";
#Endif; ! DEBUG
new_line;
}
EndActivity(PRINTING_BANNER_TEXT_ACT);
];
-) instead of "Banner" in "Printing.i6t"