Fix indentation
This commit is contained in:
@@ -2544,7 +2544,7 @@ void edit_custom_pics_types() {
|
||||
pic_dlg["okay"].attachClickHandler(std::bind(save_pics_types, _1, std::ref(pics)));
|
||||
pic_dlg["cancel"].attachClickHandler(std::bind(&cDialog::toast, _1, false));
|
||||
pic_dlg.attachClickHandlers(std::bind(change_pics_page, _1, _2, std::ref(pics), std::ref(first_pic)), {"left", "right"});
|
||||
|
||||
|
||||
fill_custom_pics_types(pic_dlg, pics, first_pic);
|
||||
if(spec_scen_g.count() <= 10) {
|
||||
pic_dlg["left"].hide();
|
||||
|
@@ -273,7 +273,7 @@ void writeTerrainToXml(ticpp::Printer&& data) {
|
||||
|
||||
data.OpenElement("editor");
|
||||
if(ter.shortcut_key > 0)
|
||||
data.PushElement("shortcut", ter.shortcut_key);
|
||||
data.PushElement("shortcut", ter.shortcut_key);
|
||||
data.PushElement("ground", ter.ground_type);
|
||||
data.PushElement("trim-for", ter.trim_ter);
|
||||
if(ter.obj_num > 0) {
|
||||
@@ -303,7 +303,7 @@ void writeItemsToXml(ticpp::Printer&& data) {
|
||||
if(item.charges > 0)
|
||||
data.PushElement("charges", item.charges);
|
||||
if(isWeaponType(item.variety) && item.variety != eItemType::ARROW && item.variety != eItemType::BOLTS)
|
||||
data.PushElement("weapon-type", item.weap_type);
|
||||
data.PushElement("weapon-type", item.weap_type);
|
||||
data.PushElement("missile-type", item.missile);
|
||||
data.PushElement("pic", item.graphic_num);
|
||||
if(item.type_flag > 0)
|
||||
@@ -596,8 +596,6 @@ void writeTownToXml(ticpp::Printer&& data, cTown& town) {
|
||||
data.OpenElement("item");
|
||||
data.PushAttribute("id", i);
|
||||
data.PushElement("type", town.preset_items[i].code);
|
||||
if(town.preset_items[i].ability >= 0)
|
||||
data.PushElement("mod", town.preset_items[i].ability);
|
||||
if(town.preset_items[i].charges > 0)
|
||||
data.PushElement("charges", town.preset_items[i].charges);
|
||||
if(town.preset_items[i].always_there)
|
||||
|
@@ -56,44 +56,44 @@ rectangle right_sbar_rect;
|
||||
//Changed to ISO C specified argument and return type.
|
||||
int main(int, char* argv[]) {
|
||||
try {
|
||||
|
||||
init_directories(argv[0]);
|
||||
init_menubar();
|
||||
|
||||
init_current_terrain();
|
||||
Initialize();
|
||||
init_fileio();
|
||||
init_snd_tool();
|
||||
load_graphics();
|
||||
|
||||
cDialog::init();
|
||||
cDialog::defaultBackground = cDialog::BG_LIGHT;
|
||||
cDialog::doAnimations = true;
|
||||
init_graph_tool();
|
||||
|
||||
cen_x = 18;
|
||||
cen_y = 18;
|
||||
|
||||
run_startup_g();
|
||||
init_lb();
|
||||
init_rb();
|
||||
|
||||
make_cursor_sword();
|
||||
|
||||
Set_up_win();
|
||||
init_screen_locs();
|
||||
|
||||
shut_down_menus(0);
|
||||
|
||||
set_up_start_screen();
|
||||
|
||||
check_for_intel();
|
||||
redraw_screen();
|
||||
|
||||
while(!All_Done)
|
||||
Handle_One_Event();
|
||||
|
||||
close_program();
|
||||
|
||||
init_directories(argv[0]);
|
||||
init_menubar();
|
||||
|
||||
init_current_terrain();
|
||||
Initialize();
|
||||
init_fileio();
|
||||
init_snd_tool();
|
||||
load_graphics();
|
||||
|
||||
cDialog::init();
|
||||
cDialog::defaultBackground = cDialog::BG_LIGHT;
|
||||
cDialog::doAnimations = true;
|
||||
init_graph_tool();
|
||||
|
||||
cen_x = 18;
|
||||
cen_y = 18;
|
||||
|
||||
run_startup_g();
|
||||
init_lb();
|
||||
init_rb();
|
||||
|
||||
make_cursor_sword();
|
||||
|
||||
Set_up_win();
|
||||
init_screen_locs();
|
||||
|
||||
shut_down_menus(0);
|
||||
|
||||
set_up_start_screen();
|
||||
|
||||
check_for_intel();
|
||||
redraw_screen();
|
||||
|
||||
while(!All_Done)
|
||||
Handle_One_Event();
|
||||
|
||||
close_program();
|
||||
return 0;
|
||||
} catch(std::exception& x) {
|
||||
giveError(x.what());
|
||||
|
@@ -534,16 +534,16 @@ static bool edit_out_wand_event_filter(cDialog& me, std::string item_hit, short&
|
||||
cCreature store_m;
|
||||
if(item_hit == "left") {
|
||||
me.untoast();
|
||||
store_which_out_wand--;
|
||||
if(store_which_out_wand < 0) store_which_out_wand = 3;
|
||||
store_out_wand = (mode == 0) ? current_terrain->wandering[store_which_out_wand] : current_terrain->special_enc[store_which_out_wand];
|
||||
put_out_wand_in_dlog(me, store_which_out_wand, store_out_wand);
|
||||
store_which_out_wand--;
|
||||
if(store_which_out_wand < 0) store_which_out_wand = 3;
|
||||
store_out_wand = (mode == 0) ? current_terrain->wandering[store_which_out_wand] : current_terrain->special_enc[store_which_out_wand];
|
||||
put_out_wand_in_dlog(me, store_which_out_wand, store_out_wand);
|
||||
} else if(item_hit == "right") {
|
||||
me.untoast();
|
||||
store_which_out_wand++;
|
||||
if(store_which_out_wand > 3) store_which_out_wand = 0;
|
||||
store_out_wand = (mode == 0) ? current_terrain->wandering[store_which_out_wand] : current_terrain->special_enc[store_which_out_wand];
|
||||
put_out_wand_in_dlog(me, store_which_out_wand, store_out_wand);
|
||||
store_which_out_wand++;
|
||||
if(store_which_out_wand > 3) store_which_out_wand = 0;
|
||||
store_out_wand = (mode == 0) ? current_terrain->wandering[store_which_out_wand] : current_terrain->special_enc[store_which_out_wand];
|
||||
put_out_wand_in_dlog(me, store_which_out_wand, store_out_wand);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1174,14 +1174,14 @@ location pick_out(location default_loc) {
|
||||
bool new_town(short which_town) {
|
||||
std::cout << "Town creation currently disabled.\n";
|
||||
short i,j;
|
||||
|
||||
|
||||
cChoiceDlog new_dlg("new-town", {"okay", "cancel"});
|
||||
new_dlg->getControl("num").setTextToNum(which_town);
|
||||
if(new_dlg.show() == "cancel") return false;
|
||||
|
||||
std::string size = dynamic_cast<cLedGroup&>(new_dlg->getControl("size")).getSelected();
|
||||
std::string preset = dynamic_cast<cLedGroup&>(new_dlg->getControl("preset")).getSelected();
|
||||
|
||||
|
||||
if(size == "lg") scenario.towns.push_back(new cBigTown(scenario));
|
||||
else if(size == "med") scenario.towns.push_back(new cMedTown(scenario));
|
||||
else if(size == "sm") scenario.towns.push_back(new cTinyTown(scenario));
|
||||
@@ -1190,7 +1190,7 @@ bool new_town(short which_town) {
|
||||
town = scenario.towns[cur_town];
|
||||
scenario.last_town_edited = cur_town;
|
||||
town->town_name = new_dlg->getControl("name").getText().substr(0,30);
|
||||
|
||||
|
||||
for(i = 0; i < town->max_dim(); i++)
|
||||
for(j = 0; j < town->max_dim(); j++)
|
||||
if(preset == "cave") {
|
||||
|
Reference in New Issue
Block a user