angband/angband — pull request #281 by dawnmist (2013-11-01 06:32:47+00:00)
Title: Lighting effects: torch/line of sight/permanently-lit

Issue: Angband had 3 lighting states (bright, lit and dark), and 4 lighting categories (line of sight, torchlight, permanently lit, and dark).

This resulted in some oddities in the graphics tiles used to represent things like lit rooms, and visibility into those rooms when standing in a corridor.

After discussion on irc in #angband-dev, it was suggested that the cleanest way to "fix" the issue without breaking the ascii display would be to change the lighting states to match the categories.

The final suggestion was:
* yellow for torchlight,
* light blue for permalight (lit rooms where the squares are not in los)
* white for in-LOS
* grey for dark

This pull request has the lighting adjusted, the feature knowledge menu updated to handle the 4th category, pref file handling updated to handle the new torch/los settings, and the graphics pref files updated to use what they had been using for "bright" for torch/los (and fixes a couple of tile definition errors in the 8x8 tiles).

Additional work possible (not done here, but able to be done): floor lighting states now fully map to settings that can be controlled via a pref file - the "white floor tinting" code in cave.c:460-467 can now be entirely replaced by pref file settings. I just wasn't sure which pref files needed updating for those. They are currently updatable through the knowledge-feature menu, so if people don't like the light-blue for perma-lit floors they can replace it with any colour except white (because white will trigger the current cave.c override).