BUG: this lets you look at cockatrice corpses while blind without touching them */ much simpler version of the look-here code; used by query_classes() */
| 73 | touching them */ |
| 74 | /* much simpler version of the look-here code; used by query_classes() */ |
| 75 | staticfn void |
| 76 | simple_look(struct obj *otmp, /* list of objects */ |
| 77 | boolean here) /* flag for type of obj list linkage */ |
| 78 | { |
| 79 | /* Neither of the first two cases is expected to happen, since |
| 80 | * we're only called after multiple classes of objects have been |
| 81 | * detected, hence multiple objects must be present. |
| 82 | */ |
| 83 | if (!otmp) { |
| 84 | impossible("simple_look(null)"); |
| 85 | } else if (!(here ? otmp->nexthere : otmp->nobj)) { |
| 86 | pline1(doname(otmp)); |
| 87 | } else { |
| 88 | winid tmpwin = create_nhwindow(NHW_MENU); |
| 89 | |
| 90 | putstr(tmpwin, 0, ""); |
| 91 | do { |
| 92 | putstr(tmpwin, 0, doname(otmp)); |
| 93 | otmp = here ? otmp->nexthere : otmp->nobj; |
| 94 | } while (otmp); |
| 95 | display_nhwindow(tmpwin, TRUE); |
| 96 | destroy_nhwindow(tmpwin); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | int |
| 101 | collect_obj_classes(char ilets[], struct obj *otmp, boolean here, |
no test coverage detected