summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-19 20:51:51 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-19 20:51:51 +0000
commit5e05ffc14e57fff49b1f8a9700fa3623b4f1f343 (patch)
tree2cb6bb13f8b3c7b0af877542b1325ee7e3d1bc6e /crawl-ref/source/beam.cc
parent3ecc52d48d75321c18bd0969f461f26e253c6537 (diff)
downloadcrawl-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/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index d00aeba43f..476f566893 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -24,6 +24,7 @@
#include <cstdio>
#include <cstring>
#include <cstdarg>
+#include <iostream>
#include <set>
#ifdef DOS
@@ -1969,7 +1970,7 @@ int mons_ench_f2(struct monsters *monster, struct bolt &pbolt)
case BEAM_INVISIBILITY: /* 5 = invisibility */
// Store the monster name before it becomes an "it" -- bwr
{
- const std::string monster_name = ptr_monam(monster, DESC_CAP_THE);
+ const std::string monster_name = str_monam(*monster, DESC_CAP_THE);
if (!monster->has_ench(ENCH_INVIS)
&& monster->add_ench(ENCH_INVIS))
@@ -2946,7 +2947,7 @@ static std::string beam_zapper(const bolt &beam)
else if (bsrc == MHITNOT)
return ("");
else
- return ptr_monam( &menv[bsrc], DESC_PLAIN );
+ return str_monam( menv[bsrc], DESC_PLAIN );
}
// return amount of extra range used up by affectation of the player
@@ -3512,7 +3513,7 @@ static int affect_monster(struct bolt &beam, struct monsters *mon)
{
mprf(MSGCH_DIAGNOSTICS,
"Monster: %s; Damage: pre-AC: %d; post-AC: %d; post-resist: %d",
- ptr_monam( mon, DESC_PLAIN ), hurt, raw_damage, hurt_final );
+ str_monam(*mon, DESC_PLAIN).c_str(),hurt, raw_damage, hurt_final);
}
#endif
@@ -3584,9 +3585,8 @@ static int affect_monster(struct bolt &beam, struct monsters *mon)
// if the PLAYER cannot see the monster, don't tell them anything!
if (player_monster_visible( &menv[tid] ) && mons_near(mon))
{
- mprf("The %s misses %s.",
- beam.name.c_str(),
- ptr_monam(mon, DESC_NOCAP_THE));
+ msg::stream << "The " << beam.name << " misses "
+ << str_monam(*mon, DESC_NOCAP_THE) << std::endl;
}
return (0);
}
@@ -3595,11 +3595,11 @@ static int affect_monster(struct bolt &beam, struct monsters *mon)
if (mons_near(mon))
{
mprf("The %s %s %s.",
- beam.name.c_str(),
- engulfs? "engulfs" : "hits",
- player_monster_visible(&menv[tid])?
- ptr_monam(mon, DESC_NOCAP_THE)
- : "something");
+ beam.name.c_str(),
+ engulfs? "engulfs" : "hits",
+ player_monster_visible(&menv[tid])?
+ str_monam(*mon, DESC_NOCAP_THE).c_str()
+ : "something");
}
else
{