Apply TC to the Unknown side leader icon in the Status Table unconditionally

Previously, the Unknown icon only received TC if the leader unit for
that side supported TC, and it'd only use the source palette specified
in the unit configuration. Our Unknown icon, however, always needs TC,
and it must always be on the magenta palette.
This commit is contained in:
Ignacio R. Morelle 2014-01-14 01:12:06 -03:00
parent d8a74ab17e
commit 031dc8a213
3 changed files with 10 additions and 3 deletions

View file

@ -14,6 +14,8 @@ Version 1.11.8+dev:
* Truncate long Advanced Preferences entries with ellipses to avoid
situations where the listbox is wider than the Preferences dialog frame
(bug #19482).
* Team color is now applied on the Unknown unit icon in the game Status
Table regardless of whether the side's leader unit supports team color.
* Miscellaneous and bug fixes:
* Added -Wno-documentation-deprecated-sync to the CMake pedantic flags.
* Fixed several Doxygen issues found by Clang 3.4.

View file

@ -15,6 +15,8 @@ Version 1.11.8+dev:
help browser when they shouldn't.
* Truncate long Advanced Preferences entries with ellipses to avoid
situations where the listbox is wider than the Preferences dialog frame.
* Team color is now applied on the Unknown unit icon in the game Status
Table regardless of whether the side's leader unit supports team color.
* Miscellaneous and bug fixes:
* Fixed possible invalid memory access issue in the MP sides configuration

View file

@ -238,10 +238,16 @@ void menu_handler::status_table(int selected)
// show only a random leader image.
if (!fogged || known || game_config::debug) {
str << IMAGE_PREFIX << leader->absolute_image();
#ifndef LOW_MEM
str << leader->image_mods();
#endif
leader_bools.push_back(true);
leader_name = leader->name();
} else {
str << IMAGE_PREFIX << std::string("units/unknown-unit.png");
#ifndef LOW_MEM
str << "~RC(magenta>" << teams_[n].color() << ")";
#endif
leader_bools.push_back(false);
leader_name = "Unknown";
}
@ -249,9 +255,6 @@ void menu_handler::status_table(int selected)
if (gamestate_.classification().campaign_type == "multiplayer")
leader_name = teams_[n].current_player();
#ifndef LOW_MEM
str << leader->image_mods();
#endif
} else {
leader_bools.push_back(false);
}