put a non-diggable/non-phaseable boundary around the initial portion * of a level map. assumes that no level will initially put things * beyond the isok() range. * * we can't bound unconditionally on the last line with something in it, * because that something might be a niche which was already reachable, * so the boundary would be breached * * we can't bound unconditionally on one beyond
| 1438 | * that provides a window of abuse for wallified special levels |
| 1439 | */ |
| 1440 | void |
| 1441 | bound_digging(void) |
| 1442 | { |
| 1443 | coordxy x, y; |
| 1444 | coordxy xmin, xmax, ymin, ymax; |
| 1445 | |
| 1446 | if (Is_earthlevel(&u.uz)) |
| 1447 | return; /* everything diggable here */ |
| 1448 | |
| 1449 | get_level_extends(&xmin, &ymin, &xmax, &ymax); |
| 1450 | |
| 1451 | for (x = 0; x < COLNO; x++) |
| 1452 | for (y = 0; y < ROWNO; y++) |
| 1453 | if (IS_STWALL(levl[x][y].typ)) { |
| 1454 | /* undiggable walls at edges, ... */ |
| 1455 | if (y <= ymin || y >= ymax || x <= xmin || x >= xmax) |
| 1456 | levl[x][y].wall_info |= W_NONDIGGABLE; |
| 1457 | /* one tile past that, everything is also unphaseable */ |
| 1458 | if (y < ymin || y > ymax || x < xmin || x > xmax) |
| 1459 | levl[x][y].wall_info |= W_NONPASSWALL; |
| 1460 | } |
| 1461 | } |
| 1462 | |
| 1463 | void |
| 1464 | mkportal(coordxy x, coordxy y, xint16 todnum, xint16 todlevel) |
no test coverage detected