Part 5 - Fancy Screen Effects
Section 1 - Improved Status Line
[This status line is designed to help the player track his exploration through the game: rooms that aren't explored yet are highlighted in red, and a count of explored rooms is kept in the lower left corner. We add the further refinement that, if the player is in a dark room, the compass line shows only exits which lead to lit rooms, on the assumption that he will be able to see lighted exits but not dark ones.]
Include Basic Screen Effects by Emily Short. [1]
To turn screen black:
say white letters;
turn the background black;
clear the screen;
leave space;
To turn screen white:
turn the background white;
say black letters;
clear the screen;
leave space.
To leave space:
say paragraph break;
say paragraph break;
say paragraph break;
say paragraph break.
Table of Fancy Status
| left | central | right |
| " [if in darkness]Darkness[otherwise][location][end if]" | "" | "[top rose]" |
| " [regional area]" | "" | "[middle rose]" |
| " Rooms searched: [number of rooms which are visited]/[number of rooms]" | "" | "[bottom rose]" |
To say red reverse:
turn the background red.
To say black reverse:
turn the background black.
To say white reverse:
turn the background white.
Definition: a room is discernible:
if it is the Dank Room and the trapdoor is scenery, no;
if it is lit, yes;
if it is the ultimate location of the candle, yes;
if in darkness, no;
yes.
To say top rose:
let place be the room up from the location;
if the place is a discernible room, say "[if the place is unvisited][red reverse][end if]U [default letters]"; otherwise say " "; [2]
let place be the room northwest from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if]NW[default letters]"; otherwise say " ";
let place be the room north from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if] N [default letters]"; otherwise say " ";
let place be the room northeast from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if]NE[default letters]"; otherwise say " ".
To say middle rose:
say " ";
let place be the room west from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if]W [default letters]"; otherwise say " ";
say " . ";
let place be the room east from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if] E[default letters]"; otherwise say " ".
To say bottom rose:
let place be the room down from the location;
if the place is a discernible room, say "[if the place is unvisited][red reverse][end if]D [default letters]"; otherwise say " ";
let place be the room southwest from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if]SW[default letters]"; otherwise say " ";
let place be the room south from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if] S [default letters]"; otherwise say " ";
let place be the room southeast from the location;
if place is a discernible room, say "[if the place is unvisited][red reverse][end if]SE[default letters]"; otherwise say " ".
Rule for constructing the status line:
fill status bar with Table of Fancy Status;
say default letters;
rule succeeds.
Notes
[1]. An extension that provides phrases for changing text colors, modifying the status line more fully, pausing the game, and so on.
[2]. Originally I assumed that everyone would be using a white-letters-on-black status bar, and set the lettering to black and white after printing the first letter. This was a mistake, as many people on Windows Frotz have a default color scheme that makes the status bar blue-on-white -- so of course the white lettering on a white background didn't show at all. Moral: never ever make assumptions about the color scheme used by your audience.