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

Function match_maptyps

src/sp_lev.c:216–224  ·  view source on GitHub ↗

Does typ match with levl[][].typ, considering special types MATCH_WALL and MAX_TYPE (aka transparency)? */

Source from the content-addressed store, hash-verified

214/* Does typ match with levl[][].typ, considering special types
215 MATCH_WALL and MAX_TYPE (aka transparency)? */
216boolean
217match_maptyps(xint16 typ, xint16 levltyp)
218{
219 if ((typ == MATCH_WALL) && !IS_STWALL(levltyp))
220 return FALSE;
221 if ((typ < MAX_TYPE) && (typ != levltyp))
222 return FALSE;
223 return TRUE;
224}
225
226struct mapfragment *
227mapfrag_fromstr(char *str)

Callers 2

selection_filter_mapcharFunction · 0.85
mapfrag_matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected