Move some hard-coded string arrays into data files.

Random epitaphs, engravings and hallucinatory monsters now
live in text data files.
This commit is contained in:
Pasi Kallinen
2015-03-18 22:05:10 +02:00
parent e93add8cb8
commit debdf7ca48
23 changed files with 420 additions and 174 deletions

View File

@@ -284,13 +284,14 @@ char *pname; /* caller-supplied output buffer */
boolean do_hallu = Hallucination,
aligned_priest = mon->data == &mons[PM_ALIGNED_PRIEST],
high_priest = mon->data == &mons[PM_HIGH_PRIEST];
const char *what = do_hallu ? rndmonnam() : mon->data->mname;
char whatcode = '\0';
const char *what = do_hallu ? rndmonnam(&whatcode) : mon->data->mname;
if (!mon->ispriest && !mon->isminion) /* should never happen... */
return strcpy(pname, what); /* caller must be confused */
*pname = '\0';
if (!do_hallu || !bogon_is_pname(what)) Strcat(pname, "the ");
if (!do_hallu || !bogon_is_pname(whatcode)) Strcat(pname, "the ");
if (mon->minvis) Strcat(pname, "invisible ");
if (mon->isminion && EMIN(mon)->renegade)
Strcat(pname, "renegade ");