mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 20:40:40 +00:00
Removed unused function display::rectangle_need_update.
This commit is contained in:
parent
c0f6345394
commit
24d78af915
@ -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()) {
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user