mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 09:49:19 +00:00
fixed slow down right before a unit arrives at its destination hex, ...
...due to redrawing of the minimap
This commit is contained in:
parent
3ce976fdcd
commit
8784bb5e16
@ -1296,7 +1296,6 @@ size_t move_unit(display* disp, const game_data& gamedata,
|
||||
if(disp != NULL) {
|
||||
disp->invalidate_unit();
|
||||
disp->invalidate(steps.back());
|
||||
disp->recalculate_minimap();
|
||||
}
|
||||
|
||||
int orig_tower_owner = -1;
|
||||
@ -1322,6 +1321,7 @@ size_t move_unit(display* disp, const game_data& gamedata,
|
||||
if(disp != NULL) {
|
||||
disp->set_route(NULL);
|
||||
disp->draw();
|
||||
disp->recalculate_minimap();
|
||||
}
|
||||
|
||||
assert(steps.size() <= route.size());
|
||||
|
@ -551,6 +551,8 @@ int play_game(int argc, char** argv)
|
||||
|
||||
std::vector<std::string> langs = get_languages(game_config);
|
||||
|
||||
std::sort(langs.begin(),langs.end());
|
||||
|
||||
const std::vector<std::string>::iterator current = std::find(langs.begin(),langs.end(),get_language());
|
||||
if(current != langs.end())
|
||||
*current = "*" + *current;
|
||||
|
@ -285,7 +285,7 @@ SDL_Surface* getMinimap(int w, int h, const gamemap& map,
|
||||
assert(surf != NULL);
|
||||
|
||||
SDL_Rect maprect = {x*scale*0.75,y*scale + (is_odd(x) ? scale/2 : 0),0,0};
|
||||
sdl_safe_blit(surf, NULL, minimap, &maprect);
|
||||
SDL_BlitSurface(surf, NULL, minimap, &maprect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -974,7 +974,11 @@ void turn_info::undo()
|
||||
|
||||
const bool shroud_cleared = clear_shroud(gui_,status_,map_,gameinfo_,units_,teams_,team_num_-1);
|
||||
|
||||
gui_.recalculate_minimap();
|
||||
if(shroud_cleared) {
|
||||
gui_.recalculate_minimap();
|
||||
} else {
|
||||
gui_.redraw_minimap();
|
||||
}
|
||||
}
|
||||
|
||||
void turn_info::redo()
|
||||
|
Loading…
x
Reference in New Issue
Block a user