Inform Library 6/12 and Inform 6.33.1 for Unix go beta

Thank you for this release, we shall continue to use it.

I don’t know why the constant ‘CONSTANT CLR_CURRENT 0’ is not defined in parserm.h of library 6/11 & 6/12. It is very useful with @set_colour foreground background or SetColour(fg, bg). It appears in Chapter VII §42 page 311 of the DM4 manual.

Corrections ‘Inform - Support - Patches - DM4 misprints’ have not applied to the last html version of the DM4 manual.

I do not expect the DM4 to be updated. (Either for misprints or for the 6/12 changes.) It’s a published book by Graham, it’s his voice, and I wouldn’t feel comfortable posting a version edited by someone else.

However, I’d put up a “What’s new in 6/12” addendum document if someone wrote one up.

Great! Thanks for all your work! :slight_smile:

I’m gonna attempt to adapt it to French in the next few days, so i might come back here to ask questions :wink: But this new “narrative voices” feature sounds awesome!!

I’ll prepare an all-inclusive something for what’s new in 6/12 when the bugs are all shaken out. In the meantime, you can look at github.com/DavidGriffith/inform … voices.txt.

Right now I have another problem with DROP and implicit takes doing weird illogical things. Also, someone gave me a really good justification for adding a past tense narrative voice to the Library. That’s turning out to be very simple.

I’m not familiar with the constant CLR_CURRENT. I don’t see it in 6/10 or any of the previous versions and don’t see it in the DM4. How is it supposed to be used?

CONSTANT CLR_CURRENT 0, It allows to change only one of the two parametrize (foreground, background) of @set_colour. The second is preserved.
Without library :[code]CONSTANT CLR_CURRENT 0;
Constant CLR_DEFAULT 1; Constant CLR_BLACK 2; Constant CLR_RED 3; Constant CLR_YELLOW 5; Constant CLR_BLUE 6;
[ color_ f b; @set_colour f b; ];
[ main   key;
	color_ (CLR_YELLOW, CLR_BLUE);
	print "foreground: Yellow, background: Blue^";
	color_ (CLR_RED, CLR_CURRENT);
	print "foreground: Red, background: Blue^";
	color_ (CLR_CURRENT, CLR_BLACK);
	print "foreground: Red, background: Black^";
	color_ (CLR_DEFAULT, CLR_DEFAULT);
	print "foreground: Default, background: Default^";
	@read_char 1 ->key;
];

But with library and SetColour(fg, bg), i can’t do that. I always have to define value of foreground and background.

Constant COLOR;
CONSTANT CLR_CURRENT 0;
Include "parser";  Include "verblib";
Object room "Color Room"
with
	description [;
		SetColour (CLR_YELLOW, CLR_BLUE);
		print "foreground: Yellow, background: Blue^";
		SetColour (CLR_RED, CLR_CURRENT);
		print "foreground: Red, background: Blue^";
		SetColour (CLR_CURRENT, CLR_BLACK);
		print "foreground: Red, background: Black^";
		SetColour (CLR_DEFAULT, CLR_DEFAULT);
		print "foreground: Default, background: Default^";
	],
has light;
[ initialise; clr_on = 1; location = room; ];
Include "grammar";

And if I want to use colors, I MUST SET CLR_ON TO 1 because in library it is never set, and it’s always equal to 0 !?
(Thanks to the (stupid!?) machine translator, it is hard to explain something in a language which is not his!)

Okay, I see what you mean. I’ve filed a bug report on this. See it at inform7.com/mantis/view.php?id=1377. I’ve applied the solution for Z-machine targets. For Glulx it’s trickier. It’s tricky because I don’t think I’ve ever successfully compiled an Inform6 program using color control targeting the Glulx VM. To put it bluntly, it doesn’t compile. Presumably Zarf wrote those portions of the Library dealing with Glulx color, so… Zarf, would you please take a look at the Glulx version of SetColour() and give me a hand?

Past tense sounds great! :smiley:

By the way, would there be any chance of adding a “plural/singular” flag for the narrative voice? It’d actually be better for French (and presumably Spanish and Italian too), since we have different "you"s (the plural/formal one “vous”, which is the one we use, but the informal, personal “tu”, which may create an interesting narrative voice for a game); with such a flag we could actually distinguish both and conjugate verbs correctly. It shouldn’t be too hard for English since verbs are conjugated almost the same whether it’s singular or plural, so you can probably ignore the flag most of the times in the English routines; and then that also means you can have the narratives voices “We” or “They” (like, “The members of the sect wave their hands aimlessly.” or “The Pikmin pick up the flower.”). I hope it’s not too much of a hassle for you to implement this, because it would be really interesting to be able to have both “vous” and “tu” in French.

