Bronze — 45 of 46

Emily Short

Release 13

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 Flexible Windows by Jon Ingold.

Table of User Styles (continued)

windowstyle namebackground color
all-grid-windowsspecial-style-1"#FF0000"

Table of Fancy Status

leftcentralright
" [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:

say special-style-1;

To say default letters:

say roman type;

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 " "; [1]

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.

Note

[1]. 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.