change map location terrain type during level creation */
| 4606 | |
| 4607 | /* change map location terrain type during level creation */ |
| 4608 | staticfn void |
| 4609 | sel_set_ter(coordxy x, coordxy y, genericptr_t arg) |
| 4610 | { |
| 4611 | terrain terr; |
| 4612 | |
| 4613 | terr = *(terrain *) arg; |
| 4614 | if (!set_levltyp_lit(x, y, terr.ter, terr.tlit)) |
| 4615 | return; |
| 4616 | /* TODO: move this below into set_levltyp? */ |
| 4617 | /* handle doors and secret doors */ |
| 4618 | if (levl[x][y].typ == SDOOR || IS_DOOR(levl[x][y].typ)) { |
| 4619 | if (levl[x][y].typ == SDOOR) |
| 4620 | levl[x][y].doormask = D_CLOSED; |
| 4621 | if (x && (IS_WALL(levl[x - 1][y].typ) || levl[x - 1][y].horizontal)) |
| 4622 | levl[x][y].horizontal = 1; |
| 4623 | } else if (levl[x][y].typ == HWALL || levl[x][y].typ == IRONBARS) { |
| 4624 | levl[x][y].horizontal = 1; |
| 4625 | } else if (splev_init_present && levl[x][y].typ == ICE) { |
| 4626 | levl[x][y].icedpool = icedpools ? ICED_POOL : ICED_MOAT; |
| 4627 | } else if (levl[x][y].typ == CLOUD) { |
| 4628 | del_engr_at(x, y); /* clouds cannot have engravings */ |
| 4629 | } |
| 4630 | } |
| 4631 | |
| 4632 | staticfn void |
| 4633 | sel_set_feature(coordxy x, coordxy y, genericptr_t arg) |
no test coverage detected