From 8587a14cdee54d631657332274966993c8ba4e7f Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Fri, 29 Jun 2018 15:05:51 +1100 Subject: [PATCH] Removed preference to disable halos There's really no reason to have this anymore. It was (AFAIK) introduced years ago as a performance-saving measure, then was moved to Advanced Preferences in 1.13 since modern PCs mostly have no issues. --- changelog.md | 1 + data/advanced_preferences.cfg | 8 -------- src/display.cpp | 2 +- src/halo.cpp | 4 ++-- src/preferences/game.cpp | 14 -------------- src/preferences/game.hpp | 4 ---- 6 files changed, 4 insertions(+), 29 deletions(-) diff --git a/changelog.md b/changelog.md index a1abd20abb99..852e50f7d88d 100644 --- a/changelog.md +++ b/changelog.md @@ -90,6 +90,7 @@ * Passing relative paths to --user-data-dir is deprecated (part of PR#4449), * On windows, relative paths that start with `.\` are not deprecated * Removed incomplete joystick support. + * Removed option to disable unit and item halos. ## Version 1.15.1 ### Editor diff --git a/data/advanced_preferences.cfg b/data/advanced_preferences.cfg index d5112e16ef8b..e888690cf3e6 100644 --- a/data/advanced_preferences.cfg +++ b/data/advanced_preferences.cfg @@ -165,14 +165,6 @@ default=yes [/advanced_preference] -[advanced_preference] - field=show_halos - name= _ "Show haloing effects" - description= _ "Show special unit graphical effects" - type=boolean - default=yes -[/advanced_preference] - [advanced_preference] field=show_deprecation name= _ "Show deprecation messages in-game" diff --git a/src/display.cpp b/src/display.cpp index 78e7f796ee03..8c9383e04916 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -2499,7 +2499,7 @@ void display::draw(bool update,bool force) { * draw_invalidated() also invalidates the halos, so also needs to be * ran if invalidated_.empty() == true. */ - if(!invalidated_.empty() || preferences::show_haloes()) { + if(!invalidated_.empty()) { draw_invalidated(); invalidated_.clear(); } diff --git a/src/halo.cpp b/src/halo.cpp index 775f339f9a8c..63ecbfbcfe8a 100644 --- a/src/halo.cpp +++ b/src/halo.cpp @@ -354,7 +354,7 @@ void halo_impl::remove(int handle) void halo_impl::unrender(std::set invalidated_locations) { - if(preferences::show_haloes() == false || haloes.empty()) { + if(haloes.empty()) { return; } //assert(invalidated_haloes.empty()); @@ -429,7 +429,7 @@ void halo_impl::unrender(std::set invalidated_locations) void halo_impl::render() { - if(preferences::show_haloes() == false || haloes.empty() || + if(haloes.empty() || invalidated_haloes.empty()) { return; } diff --git a/src/preferences/game.cpp b/src/preferences/game.cpp index 084bae4db33e..555e2f4180c9 100644 --- a/src/preferences/game.cpp +++ b/src/preferences/game.cpp @@ -39,8 +39,6 @@ namespace { bool message_private_on = false; -bool haloes = true; - std::map> completed_campaigns; std::set encountered_units_set; std::set encountered_terrains_set; @@ -81,7 +79,6 @@ manager::manager() : set_music_volume(music_volume()); set_sound_volume(sound_volume()); - set_show_haloes(preferences::get("show_haloes", true)); if (!preferences::get("remember_timer_settings", false)) { preferences::erase("mp_countdown_init_time"); preferences::erase("mp_countdown_reservoir_time"); @@ -871,17 +868,6 @@ void set_message_private(bool value) message_private_on = value; } -bool show_haloes() -{ - return haloes; -} - -void set_show_haloes(bool value) -{ - haloes = value; - preferences::set("show_haloes", value); -} - compression::format save_compression_format() { const std::string& choice = diff --git a/src/preferences/game.hpp b/src/preferences/game.hpp index d467d0ab2278..10b6c64386c2 100644 --- a/src/preferences/game.hpp +++ b/src/preferences/game.hpp @@ -195,10 +195,6 @@ class acquaintance; bool message_private(); void set_message_private(bool value); - bool show_haloes(); - void set_show_haloes(bool value); - - // Multiplayer functions std::string get_chat_timestamp(const std::time_t& t); bool chat_timestamping();