Skip to content

Commit

Permalink
Removed preference to disable halos
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vultraz committed Oct 19, 2019
1 parent de8077a commit 8587a14
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 29 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions data/advanced_preferences.cfg
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/display.cpp
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions src/halo.cpp
Expand Up @@ -354,7 +354,7 @@ void halo_impl::remove(int handle)

void halo_impl::unrender(std::set<map_location> invalidated_locations)
{
if(preferences::show_haloes() == false || haloes.empty()) {
if(haloes.empty()) {
return;
}
//assert(invalidated_haloes.empty());
Expand Down Expand Up @@ -429,7 +429,7 @@ void halo_impl::unrender(std::set<map_location> invalidated_locations)

void halo_impl::render()
{
if(preferences::show_haloes() == false || haloes.empty() ||
if(haloes.empty() ||
invalidated_haloes.empty()) {
return;
}
Expand Down
14 changes: 0 additions & 14 deletions src/preferences/game.cpp
Expand Up @@ -39,8 +39,6 @@ namespace {

bool message_private_on = false;

bool haloes = true;

std::map<std::string, std::set<std::string>> completed_campaigns;
std::set<std::string> encountered_units_set;
std::set<t_translation::terrain_code> encountered_terrains_set;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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 =
Expand Down
4 changes: 0 additions & 4 deletions src/preferences/game.hpp
Expand Up @@ -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();
Expand Down

0 comments on commit 8587a14

Please sign in to comment.