fixup messed up whitespace and similar
This commit is contained in:
parent
db08784a55
commit
7b6a1ec74d
3 changed files with 22 additions and 16 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
#define TEST_GRUNT_DAMAGE ID X Y EXPECTED_DAMAGE
|
||||
{UNIT 2 "Orcish Grunt" "$({X} + 1)" {Y} (random_traits=false)}
|
||||
{UNIT 1 "Elvish Archer" {X} {Y} (id={ID})}
|
||||
{UNIT 1 "Elvish Archer" {X} {Y} (id={ID})}
|
||||
[do_command]
|
||||
[attack]
|
||||
weapon = 0
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{UNIT 2 "Orcish Grunt" 2 3 ()}
|
||||
{UNIT 2 "Orcish Grunt" 2 4 ()}
|
||||
|
||||
{UNIT 1 "Orcish Grunt" 3 4 ()}
|
||||
{UNIT 1 "Orcish Grunt" 3 4 ()}
|
||||
|
||||
[store_unit]
|
||||
variable = test
|
||||
|
|
|
@ -84,9 +84,9 @@ namespace game_config
|
|||
|
||||
namespace images {
|
||||
std::string game_title,
|
||||
game_title_background,
|
||||
game_title_background,
|
||||
// orbs and hp/xp bar
|
||||
orb,
|
||||
orb,
|
||||
energy,
|
||||
// flags
|
||||
flag,
|
||||
|
@ -106,7 +106,7 @@ namespace game_config
|
|||
tod_dark,
|
||||
///@todo de-hardcode this
|
||||
selected_menu = "buttons/radiobox-pressed.png",
|
||||
deselected_menu = "buttons/radiobox.png",
|
||||
deselected_menu = "buttons/radiobox.png",
|
||||
checked_menu = "buttons/checkbox-pressed.png",
|
||||
unchecked_menu = "buttons/checkbox.png",
|
||||
wml_menu = "buttons/WML-custom.png",
|
||||
|
@ -202,11 +202,11 @@ namespace game_config
|
|||
|
||||
if(const config &i = v.child("colors")){
|
||||
using namespace game_config::colors;
|
||||
moved_orb_color = i["moved_orb_color"].str();
|
||||
unmoved_orb_color = i["unmoved_orb_color"].str();
|
||||
partial_orb_color = i["partial_orb_color"].str();
|
||||
enemy_orb_color = i["enemy_orb_color"].str();
|
||||
ally_orb_color = i["ally_orb_color"].str();
|
||||
moved_orb_color = i["moved_orb_color"].str();
|
||||
unmoved_orb_color = i["unmoved_orb_color"].str();
|
||||
partial_orb_color = i["partial_orb_color"].str();
|
||||
enemy_orb_color = i["enemy_orb_color"].str();
|
||||
ally_orb_color = i["ally_orb_color"].str();
|
||||
} // colors
|
||||
|
||||
show_ally_orb = v["show_ally_orb"].to_bool(true);
|
||||
|
@ -218,9 +218,9 @@ namespace game_config
|
|||
if(const config &i = v.child("images")){
|
||||
using namespace game_config::images;
|
||||
game_title = i["game_title"].str();
|
||||
game_title_background = i["game_title_background"].str();
|
||||
game_title_background = i["game_title_background"].str();
|
||||
|
||||
orb = i["orb"].str();
|
||||
orb = i["orb"].str();
|
||||
energy = i["energy"].str();
|
||||
|
||||
flag = i["flag"].str();
|
||||
|
@ -256,8 +256,9 @@ namespace game_config
|
|||
|
||||
add_color_info(v);
|
||||
|
||||
if (const config::attribute_value *a = v.get("flag_rgb"))
|
||||
if (const config::attribute_value *a = v.get("flag_rgb")) {
|
||||
flag_rgb = a->str();
|
||||
}
|
||||
|
||||
std::string color_string = v["red_green_scale"].str();
|
||||
if(!string2rgb(color_string, red_green_scale)) {
|
||||
|
@ -311,7 +312,9 @@ namespace game_config
|
|||
{
|
||||
const config::attribute_value *a1 = teamC.get("id"),
|
||||
*a2 = teamC.get("rgb");
|
||||
if (!a1 || !a2) continue;
|
||||
if (!a1 || !a2) {
|
||||
continue;
|
||||
}
|
||||
std::string id = *a1;
|
||||
std::vector<Uint32> temp;
|
||||
if(!string2rgb(*a2, temp)) {
|
||||
|
@ -323,7 +326,9 @@ namespace game_config
|
|||
team_rgb_name[id] = teamC["name"];
|
||||
//generate palette of same name;
|
||||
std::vector<Uint32> tp = palette(team_rgb_range[id]);
|
||||
if (tp.empty()) continue;
|
||||
if (tp.empty()) {
|
||||
continue;
|
||||
}
|
||||
team_rgb_colors.insert(std::make_pair(id,tp));
|
||||
//if this is being used, output log of palette for artists use.
|
||||
DBG_NG << "color palette creation:\n";
|
||||
|
@ -359,8 +364,9 @@ namespace game_config
|
|||
std::map<std::string, color_range>::const_iterator i = team_rgb_range.find(name);
|
||||
if(i == team_rgb_range.end()) {
|
||||
std::vector<Uint32> temp;
|
||||
if(!string2rgb(name, temp))
|
||||
if(!string2rgb(name, temp)) {
|
||||
throw config::error(_("Invalid color range: ") + name);
|
||||
}
|
||||
team_rgb_range.insert(std::make_pair(name,color_range(temp)));
|
||||
return color_info(name);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue