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

Function check_pos

src/display.c:3129–3141  ·  view source on GitHub ↗

* Return 'which' if position is implies an unfinished exterior. Return * zero otherwise. Unfinished implies outer area is rock or a corridor. * * Things that are ambiguous: lava */

Source from the content-addressed store, hash-verified

3127 * Things that are ambiguous: lava
3128 */
3129staticfn int
3130check_pos(coordxy x, coordxy y, int which)
3131{
3132 int type;
3133
3134 if (!isok(x, y))
3135 return which;
3136 type = levl[x][y].typ;
3137 /* Everything below POOL, excluding TREE */
3138 if (IS_STWALL(type) || type == CORR || type == SCORR || IS_SDOOR(type))
3139 return which;
3140 return 0;
3141}
3142
3143/* Return TRUE if more than one is non-zero. */
3144/*ARGSUSED*/

Callers 4

row_refreshFunction · 0.85
set_wallFunction · 0.85
set_cornFunction · 0.85
set_crosswallFunction · 0.85

Calls 1

isokFunction · 0.85

Tested by

no test coverage detected