MCPcopy Create free account
hub / github.com/NetHack/NetHack / tunesuffix

Function tunesuffix

src/dungeon.c:3459–3476  ·  view source on GitHub ↗

if player knows about the mastermind tune, append it to Castle annotation; if drawbridge has been destroyed, flags.castletune will be zero */

Source from the content-addressed store, hash-verified

3457/* if player knows about the mastermind tune, append it to Castle annotation;
3458 if drawbridge has been destroyed, flags.castletune will be zero */
3459staticfn char *
3460tunesuffix(
3461 mapseen *mptr,
3462 char *outbuf,
3463 size_t bsz) /* size of outbuf */
3464{
3465 *outbuf = '\0';
3466 if (mptr->flags.castletune && u.uevent.uheard_tune) {
3467 char tmp[BUFSZ];
3468
3469 if (u.uevent.uheard_tune == 2)
3470 Sprintf(tmp, "notes \"%s\"", svt.tune);
3471 else
3472 Strcpy(tmp, "5-note tune");
3473 Snprintf(outbuf, bsz, " (play %s to open or close drawbridge)", tmp);
3474 }
3475 return outbuf;
3476}
3477
3478/* some utility macros for print_mapseen */
3479#define TAB " " /* three spaces */

Callers 1

print_mapseenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected