Create a headstone at the given location. * The caller is responsible for newsym(x, y). */
| 1684 | * The caller is responsible for newsym(x, y). |
| 1685 | */ |
| 1686 | void |
| 1687 | make_grave(coordxy x, coordxy y, const char *str) |
| 1688 | { |
| 1689 | char buf[BUFSZ]; |
| 1690 | |
| 1691 | /* Can we put a grave here? */ |
| 1692 | if ((levl[x][y].typ != ROOM && levl[x][y].typ != GRAVE) || t_at(x, y)) |
| 1693 | return; |
| 1694 | /* Make the grave */ |
| 1695 | if (!set_levltyp(x, y, GRAVE)) |
| 1696 | return; |
| 1697 | /* Engrave the headstone */ |
| 1698 | del_engr_at(x, y); |
| 1699 | if (!str) |
| 1700 | str = get_rnd_text(EPITAPHFILE, buf, rn2, MD_PAD_RUMORS); |
| 1701 | make_engr_at(x, y, str, NULL, 0L, HEADSTONE); |
| 1702 | return; |
| 1703 | } |
| 1704 | |
| 1705 | /* called when kicking or engraving on a grave's headstone */ |
| 1706 | void |
no test coverage detected