Author: alink
Date: Sat May 26 01:55:45 2007
New Revision: 17859
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17859&view=rev
Log:
Add automatic side-coloring of custom village-flags.
Simplify a little the code.
Modified:
trunk/src/display.cpp
Modified: trunk/src/display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=17859&r1=17858&r2=17859&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Sat May 26 01:55:45 2007
@@ -97,16 +97,12 @@
//inits the flag list
flags_.reserve(teams_.size());
for(size_t i = 0; i != teams_.size(); ++i) {
- std::string flag;
- std::string new_rgb;
- std::string old_rgb;
-
- if(teams_[i].flag().empty()) {
+ std::string flag = teams_[i].flag();
+ std::string old_rgb = game_config::flag_rgb;
+ std::string new_rgb = team::get_side_colour_index(i+1);
+
+ if(flag.empty()) {
flag = game_config::flag_image;
- old_rgb = game_config::flag_rgb;
- new_rgb = team::get_side_colour_index(i+1);
- } else {
- flag = teams_[i].flag();
}
LOG_STREAM(info, display) << "Adding flag for team " << i << "
from animation " << flag << "\n";
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits