A bit of cleanup after tuukah's patch.

Added comments, fixed a default setting in game_config.cpp, improved
the readability of the unit.cpp code some.
This commit is contained in:
Eric S. Raymond 2007-07-03 19:33:33 +00:00
parent 6966ec2397
commit 3d4fdae72c
3 changed files with 10 additions and 7 deletions

View file

@ -1,9 +1,12 @@
# Each Team-color definition is made up of 4 hexidecimal colors:
# 1) the average shade of a units TColor portions
# 2) the maximum highlight shade of a units TColor portions
# 3) the maximum shadow shade of a units TColor portions
# Each Team-color definition is made up of 4 hexadecimal colors,
# one byte each of red-green-blue information
# 1) the average shade of a unit's team-color portions
# 2) the maximum highlight shade of a unit's team-color portions
# 3) the minimum shadow shade of a unit's team-color portions
# 4) the color of the markers on the mini-map.
# Symbolic IDs for use in WML. All of mainline has been fixed to use these.
# wmllint will translate incoming UMC to use them.
[color_range]
id=red
rgb=FF0000,FFFFFF,000000,FF0000

View file

@ -58,7 +58,7 @@ namespace game_config
std::string ally_ball_image = "misc/ball-ally.png";
std::string flag_image = "flags/flag-1.png:150,flags/flag-2.png:150,flags/flag-3.png:150,flags/flag-4.png:150";
std::string flag_icon_image = "flags/flag_icon.png";
std::string flag_rgb = "green";
std::string flag_rgb = "flag_green";
std::vector<Uint32> defense_color_scale;
std::string cross_image = "misc/cross.png";

View file

@ -1761,9 +1761,9 @@ void unit::redraw_unit(game_display& disp,gamemap::location hex)
std::string tc=team::get_side_colour_index(side_);
snprintf(buf,sizeof(buf),"%s-%stop.png~RC(%s>%s)",ellipse.c_str(),selected,"ellipse_red",tc.c_str());
snprintf(buf,sizeof(buf),"%s-%stop.png~RC(ellipse_red>%s)",ellipse.c_str(),selected,tc.c_str());
ellipse_back.assign(image::get_image(image::locator(buf), image::SCALED_TO_ZOOM, image::NO_ADJUST_COLOUR));
snprintf(buf,sizeof(buf),"%s-%sbottom.png~RC(%s>%s)",ellipse.c_str(),selected,"ellipse_red",tc.c_str());
snprintf(buf,sizeof(buf),"%s-%sbottom.png~RC(ellipse_red>%s)",ellipse.c_str(),selected,tc.c_str());
ellipse_front.assign(image::get_image(image::locator(buf), image::SCALED_TO_ZOOM, image::NO_ADJUST_COLOUR));
}