MCPcopy Create free account
hub / github.com/NetHack/NetHack / set_map_customcolor

Function set_map_customcolor

src/coloratt.c:867–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865}
866
867int
868set_map_customcolor(glyph_map *gmap, uint32 nhcolor)
869{
870 glyph_map *tmpgm = gmap;
871 uint32 closecolor = 0;
872 uint16 clridx = 0;
873
874 if (!tmpgm)
875 return 0;
876
877 gmap->customcolor = nhcolor;
878 if (closest_color(nhcolor, &closecolor, &clridx))
879 gmap->color256idx = clridx;
880 else
881 gmap->color256idx = 0;
882 return 1;
883}
884
885static struct {
886 int index;

Callers 1

apply_customizationsFunction · 0.85

Calls 1

closest_colorFunction · 0.85

Tested by

no test coverage detected