mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 10:36:21 +00:00
fixes some dumb errors in my recent commits
This commit is contained in:
parent
cdf5731ba0
commit
f2f326327b
@ -136,14 +136,6 @@ namespace game_config
|
|||||||
enemy_ball_image = v["enemy_ball_image"];
|
enemy_ball_image = v["enemy_ball_image"];
|
||||||
ally_ball_image = v["ally_ball_image"];
|
ally_ball_image = v["ally_ball_image"];
|
||||||
flag_image = v["flag_image"];
|
flag_image = v["flag_image"];
|
||||||
flag_rgb = tc_info(v["flag_rgb"]);
|
|
||||||
if( !flag_rgb.size()){
|
|
||||||
//set green as old_flag_color
|
|
||||||
for(int i=255;i>0;i--){
|
|
||||||
flag_rgb.push_back((Uint32)(i<<8));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cross_image = v["cross_image"];
|
cross_image = v["cross_image"];
|
||||||
dot_image = v["dot_image"];
|
dot_image = v["dot_image"];
|
||||||
|
|
||||||
@ -178,11 +170,18 @@ namespace game_config
|
|||||||
for(string_map::const_iterator rgb_it = rgbv->values.begin(); rgb_it != rgbv->values.end(); ++rgb_it) {
|
for(string_map::const_iterator rgb_it = rgbv->values.begin(); rgb_it != rgbv->values.end(); ++rgb_it) {
|
||||||
try {
|
try {
|
||||||
team_rgb_colors.insert(std::make_pair(rgb_it->first,string2rgb(rgb_it->second)));
|
team_rgb_colors.insert(std::make_pair(rgb_it->first,string2rgb(rgb_it->second)));
|
||||||
} catch(bad_lexical_cast) {
|
} catch(bad_lexical_cast&) {
|
||||||
//throw config::error("Invalid team color: " + rgb_it->second);
|
//throw config::error("Invalid team color: " + rgb_it->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
flag_rgb = tc_info(v["flag_rgb"]);
|
||||||
|
if( !flag_rgb.size()){
|
||||||
|
//set green as old_flag_color
|
||||||
|
for(int i=255;i>0;i--){
|
||||||
|
flag_rgb.push_back((Uint32)(i<<8));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const std::vector<Uint32>& tc_info(const std::string& name)
|
const std::vector<Uint32>& tc_info(const std::string& name)
|
||||||
{
|
{
|
||||||
@ -191,7 +190,7 @@ namespace game_config
|
|||||||
try {
|
try {
|
||||||
team_rgb_colors.insert(std::make_pair(name,string2rgb(name)));
|
team_rgb_colors.insert(std::make_pair(name,string2rgb(name)));
|
||||||
return tc_info(name);
|
return tc_info(name);
|
||||||
} catch(bad_lexical_cast) {
|
} catch(bad_lexical_cast&) {
|
||||||
static std::vector<Uint32> stv;
|
static std::vector<Uint32> stv;
|
||||||
//throw config::error("Invalid team color: " + name);
|
//throw config::error("Invalid team color: " + name);
|
||||||
return stv;
|
return stv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user