diff --git a/src/actions/advancement.cpp b/src/actions/advancement.cpp index 1661c2cb0d10..77e80bea423f 100644 --- a/src/actions/advancement.cpp +++ b/src/actions/advancement.cpp @@ -143,12 +143,10 @@ namespace animator.wait_for_end(); animator.set_all_standing(); resources::screen->invalidate(loc); - resources::screen->draw(); events::pump(); } resources::screen->invalidate_all(); - resources::screen->draw(); return true; } diff --git a/src/actions/move.cpp b/src/actions/move.cpp index 361b0fdcf495..47d0ebdc2788 100644 --- a/src/actions/move.cpp +++ b/src/actions/move.cpp @@ -620,8 +620,6 @@ namespace { // Private helpers for move_unit() if (ambush_string_.empty()) { ambush_string_ = _("Ambushed!"); } - // Update the display. - resources::screen->draw(); } @@ -1108,7 +1106,6 @@ namespace { // Private helpers for move_unit() // Update the screen. resources::screen->redraw_minimap(); - resources::screen->draw(); } @@ -1184,11 +1181,6 @@ namespace { // Private helpers for move_unit() redraw = true; } } - - // Update the screen. - if (redraw) { - disp.draw(); - } } }//end anonymous namespace diff --git a/src/actions/undo.cpp b/src/actions/undo.cpp index 554e624dfd02..c32722820427 100644 --- a/src/actions/undo.cpp +++ b/src/actions/undo.cpp @@ -376,7 +376,6 @@ void undo_list::undo() gui.invalidate_unit(); gui.invalidate_game_status(); gui.redraw_minimap(); - gui.draw(); } else { @@ -425,7 +424,6 @@ void undo_list::redo() gui.invalidate_unit(); gui.invalidate_game_status(); gui.redraw_minimap(); - gui.draw(); } @@ -484,14 +482,12 @@ bool undo_list::apply_shroud_changes() const // Update the display before pumping events. clearer.invalidate_after_clear(); - disp.draw(); // Fire sighted events if ( std::get<0>(clearer.fire_events() )) { // Fix up the display in case WML changed stuff. clear_shroud(side_); disp.invalidate_unit(); - disp.draw(); } return true; diff --git a/src/actions/unit_creator.cpp b/src/actions/unit_creator.cpp index 226707d00eb7..3167e417c7a8 100644 --- a/src/actions/unit_creator.cpp +++ b/src/actions/unit_creator.cpp @@ -244,8 +244,6 @@ void unit_creator::post_create(const map_location &loc, const unit &new_unit, bo if (animate) { unit_display::unit_recruited(loc); - } else if (show) { - resources::screen->draw(); } } } diff --git a/src/controller_base.cpp b/src/controller_base.cpp index 4a248e1eeb91..0cb82f2bae8f 100644 --- a/src/controller_base.cpp +++ b/src/controller_base.cpp @@ -308,7 +308,8 @@ void controller_base::play_slice(bool is_delay_enabled) scrolling_ = true; } - // be nice when window is not visible // NOTE should be handled by display instead, to only disable drawing + // be nice when window is not visible + // NOTE should be handled by display instead, to only disable drawing sdl::window* window = CVideo::get_singleton().get_window(); if(window != nullptr && is_delay_enabled && (window->get_flags() & SDL_WINDOW_SHOWN) == 0) { CVideo::delay(200); diff --git a/src/editor/action/action_item.cpp b/src/editor/action/action_item.cpp index 83c9db6ae795..7d12caf88e79 100644 --- a/src/editor/action/action_item.cpp +++ b/src/editor/action/action_item.cpp @@ -112,7 +112,6 @@ void editor_action_item_replace::perform_without_undo(map_context& /*mc*/) const // ////TODO check if that is useful //// resources::screen->invalidate_item_after_move(loc_, new_loc_); -//// resources::screen->draw(); } diff --git a/src/editor/action/action_unit.cpp b/src/editor/action/action_unit.cpp index b95e160984e1..064efe6d5451 100644 --- a/src/editor/action/action_unit.cpp +++ b/src/editor/action/action_unit.cpp @@ -113,7 +113,6 @@ void editor_action_unit_replace::perform_without_undo(map_context& mc) const //TODO check if that is useful // resources::screen->invalidate_unit_after_move(loc_, new_loc_); -// resources::screen->draw(); } diff --git a/src/menu_events.cpp b/src/menu_events.cpp index a67bd3b8d47c..94ffbb88464a 100644 --- a/src/menu_events.cpp +++ b/src/menu_events.cpp @@ -950,7 +950,6 @@ void menu_handler::unit_hold_position(mouse_handler& mousehandler, int side_num) gui_->invalidate(mousehandler.get_selected_hex()); mousehandler.set_current_paths(pathfind::paths()); - gui_->draw(); if(un->hold_position()) { mousehandler.cycle_units(false); @@ -966,7 +965,6 @@ void menu_handler::end_unit_turn(mouse_handler& mousehandler, int side_num) gui_->invalidate(mousehandler.get_selected_hex()); mousehandler.set_current_paths(pathfind::paths()); - gui_->draw(); if(un->user_end_turn()) { mousehandler.cycle_units(false); diff --git a/src/mouse_events.cpp b/src/mouse_events.cpp index 348dd85ad65f..5accb4b6d0c5 100644 --- a/src/mouse_events.cpp +++ b/src/mouse_events.cpp @@ -873,7 +873,6 @@ void mouse_handler::save_whiteboard_attack(const map_location& attacker_loc, con // gui().highlight_hex(map_location()); - gui().draw(); gui().unhighlight_reach(); gui().clear_attack_indicator(); @@ -1004,7 +1003,6 @@ void mouse_handler::attack_enemy_(const map_location& att_loc gui().highlight_hex(map_location()); gui().clear_attack_indicator(); gui().unhighlight_reach(); - gui().draw(); current_team().set_action_bonus_count(1 + current_team().action_bonus_count()); ///@todo change ToD to be location specific for the defender diff --git a/src/mouse_handler_base.cpp b/src/mouse_handler_base.cpp index 2d9a35332ae9..4c8c0665076f 100644 --- a/src/mouse_handler_base.cpp +++ b/src/mouse_handler_base.cpp @@ -282,8 +282,6 @@ void mouse_handler_base::right_mouse_up(int x, int y, const bool browse) return; } - gui().draw(); // redraw highlight (and maybe some more) - const theme::menu* const m = gui().get_theme().context_menu(); if(m != nullptr) { show_menu_ = true; diff --git a/src/playmp_controller.cpp b/src/playmp_controller.cpp index 71c0eb403d8e..307475773d97 100644 --- a/src/playmp_controller.cpp +++ b/src/playmp_controller.cpp @@ -113,7 +113,6 @@ void playmp_controller::play_linger_turn() } } play_slice(); - gui_->draw(); } } @@ -185,8 +184,6 @@ void playmp_controller::play_human_turn() throw; } turn_data_.send_data(); - - gui_->draw(); } } @@ -203,7 +200,6 @@ void playmp_controller::play_idle_loop() process_network_data(); play_slice_catch(); SDL_Delay(1); - gui_->draw(); } catch(...) { @@ -350,8 +346,6 @@ void playmp_controller::play_network_turn(){ if (!network_processing_stopped_){ turn_data_.send_data(); } - - gui_->draw(); } LOG_NG << "finished networked...\n"; diff --git a/src/playsingle_controller.cpp b/src/playsingle_controller.cpp index 7e5ce21a4c51..536356d1c1bc 100644 --- a/src/playsingle_controller.cpp +++ b/src/playsingle_controller.cpp @@ -143,7 +143,6 @@ void playsingle_controller::init_gui(){ } update_locker lock_display(gui_->video(), is_skipping_replay()); - gui_->draw(); get_hotkey_command_executor()->set_button_state(); events::raise_draw_event(); } @@ -364,7 +363,6 @@ void playsingle_controller::play_idle_loop() { while(!should_return_to_play_side()) { play_slice_catch(); - gui_->draw(); SDL_Delay(10); } } @@ -475,7 +473,6 @@ void playsingle_controller::play_human_turn() { while(!should_return_to_play_side()) { check_objectives(); play_slice_catch(); - gui_->draw(); } } @@ -503,7 +500,6 @@ void playsingle_controller::linger() end_turn_ = END_TURN_NONE; while(end_turn_ == END_TURN_NONE) { play_slice(); - gui_->draw(); } } catch(const savegame::load_game_exception &) { // Loading a new game is effectively a quit. @@ -581,7 +577,6 @@ void playsingle_controller::play_ai_turn() gui_->invalidate_unit(); gui_->invalidate_game_status(); gui_->invalidate_all(); - gui_->draw(); } diff --git a/src/scripting/game_lua_kernel.cpp b/src/scripting/game_lua_kernel.cpp index 64c275af28ef..160682f7a783 100644 --- a/src/scripting/game_lua_kernel.cpp +++ b/src/scripting/game_lua_kernel.cpp @@ -3767,7 +3767,6 @@ int game_lua_kernel::intf_teleport(lua_State *L) } game_display_->invalidate_unit_after_move(src_loc, vacant_dst); - game_display_->draw(); // Sighted events. clearer.fire_events();