| 221 | } |
| 222 | |
| 223 | staticfn char * |
| 224 | hawaiian_design(struct obj *shirt, char *buf) |
| 225 | { |
| 226 | static const char *const hawaiian_bgs[] = { |
| 227 | /* solid colors */ |
| 228 | "purple", |
| 229 | "yellow", |
| 230 | "red", |
| 231 | "blue", |
| 232 | "orange", |
| 233 | "black", |
| 234 | "green", |
| 235 | /* adjectives */ |
| 236 | "abstract", |
| 237 | "geometric", |
| 238 | "patterned", |
| 239 | "naturalistic", |
| 240 | }; |
| 241 | |
| 242 | /* This hash method is slightly different than the one in hawaiian_motif; |
| 243 | using the same formula in both cases may lead to some shirt combos |
| 244 | never appearing, if the sizes of the two lists have common factors. */ |
| 245 | unsigned bg = shirt->o_id ^ (unsigned) ~ubirthday; |
| 246 | |
| 247 | Sprintf(buf, "%s on %s background", |
| 248 | makeplural(hawaiian_motif(shirt, buf)), |
| 249 | an(hawaiian_bgs[bg % SIZE(hawaiian_bgs)])); |
| 250 | return buf; |
| 251 | } |
| 252 | |
| 253 | char * |
| 254 | apron_text(struct obj *apron, char *buf) |
no test coverage detected