return item worn in slot indicated by wornmask; needed by poly_obj() */
| 203 | |
| 204 | /* return item worn in slot indicated by wornmask; needed by poly_obj() */ |
| 205 | struct obj * |
| 206 | wearmask_to_obj(long wornmask) |
| 207 | { |
| 208 | const struct worn *wp; |
| 209 | |
| 210 | for (wp = worn; wp->w_mask; wp++) |
| 211 | if (wp->w_mask & wornmask) |
| 212 | return *wp->w_obj; |
| 213 | return (struct obj *) 0; |
| 214 | } |
| 215 | |
| 216 | /* convert an armor wornmask to corresponding category */ |
| 217 | int |
no outgoing calls
no test coverage detected