NetHack Patch Database v0.27

309 patches

use_darkgray

Nameuse_darkgray v1.0
Rating80%
AuthorMichael Deutschmann
ForNetHack 3.4.3
DescriptionAdds an option use_darkgray to toggle use of dark gray color
 This patch allows black objects (orcish daggers, ravens, pits, etc.) to be represented using a dark shade of gray on some terminals. Normally, nethack shows them as blue to avoid printing unreadable black-on-black text, but this confuses them with with objects that are actually blue (cornuthaums, sapphires, soldier ants, etc.).

The patch works by specifying "black foreground" and "boldface" at the same time. On terminals that simulate bold with brighter colors, this produces a distinct color. Terminal emulators based on PC CGA/EGA/VGA textmode generally have this property.

However, on terminals that implement actual bolding -- thickening the font without changing the color, it will result in invisible text. So, the feature is not enabled by default. It must be activated with the new option "use_darkgray".

Notes:
* This patch is only effective in when TERMINFO is defined in unixconf.h

* Highlights added by the existing "use_inverse" and/or "hilite_pet" options will probably not be visible when applied to black objects.

* nethack doesn't properly follow the rules for using the tputs() function of termcap/curses. The first argument is supposed to be a string obtained from the termcap/terminfo functions. Nethack assumes it can provide a null pointer to do nothing, and can string-concatenate two codes (boldface and a color select) and use them as one. My code does not fix this -- although it uses "" instead of a null pointer, which is less likely to crash on a less permissive termcap/terminfo implementation.

* I'm aware of a seperate patch to add darkgray support -- but it was unconditional at runtime, and had to change the color numbers in includes/color.h to work. My patch makes the TTY code independent of the actual value of the CLR_* defines.

* I personally believe the correct spelling of the color involved is "grey", however I have adopted the popular misspelling "gray" throughout to be consistent with the rest of nethack. :)
Downloadftp://ftp.ocis.net/pub/users/ldeutsch/beta/nethack-3.4.3-gray-1.diff.bz2 or Get it from us (10 Kb)
AddedJune 01, 2006 20:35
ChangedFebruary 13, 2010 00:59
Submit an update to this patch

3 Comments

 DargorFebruary 14, 2010 16:35
Here is a copy http://athanatos.free.fr/OpenBSD/nh343-darkgray-option.diff

Modified to be enabled by default, with the white glyphs fix from NAO.[Quote]
 brokenFebruary 11, 2010 12:31
link. anon ftp access seems to be disabled[Quote]
4DargorJanuary 18, 2009 21:40
This patch is awesome, but may cause trouble with white glyphs. The NAO diff already had a fix for this problem, which was trivial to import.[Quote]

Add a comment

Name ()required
Rating (0 is worst, 5 is best) 
Commentrequired
You can use up to 1024 characters.
Only supported tag is [url]clickable_link[/url].

You will need to answer the following question correctly: What symbol represents a lizard?