From 5e05ffc14e57fff49b1f8a9700fa3623b4f1f343 Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 19 May 2007 20:51:51 +0000 Subject: 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 --- crawl-ref/source/monplace.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/monplace.cc') 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); -- cgit v1.2.3-54-g00ecf