Called from mklev. Scan the level and set the wall modes. */
| 3327 | |
| 3328 | /* Called from mklev. Scan the level and set the wall modes. */ |
| 3329 | void |
| 3330 | set_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. */ |
no test coverage detected