Removed unused function display::rectangle_need_update.

This commit is contained in:
Guillaume Melquiond 2009-12-06 09:56:46 +00:00
parent c0f6345394
commit 24d78af915
2 changed files with 0 additions and 23 deletions

View File

@ -2334,26 +2334,6 @@ bool display::invalidate_locations_in_rect(const SDL_Rect& rect)
return result;
}
bool display::rectangle_need_update(const SDL_Rect& rect) const
{
SDL_Rect visible_rect = intersect_rects(map_area(), rect);
// check if rectangle is visible
if(visible_rect.w <=0 || visible_rect.h <=0)
return false;
// invalidateAll_ is about visible hexes, so only check if visible
if(invalidateAll_)
return true;
foreach (const map_location &loc, hexes_under_rect(visible_rect)) {
if (invalidated_.find(loc) != invalidated_.end())
return true;
}
return false;
}
void display::invalidate_animations()
{
if (!preferences::animate_map()) {

View File

@ -285,9 +285,6 @@ public:
bool invalidate_locations_in_rect(const SDL_Rect& rect);
bool invalidate_visible_locations_in_rect(const SDL_Rect& rect);
/** check if visible hexes under the rectangle is invalidated */
bool rectangle_need_update(const SDL_Rect& rect) const;
/**
* Function to invalidate animated terrains which may have changed.
*/