Add transition for the shroud outsite the map.

This commit is contained in:
Ali El Gariani 2007-04-01 00:03:52 +00:00
parent f976a3ccb9
commit 9ebaff01f1
2 changed files with 10 additions and 2 deletions

View file

@ -2346,6 +2346,15 @@ void display::debug_highlight(const gamemap::location& loc, fixed_t amount)
debugHighlights_[loc] += amount;
}
bool display::shrouded(int x, int y) const
{
if (x <= map_.x() && y <= map_.y()) {
return team_valid() ? teams_[currentTeam_].shrouded(x,y) : false;
} else {
return true;
}
}
gui::button* display::find_button(const std::string& id)
{
for (size_t i = 0; i < buttons_.size(); ++i) {

View file

@ -345,8 +345,7 @@ public:
static void clear_debug_highlights() { debugHighlights_.clear(); }
//function which returns true if location (x,y) is covered in shroud.
bool shrouded(int x, int y) const
{ return team_valid() ? teams_[currentTeam_].shrouded(x,y) : false; }
bool shrouded(int x, int y) const;
bool fogged(int x, int y) const
{ return team_valid() ? teams_[currentTeam_].fogged(x,y) : false; }