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

Function set_wall_state

src/display.c:3329–3354  ·  view source on GitHub ↗

Called from mklev. Scan the level and set the wall modes. */

Source from the content-addressed store, hash-verified

3327
3328/* Called from mklev. Scan the level and set the wall modes. */
3329void
3330set_wall_state(void)
3331{
3332 coordxy x, y;
3333
3334#ifdef WA_VERBOSE
3335 for (x = 0; x < MAX_TYPE; x++)
3336 bad_count[x] = 0;
3337#endif
3338
3339 for (x = 0; x < COLNO; x++)
3340 for (y = 0; y < ROWNO; y++)
3341 xy_set_wall_state(x, y);
3342
3343#ifdef WA_VERBOSE
3344 /* check if any bad positions found */
3345 for (x = y = 0; x < MAX_TYPE; x++)
3346 if (bad_count[x]) {
3347 if (y == 0) {
3348 y = 1; /* only prcoordxy once */
3349 pline("set_wall_type: wall mode problems with: ");
3350 }
3351 pline("%s %d;", type_names[x], bad_count[x]);
3352 }
3353#endif /* WA_VERBOSE */
3354}
3355
3356/* ------------------------------------------------------------------------ */
3357/* This matrix is used here and in vision.c. */

Callers 2

level_finalize_topologyFunction · 0.85
flip_levelFunction · 0.85

Calls 2

xy_set_wall_stateFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected