Print all child branches between the lower and upper bounds. */
| 2260 | |
| 2261 | /* Print all child branches between the lower and upper bounds. */ |
| 2262 | staticfn void |
| 2263 | print_branch( |
| 2264 | winid win, |
| 2265 | int dnum, int lower_bound, int upper_bound, |
| 2266 | boolean bymenu, struct lchoice *lchoices_p) |
| 2267 | { |
| 2268 | branch *br; |
| 2269 | char buf[BUFSZ]; |
| 2270 | |
| 2271 | /* This assumes that end1 is the "parent". */ |
| 2272 | for (br = svb.branches; br; br = br->next) { |
| 2273 | if (br->end1.dnum == dnum && lower_bound < br->end1.dlevel |
| 2274 | && br->end1.dlevel <= upper_bound) { |
| 2275 | Sprintf(buf, "%c %s to %s: %d", |
| 2276 | bymenu ? chr_u_on_lvl(&br->end1) : ' ', |
| 2277 | br_string(br->type), |
| 2278 | svd.dungeons[br->end2.dnum].dname, depth(&br->end1)); |
| 2279 | if (bymenu) |
| 2280 | tport_menu(win, buf, lchoices_p, &br->end1, |
| 2281 | unreachable_level(&br->end1, FALSE)); |
| 2282 | else |
| 2283 | putstr(win, 0, buf); |
| 2284 | } |
| 2285 | } |
| 2286 | } |
| 2287 | |
| 2288 | /* Print available dungeon information. */ |
| 2289 | schar |
no test coverage detected