MCPcopy Create free account
hub / github.com/crawl/crawl / init_show_table

Function init_show_table

crawl-ref/source/feature.cc:152–174  ·  view source on GitHub ↗

Called at startup to perform fixups on feat_defs and fill in item_defs * and {invis,cloud}_fd. */

Source from the content-addressed store, hash-verified

150 * and {invis,cloud}_fd.
151 */
152void init_show_table()
153{
154 _init_feature_index();
155
156 for (int i = 0; i < NUM_SHOW_ITEMS; i++)
157 {
158 show_item_type si = static_cast<show_item_type>(i);
159 // SHOW_ITEM_NONE is bogus, but "invis exposed" is an ok placeholder
160 COMPILE_CHECK(DCHAR_ITEM_AMULET - DCHAR_ITEM_DETECTED + 2 == NUM_SHOW_ITEMS);
161 item_defs[si].minimap = MF_ITEM;
162 item_defs[si].dchar = static_cast<dungeon_char_type>(i
163 + DCHAR_ITEM_DETECTED - SHOW_ITEM_DETECTED);
164 _create_colours(item_defs[si]);
165 }
166
167 invis_fd.dchar = DCHAR_INVIS_EXPOSED;
168 invis_fd.minimap = MF_MONS_HOSTILE;
169 _create_colours(invis_fd);
170
171 cloud_fd.dchar = DCHAR_CLOUD;
172 cloud_fd.minimap = MF_SKIP;
173 _create_colours(cloud_fd);
174}
175
176/** Get the feature_def (not necessarily in feat_defs) for this show_type.
177 *

Callers 4

write_noise_gridMethod · 0.85
_initializeFunction · 0.85
_post_initFunction · 0.85
initialize_crawlFunction · 0.85

Calls 2

_init_feature_indexFunction · 0.85
_create_coloursFunction · 0.85

Tested by

no test coverage detected