summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-26 22:50:33 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-10-26 22:52:03 +0100
commit2c33ddb4c83370db12567cdddaa7f4fe696481c9 (patch)
tree83c24b7adb0590a8d2109c5153c70462bded0e83 /crawl-ref/source/travel.cc
parent15bf1ee0d626ba660f0ec913e19f7b255e0f5be1 (diff)
downloadcrawl-ref-2c33ddb4c83370db12567cdddaa7f4fe696481c9.tar.gz
crawl-ref-2c33ddb4c83370db12567cdddaa7f4fe696481c9.zip
Fix compile.
The previous fix was right in spirit, but incomplete. Fixed to compile for now, though the autoexclusion descriptions are broken until I figure out how to get a monster_type's name.
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 5508c11b09..7ea50c042f 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -305,7 +305,7 @@ static opacity_excl opc_excl;
// currently short-cut for small bounds. So radius 0 is special-cased.
travel_exclude::travel_exclude(const coord_def &p, int r,
- bool autoexcl, int mons, bool vaultexcl)
+ bool autoexcl, monster_type mons, bool vaultexcl)
: pos(p), radius(r),
los(los_def(p, opc_excl, bounds_radius(r))),
uptodate(false), autoex(autoex), vault(vaultexcl)
@@ -536,7 +536,7 @@ void set_exclude(const coord_def &p, int radius, bool autoexcl, bool vaultexcl)
monster_type montype = NUM_MONSTERS;
const monsters *m = monster_at(p);
if (m && mons_near(m) && you.can_see(m))
- montype = m->type;
+ montype = static_cast<monster_type>(m->type);
curr_excludes.push_back(travel_exclude(p, radius, autoexcl,
montype, vaultexcl));
@@ -565,7 +565,8 @@ std::string get_exclusion_desc()
for (unsigned int i = 0; i < curr_excludes.size(); ++i)
{
if (curr_excludes[i].mon != NON_MONSTER)
- monsters.push_back(mondata[curr_excludes[i].mon].name);
+ monsters.push_back("unknown monster");
+ // FIXME: mondata[curr_excludes[i].mon].name);
else
count_other++;
}
@@ -3662,7 +3663,7 @@ void LevelInfo::load(reader& inf, char minorVersion)
if (minorVersion >= TAG_ANNOTATE_EXCL)
{
autoexcl = unmarshallBoolean(inf);
- mon = unmarshallShort(inf);
+ mon = static_cast<monster_type>(unmarshallShort(inf));
}
excludes.push_back(travel_exclude(c, radius, autoexcl, mon));
}