For this kind of world-spanning options, I would recommend using global flags. For instance, you could create a predicate for asking the player what kind of emphasis they prefer:
Code:
(ask about emphasis)
Would you prefer BOLD, ITALIC, or NO emphasis? > (get input $Words)
(if) ($Words = [bold]) (then)
(now) (bold emphasis)
(elseif) ($Words = [italic]) (then)
(now) (italic emphasis)
(elseif) ~($Words = [no]) (then)
Please type one of the words! (line)
(ask about emphasis)
(endif)
The above code implies that '(bold emphasis)' and '(italic emphasis)' are global flags, that can be set or cleared using '(now)' syntax. You'd call that routine from the game intro, and then you'd define an '(emph)' predicate for enabling the player-selected style. Here's what the rest of the program might look like:
Code:
(intro)
Before we begin, please answer this question:
(par)
(ask about emphasis)
(par)
An (emph) excellent choice (roman)!
(emph)
(if) (bold emphasis) (then)
(bold)
(elseif) (italic emphasis) (then)
(italic)
(endif)
(descr #me)
As (emph) good looking (roman) as ever.
(current player #me)
(#me is #in #room)
(room #room)
Now, under the hood, the compiler will map these global flags to individual bits in some register. So while you are using high-level symbolic predicate names, the compiled code will be using bitwise-and and bitwise-or (and the z-machine 'TEST' instruction) to check and modify the flags.
If you test several flags in the same condition, e.g.
Code:
(if) (first flag) (second flag) (then) ... (endif)
or
Code:
(if) (first flag) (or) (second flag) (then) ... (endif)
then, currently, the compiler isn't smart enough to combine it all into a single check. But such an optimization could be added in the future, if it turns out to have a measurable impact on performance.