do a post-level-creation cleanup of map, such as removing boulders and traps from lava */
| 325 | /* do a post-level-creation cleanup of map, such as |
| 326 | removing boulders and traps from lava */ |
| 327 | staticfn void |
| 328 | map_cleanup(void) |
| 329 | { |
| 330 | struct obj *otmp; |
| 331 | struct trap *ttmp; |
| 332 | struct engr *etmp; |
| 333 | coordxy x, y; |
| 334 | |
| 335 | for (x = 0; x < COLNO; x++) |
| 336 | for (y = 0; y < ROWNO; y++) { |
| 337 | schar typ = levl[x][y].typ; |
| 338 | |
| 339 | if (IS_LAVA(typ) || IS_POOL(typ)) { |
| 340 | /* in case any boulders are on liquid, delete them */ |
| 341 | while ((otmp = sobj_at(BOULDER, x, y)) != 0) { |
| 342 | obj_extract_self(otmp); |
| 343 | obfree(otmp, (struct obj *) 0); |
| 344 | } |
| 345 | |
| 346 | /* traps on liquid? */ |
| 347 | if (((ttmp = t_at(x, y)) != 0) |
| 348 | && !undestroyable_trap(ttmp->ttyp)) |
| 349 | deltrap(ttmp); |
| 350 | |
| 351 | /* engravings? */ |
| 352 | if ((etmp = engr_at(x, y)) != 0) |
| 353 | del_engr(etmp); |
| 354 | } |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | staticfn void |
| 359 | lvlfill_maze_grid(int x1, int y1, int x2, int y2, schar filling) |