Thanks a lot !!

The idea of a plural PC sounds interestingly weird. All the work with voices and tenses is done in english.h. For other languages, you’d be rewriting all of that to implement alternate languages. I’ll have to do some thinking on the subject to see if that’s worth the effort.

I did not write the Glulx SetColour routine. My opinion there has always been “this color model sucks and I should write a better one rather than trying to write code to make this work.”

I haven’t yet, but the opinion is still there. :confused:

I’ve wanted to do that for years, but Emily got there first with Counterfeit Monkey.

(To be clear: when I finally work up a better Glulx color model, then SetColour will still not work. It’s a thin wrapper for the Z-machine color opcode. The point is to invent a style mechanism which is not as stupid as the Z-machine’s.)

What needs to happen for SetColour() to work?

In Glulx, text color cannot be set directly. Rather, the story file can hint to the interpreter that it wants one of the predefined styles to be set to certain foreground and background colors before the text window is opened, then show the text using that style. Since there are far fewer styles than there are permutations of foreground and background color, there’s no way to make a simple SetColor function work under the current Glulx color model.

How close can we get?

Am I the only person who remembers My Angel?

Under linux, if i want to compil old game with 6/12 library, i must rename library:

parser.h to Parser.h verblib.h to VerbLib.h grammar. h to Grammar.h english.h to English.hYou say in CHANGES-6.12.txt :

[code]Include “Parser”; Include “VerbLib”;

Object room “Room” with description “You’re in a room”, has light;

Object sack “sack”
with name ‘sack’,
has container openable ~open transparent;

Object apple “apple” sack
with name ‘apple’;

[ Initialise;
no_implicit_actions = true;
move sack to player;
location = room;
];
Include “Grammar”;[/code]

I can drop the apple !

There’s an ongoing problem with DROP and implicit actions reacting poorly. See inform7.com/mantis/view.php?id=1375.

O.K. Thanks. In DM4 p56 & p70:
“Some special properties, known as ‘‘common properties’’, can have their values read (but not changed) even for an object which doesn’t provide them. All of the properties built into the Inform library are common properties. See §3.14.”
“you can read a common property for any Object, but you can only write to it if you’ve written it into the object’s declaration yourself.”
I can use RunRoutines () to call a common property who’s not in object and not define with NULL.
But I can’t use PrintOrRun () who call RunRoutines () to call the same common property.

!Zcode
!From parserm.h: -------------------------------------------------------------
[ RunTimeError n p1 p2;
    "*** Library error ", n, " (", p1, ",", p2, ") ***";
];
[ RunRoutines obj prop;
    print "O.K.^";
   ! if (obj == thedark && prop ~= initial or short_name or description) obj = real_location;
    if (obj.&prop == 0 && prop >= INDIV_PROP_START) rfalse;
    return obj.prop();
];
[ PrintOrRun obj prop flag;
    if (obj.#prop > WORDSIZE) return RunRoutines(obj,prop);
    if (obj.prop == NULL) rfalse;
    switch (metaclass(obj.prop)) {
      Class, Object, nothing:
        return RunTimeError(2,obj,prop);
      String:
        print (string) obj.prop;
        if (flag == 0) new_line;
        rtrue;
      Routine:
        return RunRoutines(obj,prop);
    }
];
! ------------------------------------------------------------------------------
Constant NULL = $ffff;
Constant INDIV_PROP_START 64; 
! Common property:
property prop1;
property prop2 NULL;
Object obj;
[ main   key;
	RunRoutines (obj, prop1);! Without NULL: O.K.
	PrintOrRun  (obj, prop1);! Without NULL: *** Library error 2 (5,4) ***
	RunRoutines (obj, prop2);! With NULL: O.K.
	PrintOrRun  (obj, prop2);! With NULL: rfalse.
        @read_char 1 ->key;	
];

I’m not sure what you’re saying

Me either, sorry.
I can call directly RunRoutines (obj, prop), but i can’t call RunRoutines (obj, prop) via PrintOrRun(obj, prop).
It does not matter, thank you.

In library 6/12 (parserm.h), use of LanguageCommand is not documented anywhere.

[ PrintCommand from i k spacing_flag;
    #Ifdef LanguageCommand;
    LanguageCommand(from);
    i = k = spacing_flag = 0;   ! suppress warning
    #Ifnot;
    [...]
    #Endif; ! LanguageCommand
];

Can i use it ?