Skip to content

Commit

Permalink
Simplify out a function
Browse files Browse the repository at this point in the history
This is no longer needed, as longer half-opaque solid features no longer
exist.
  • Loading branch information
gammafunk committed Jul 5, 2018
1 parent 47e2213 commit fbd32a6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crawl-ref/source/losparam.cc
Expand Up @@ -110,20 +110,15 @@ opacity_type opacity_no_actor::operator()(const coord_def& p) const
return OPC_CLEAR;
}

static opacity_type _feat_opacity(dungeon_feature_type feat)
{
return feat_is_opaque(feat) ? OPC_OPAQUE : OPC_CLEAR;
}

opacity_type opacity_excl::operator()(const coord_def& p) const
{
map_cell& cell = env.map_knowledge(p);
if (!cell.seen())
return OPC_CLEAR;
else if (!cell.changed())
return _feat_opacity(env.grid(p));
return feat_is_opaque(env.grid(p)) ? OPC_OPAQUE : OPC_CLEAR;
else if (cell.feat() != DNGN_UNSEEN)
return _feat_opacity(cell.feat());
return feat_is_opaque(cell.feat()) ? OPC_OPAQUE : OPC_CLEAR;
else
return OPC_CLEAR;
}

0 comments on commit fbd32a6

Please sign in to comment.