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

Function mkinvk_check_wall

src/mklev.c:2602–2613  ·  view source on GitHub ↗

reduces clutter in mkinvokearea() while avoiding potential static analyzer confusion about using isok(x,y) to control access to levl[x][y] */

Source from the content-addressed store, hash-verified

2600/* reduces clutter in mkinvokearea() while avoiding potential static analyzer
2601 confusion about using isok(x,y) to control access to levl[x][y] */
2602staticfn int
2603mkinvk_check_wall(coordxy x, coordxy y)
2604{
2605 unsigned ltyp;
2606
2607 if (!isok(x, y))
2608 return 0;
2609 assert(x > 0 && x < COLNO);
2610 assert(y >= 0 && y < ROWNO);
2611 ltyp = levl[x][y].typ;
2612 return (IS_STWALL(ltyp) || ltyp == IRONBARS) ? 1 : 0;
2613}
2614
2615/*
2616 * The portal to Ludios is special. The entrance can only occur within a

Callers 1

mkinvokeareaFunction · 0.85

Calls 1

isokFunction · 0.85

Tested by

no test coverage detected