Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Lighting effects: torch/line of sight/permanently-lit #281
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:
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).
I like what this patch does but I don't want to introduce new lighting this close to a release. Could you edit the patch so that we get the same lighting behaviour for text mode as we have now, while still fixing the graphics problem? We can have arguments over colours in the future!