_Shade_
Special source-code edition
Copyright 2000-2002 Andrew Plotkin <erkyrath@eblong.com>
http://www.eblong.com/zarf/if.html

This is the source code for my 2000 IFComp entry.

This source code is provided for personal, educational use only. The
story and text of _Shade_ belong to me; you may not use them or create
derivative works which contain them. However, you have permission to
use the programming techniques of this game in your own works, and you
may use the source code excluding game text.

If you want to *play* _Shade_, you're in the wrong place. Go to my web
site, or the IF Archive, and download the compiled game file.
(http://www.eblong.com/zarf/ftp/shade.z5)

* Obvious Warning

This code contains spoilers! If you haven't played _Shade_, and you
read this code, you'll certainly ruin the game for yourself. Play it
first. I am releasing this code for the benefit of Inform programmers
who are familiar with _Shade_ and want to know how I did it.

* About The Source

This code is exactly the version I used to build _Shade_ release 3.
Okay, except that I converted tabs to spaces.

The lack of comments is, I'm afraid, the reader's cross to bear.

shade.inf: Main source file; includes all the others. Compile this one.
  Contains general-purpose routines, new grammar and verb routines,
  DrawStatusLine(), LibraryMessages(), ChooseObjects(), the player object, 
  etc.
shade-zone.inf: Support for the zone (sub-room) system. A base class
  for subrooms. A new ObjectIsUntouchable() routine.
shade-sand.inf: Sand objects and classes. (I had so much sand it was worth
  a separate source file.)
shade-goal.inf: The goal system -- tracks goals the player has achieved, 
  and runs appropriate code when a goal is attained. Also runs appropriate
  code when a goal becomes *possible*.
shade-room.inf: The top-level room and the minor sub-rooms (futon, desk).
  Contents thereof.
shade-nook.inf: The kitchen, bathroom, and shower. Contents thereof. Also
  water.
shade-fake.inf: The fake (reflected) apartment that appears late in the 
  game.
shade-dese.inf: The final (endgame) desert area.
library.patch: Diff of changes I made to library 6/10. See below.


* The Library

I compiled the game with a slightly modified version of the Inform
library (version 6/10).

I am not including the modified 6/10 library in this package (for
reasons both of space and of copyright), but the file "library.patch"
contains the differences.

There are, in fact, three differences:

  - If AMERICAN_COMMAS is defined (which _Shade_ does), the "and" in
object lists has a comma before it. This prevents strange list phrases
such as "my parents, Ayn Rand and God".

  - If SKIP_MAGIC_ARTICLES is defined (which _Shade_ does), the parser
does not attempt to magically infer the correct article ("a" or "an")
before objects. I don't like to rely on this feature, because it's not
supported on all interpreters, and it slows down execution in any
case. _Shade_ always uses the article property when appropriate, so
the magic feature is not necessary.

  - If USE_PARTINVENT is defined (which _Shade_ does), the list writer
supports a property "partinvent". This works more or less like
"invent", except that it works for lists when PARTINV_BIT is set
(instead of FULLINV_BIT). This lets me adjust objects in room listings
just the way "invent" lets me adjust them in inventory listings.

