Re-indent stuff touched by recent commits

This commit is contained in:
2014-12-18 12:55:35 -05:00
parent 5d8f974742
commit a672ec050d
3 changed files with 72 additions and 72 deletions

View File

@@ -1394,71 +1394,71 @@ void draw_map(bool need_refresh) {
for(where.x= area_to_put_on_map_rect.left; where.x < area_to_put_on_map_rect.right; where.x++)
for(where.y= area_to_put_on_map_rect.top; where.y < area_to_put_on_map_rect.bottom; where.y++) {
draw_rect = orig_draw_rect;
draw_rect.offset(6 * where.x + small_adj, 6 * where.y + small_adj);
if(out_mode)
what_ter = univ.out[where.x + 48 * univ.party.i_w_c.x][where.y + 48 * univ.party.i_w_c.y];
else what_ter = univ.town->terrain(where.x,where.y);
ter_temp_from = base_source_rect;
if(out_mode)
expl = univ.out.out_e[where.x + 48 * univ.party.i_w_c.x][where.y + 48 * univ.party.i_w_c.y];
else expl = is_explored(where.x,where.y);
if(expl != 0) {
pic = scenario.ter_types[what_ter].map_pic;
bool drawLargeIcon = false;
if(pic == NO_PIC) {
pic = scenario.ter_types[what_ter].picture;
drawLargeIcon = true;
}
if(pic >= 1000) {
if(spec_scen_g) {
//print_nums(0,99,pic);
pic = pic % 1000;
sf::Texture* src_gw;
if(drawLargeIcon) {
graf_pos_ref(src_gw, custom_from) = spec_scen_g.find_graphic(pic);
rect_draw_some_item(*src_gw,custom_from,map_gworld,draw_rect);
} else {
graf_pos_ref(src_gw, custom_from) = spec_scen_g.find_graphic(pic % 1000);
custom_from.right = custom_from.left + 12;
custom_from.bottom = custom_from.top + 12;
pic /= 1000; pic--;
custom_from.offset((pic / 3) * 12, (pic % 3) * 12);
rect_draw_some_item(*src_gw, custom_from, map_gworld, draw_rect);
}
}
} else if(drawLargeIcon) {
if(pic >= 960) {
custom_from = calc_rect(4 * ((pic - 960) / 5),(pic - 960) % 5);
rect_draw_some_item(anim_gworld, custom_from, map_gworld, draw_rect);
draw_rect = orig_draw_rect;
draw_rect.offset(6 * where.x + small_adj, 6 * where.y + small_adj);
if(out_mode)
what_ter = univ.out[where.x + 48 * univ.party.i_w_c.x][where.y + 48 * univ.party.i_w_c.y];
else what_ter = univ.town->terrain(where.x,where.y);
ter_temp_from = base_source_rect;
if(out_mode)
expl = univ.out.out_e[where.x + 48 * univ.party.i_w_c.x][where.y + 48 * univ.party.i_w_c.y];
else expl = is_explored(where.x,where.y);
if(expl != 0) {
pic = scenario.ter_types[what_ter].map_pic;
bool drawLargeIcon = false;
if(pic == NO_PIC) {
pic = scenario.ter_types[what_ter].picture;
drawLargeIcon = true;
}
if(pic >= 1000) {
if(spec_scen_g) {
//print_nums(0,99,pic);
pic = pic % 1000;
sf::Texture* src_gw;
if(drawLargeIcon) {
graf_pos_ref(src_gw, custom_from) = spec_scen_g.find_graphic(pic);
rect_draw_some_item(*src_gw,custom_from,map_gworld,draw_rect);
} else {
sf::Texture* src_gw = &terrain_gworld[pic / 50];
pic %= 50;
custom_from = calc_rect(pic % 10, pic / 10);
graf_pos_ref(src_gw, custom_from) = spec_scen_g.find_graphic(pic % 1000);
custom_from.right = custom_from.left + 12;
custom_from.bottom = custom_from.top + 12;
pic /= 1000; pic--;
custom_from.offset((pic / 3) * 12, (pic % 3) * 12);
rect_draw_some_item(*src_gw, custom_from, map_gworld, draw_rect);
}
} else switch(pic >= 960 ? anim_map_pats[pic - 960] : map_pats[pic]) {
case 0: case 10: case 11:
if(scenario.ter_types[what_ter].picture < 960)
ter_temp_from.offset(12 * (scenario.ter_types[what_ter].picture % 20),
12 * (scenario.ter_types[what_ter].picture / 20));
else ter_temp_from.offset(12 * 20,
12 * (scenario.ter_types[what_ter].picture - 960));
rect_draw_some_item(small_ter_gworld,ter_temp_from,map_gworld,draw_rect);
break;
default:
if(((pic >= 960) ? anim_map_pats[pic - 960] : map_pats[pic]) < 30) {
tileImage(map_gworld, draw_rect,map_pat[((pic >= 960) ? anim_map_pats[pic - 960] : map_pats[pic]) - 1]);
break;
}
break;
}
} else if(drawLargeIcon) {
if(pic >= 960) {
custom_from = calc_rect(4 * ((pic - 960) / 5),(pic - 960) % 5);
rect_draw_some_item(anim_gworld, custom_from, map_gworld, draw_rect);
} else {
sf::Texture* src_gw = &terrain_gworld[pic / 50];
pic %= 50;
custom_from = calc_rect(pic % 10, pic / 10);
rect_draw_some_item(*src_gw, custom_from, map_gworld, draw_rect);
}
} else switch(pic >= 960 ? anim_map_pats[pic - 960] : map_pats[pic]) {
case 0: case 10: case 11:
if(scenario.ter_types[what_ter].picture < 960)
ter_temp_from.offset(12 * (scenario.ter_types[what_ter].picture % 20),
12 * (scenario.ter_types[what_ter].picture / 20));
else ter_temp_from.offset(12 * 20,
12 * (scenario.ter_types[what_ter].picture - 960));
rect_draw_some_item(small_ter_gworld,ter_temp_from,map_gworld,draw_rect);
break;
default:
if(((pic >= 960) ? anim_map_pats[pic - 960] : map_pats[pic]) < 30) {
tileImage(map_gworld, draw_rect,map_pat[((pic >= 960) ? anim_map_pats[pic - 960] : map_pats[pic]) - 1]);
break;
}
break;
}
}
}
map_gworld.display();

View File

@@ -815,8 +815,8 @@ void draw_terrain(){
}
else {
tileImage(ter_draw_gworld, terrain_rect,bg[17]);
frame_rect(ter_draw_gworld, terrain_rect, sf::Color::Black);
tileImage(ter_draw_gworld, terrain_rect,bg[17]);
frame_rect(ter_draw_gworld, terrain_rect, sf::Color::Black);
// Width available: 64 4x4 tiles, 42 6x6 tiles, or 21 12x12 tiles -- 256 pixels
// Height available: 81 4x4 tiles, 54 6x6 tiles, or 27 12x12 tiles -- 324 pixels
short size = mini_map_scales[cur_viewing_mode - 1];
@@ -833,8 +833,8 @@ void draw_terrain(){
for(q = xMin; q < xMax; q++)
for(r = yMin; r < yMax; r++) {
t_to_draw = editing_town ? town->terrain(q,r) : current_terrain.terrain[q][r];
draw_one_tiny_terrain_spot(q-xMin,r-yMin,t_to_draw,size);
small_what_drawn[q][r] = t_to_draw;
draw_one_tiny_terrain_spot(q-xMin,r-yMin,t_to_draw,size);
small_what_drawn[q][r] = t_to_draw;
}
small_any_drawn = true;
}

View File

@@ -283,7 +283,7 @@ static bool get_placed_item_in_dlog(cDialog& me, cTown::cItem& store_placed_item
store_placed_item.ability = me["charges"].getTextAsNum();
if(store_placed_item.ability < -1 || store_placed_item.ability > 2500) {
giveError("Number of charges/amount of gold or food must be from 0 to 2500.",
"If an item with charges (not gold or food) leave this at -1 for the item to have the default number of charges.",&me);
"If an item with charges (not gold or food) leave this at -1 for the item to have the default number of charges.",&me);
return true;
}
@@ -331,13 +331,13 @@ static bool edit_sign_event_filter(cDialog& me, short which_sign) {
town->sign_strs[which_sign] = me["text"].getText();
else current_terrain.sign_strs[which_sign] = me["text"].getText();
#if 0 // TODO: Apparently there used to be left/right buttons on this dialog.
if(item_hit == 3)
store_which_sign--;
else store_which_sign++;
if(store_which_sign < 0)
store_which_sign = (editing_town) ? 14 : 7;
if(store_which_sign > (editing_town) ? 14 : 7)
store_which_sign = 0;
if(item_hit == 3)
store_which_sign--;
else store_which_sign++;
if(store_which_sign < 0)
store_which_sign = (editing_town) ? 14 : 7;
if(store_which_sign > (editing_town) ? 14 : 7)
store_which_sign = 0;
#endif
return true;
}