short shop description */
| 3438 | |
| 3439 | /* short shop description */ |
| 3440 | staticfn const char * |
| 3441 | shop_string(int rtype) |
| 3442 | { |
| 3443 | extern const struct shclass shtypes[]; /* defined in shknam.c */ |
| 3444 | int shoptype = rtype - SHOPBASE; /* convert room type to shop type */ |
| 3445 | const char *str = "shop?"; /* catchall */ |
| 3446 | |
| 3447 | if (shoptype < 0) { |
| 3448 | str = "untended shop"; |
| 3449 | } else if (shtypes[shoptype].annotation) { |
| 3450 | str = shtypes[shoptype].annotation; |
| 3451 | } else if (shtypes[shoptype].name) { |
| 3452 | str = shtypes[shoptype].name; |
| 3453 | } |
| 3454 | return str; |
| 3455 | } |
| 3456 | |
| 3457 | /* if player knows about the mastermind tune, append it to Castle annotation; |
| 3458 | if drawbridge has been destroyed, flags.castletune will be zero */ |