diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-19 20:51:51 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-19 20:51:51 +0000 |
commit | 5e05ffc14e57fff49b1f8a9700fa3623b4f1f343 (patch) | |
tree | 2cb6bb13f8b3c7b0af877542b1325ee7e3d1bc6e /crawl-ref/source/monplace.cc | |
parent | 3ecc52d48d75321c18bd0969f461f26e253c6537 (diff) | |
download | crawl-ref-5e05ffc14e57fff49b1f8a9700fa3623b4f1f343.tar.gz crawl-ref-5e05ffc14e57fff49b1f8a9700fa3623b4f1f343.zip |
monam(), moname() and ptr_monam() are gone.
The replacement is str_monam() and mons_type_name().
str_monam() should probably be folded into actor::name. I think.
Deaths from zombies, skeletons and simulacra will not handle the
name correctly; needs a further hack.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1484 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index acc68c4ebb..41c23abd48 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -402,7 +402,7 @@ bool place_monster(int &id, int mon_type, int power, char behaviour, std::string msg; if (player_monster_visible( &menv[id] )) - msg = ptr_monam( &menv[id], DESC_CAP_A ); + msg = str_monam( menv[id], DESC_CAP_A ); else if (shoved) msg = "Something"; @@ -1178,14 +1178,12 @@ void mark_interesting_monst(struct monsters* monster, char behaviour) interesting = false; // Don't waste time on moname() if user isn't using this option else if ( Options.note_monsters.size() > 0 ) - { - char namebuf[ITEMNAME_SIZE]; - moname(monster->type, true, DESC_NOCAP_A, namebuf); - - std::string iname = namebuf; - - for (unsigned i = 0; i < Options.note_monsters.size(); ++i) { - if (Options.note_monsters[i].matches(iname)) { + { + const std::string iname = mons_type_name(monster->type, DESC_NOCAP_A); + for (unsigned i = 0; i < Options.note_monsters.size(); ++i) + { + if (Options.note_monsters[i].matches(iname)) + { interesting = true; break; } @@ -1346,7 +1344,7 @@ bool player_angers_monster(monsters *creation) && player_monster_visible(creation) ) { mprf("%s is enraged by your holy aura!", - ptr_monam(creation, DESC_CAP_THE)); + str_monam(*creation, DESC_CAP_THE).c_str()); } } return (true); |