void sConfigData::get_slave_market_data(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("UniqueMarket")) get_att(el, "UniqueMarket", &slavemarket.unique_market); if (pt = el->Attribute("SlavesNewWeeklyMin")) get_att(el, "SlavesNewWeeklyMin", &slavemarket.slavesnewweeklymin); if (pt = el->Attribute("SlavesNewWeeklyMax")) get_att(el, "SlavesNewWeeklyMax", &slavemarket.slavesnewweeklymax); }
void sConfigData::get_font_data(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("Normal")) get_att(el, "Normal", fonts.normal); if (pt = el->Attribute("Fixed")) get_att(el, "Fixed", fonts.fixed); if (pt = el->Attribute("Antialias")) get_att(el, "Antialias", fonts.antialias); if (pt = el->Attribute("ShowPercent")) get_att(el, "ShowPercent", fonts.showpercent); }
void sConfigData::get_tax_factors(TiXmlElement *el) { const char *pt; /* * we expect these in the format "25%" with the "%" being optional * The trailing % will be chopped off by tinyxml, * but we still need to divide by 100 to turn the numbers * from a percentage to a floating point factor */ if (pt = el->Attribute("Rate")) { get_att(el, "Rate", &tax.rate); tax.rate /= 100.0; } if (pt = el->Attribute("Minimum")) { get_att(el, "Minimum", &tax.minimum); tax.minimum /= 100.0; } if (pt = el->Attribute("Laundry")) { get_att(el, "Laundry", &tax.laundry); tax.laundry /= 100.0; } }
void sConfigData::get_resolution_data(TiXmlElement *el) { resolution.configXML = false; const char *pt; string testa = ""; if (pt = el->Attribute("Resolution")) get_att(el, "Resolution", testa); if (testa != "") { DirPath location = DirPath() << "Resources" << "Interface" << testa; XMLFileList test(location, "*.xml"); if (test.size() > 0) { resolution.resolution = testa; l.ss() << "Success: config.xml: Loading Interface: " << location.c_str(); l.ssend(); } else { l.ss() << "\n\nWarning: config.xml:\n'Resolution' attribute points to an invalid interface folder:\ndefaulting to 'J_1024x768'\n\n"; l.ssend(); } } else { l.ss() << "\n\nWarning: config.xml: No Resolution specified, using defaults.\n\n"; l.ssend(); } if (pt = el->Attribute("Width")) { get_att(el, "Width", &resolution.width); resolution.configXML = true; } if (pt = el->Attribute("Height")) { get_att(el, "Height", &resolution.height); resolution.configXML = true; } if (pt = el->Attribute("ScaleWidth")) { get_att(el, "ScaleWidth", &resolution.scalewidth); } if (pt = el->Attribute("ScaleHeight")) { get_att(el, "ScaleHeight", &resolution.scaleheight); } if (pt = el->Attribute("FullScreen")) { get_att(el, "FullScreen", resolution.fullscreen); } if (pt = el->Attribute("ListScrollAmount")) { get_att(el, "ListScrollAmount", &resolution.list_scroll); } if (pt = el->Attribute("TextScrollAmount")) { get_att(el, "TextScrollAmount", &resolution.text_scroll); } }
void sConfigData::get_gambling_factors(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("Odds")) get_att(el, "Odds", &gamble.odds); if (pt = el->Attribute("Base")) get_att(el, "Base", &gamble.base); if (pt = el->Attribute("Spread")) get_att(el, "Spread", &gamble.spread); /* * strictly, we only need one of these: * a customer factor OR a house factor * but I thought it might be easier to explain * if each had its own multiplier */ if (pt = el->Attribute("CustomerFactor")) get_att(el, "CustomerFactor", &gamble.customer_factor); if (pt = el->Attribute("HouseFactor")) get_att(el, "HouseFactor", &gamble.house_factor); }
/** @param fname Name of file to load from (eg, an overlap matrix file) @param vname Eg: "grid1" or "grid2" */ void Proj2::read_from_netcdf( NcFile &nc, NcVar *info_var, std::string const &vname) { sproj = std::string(get_att(info_var, vname.c_str())->as_string(0)); if (sproj == "") { clear(); } else { std::string sdir(std::string(get_att(info_var, (vname + ".direction").c_str())->as_string(0))); if (sdir == "xy2ll") direction = Direction::XY2LL; else if (sdir == "ll2xy") direction = Direction::LL2XY; else throw std::exception(); } }
void edit_typeset_rep::get_data (new_data& data) { data->style= get_style (); data->init = get_init (); data->fin = get_fin (); data->att = get_att (); }
NcAtt* NcVar::get_att( int n ) const { if (n < 0 || n >= num_atts()) return 0; NcToken aname = attname(n); NcAtt* ap = get_att(aname); delete [] (char*)aname; return ap; }
void sConfigData::get_gang_factors(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("MaxRecruitList")) get_att(el, "MaxRecruitList", &gangs.max_recruit_list); if (pt = el->Attribute("StartRandom")) get_att(el, "StartRandom", &gangs.start_random); if (pt = el->Attribute("StartBoosted")) get_att(el, "StartBoosted", &gangs.start_boosted); if (pt = el->Attribute("InitMemberMin")) get_att(el, "InitMemberMin", &gangs.init_member_min); if (pt = el->Attribute("InitMemberMax")) get_att(el, "InitMemberMax", &gangs.init_member_max); if (pt = el->Attribute("ChanceRemoveUnwanted")) get_att(el, "ChanceRemoveUnwanted", &gangs.chance_remove_unwanted); if (pt = el->Attribute("AddNewWeeklyMin")) get_att(el, "AddNewWeeklyMin", &gangs.add_new_weekly_min); if (pt = el->Attribute("AddNewWeeklyMax")) get_att(el, "AddNewWeeklyMax", &gangs.add_new_weekly_max); }
void sConfigData::get_debug_flags(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("LogAll")) get_att(el, "LogItems", debug.log_all); if (debug.log_all) debug.log_girls = debug.log_rgirls = debug.log_girl_fights = debug.log_items = debug.log_fonts = debug.log_torture = debug.log_debug = debug.log_extra_details = debug.log_show_numbers = debug.log_all; else { if (pt = el->Attribute("LogGirls")) get_att(el, "LogGirls", debug.log_girls); if (pt = el->Attribute("LogRGirls")) get_att(el, "LogRGirls", debug.log_rgirls); if (pt = el->Attribute("LogGirlFights")) get_att(el, "LogGirlFights", debug.log_girl_fights); if (pt = el->Attribute("LogItems")) get_att(el, "LogItems", debug.log_items); if (pt = el->Attribute("LogFonts")) get_att(el, "LogFonts", debug.log_fonts); if (pt = el->Attribute("LogTorture")) get_att(el, "LogTorture", debug.log_torture); if (pt = el->Attribute("LogDebug")) get_att(el, "LogDebug", debug.log_debug); if (pt = el->Attribute("LogExtraDetails")) get_att(el, "LogExtraDetails", debug.log_extra_details); if (pt = el->Attribute("LogShowNumbers")) get_att(el, "LogShowNumbers", debug.log_show_numbers); } }
// `J` get_item_data will be obsolete for .06 after Rarity Colors are moved to interfaces. void sConfigData::get_item_data(TiXmlElement *el) { const char *pt; // `J` AutoCombatEquip has been moved to initial. Kept here for legacy. if (pt = el->Attribute("AutoCombatEquip")) get_att(el, "AutoCombatEquip", initial.auto_combat_equip); // `J` Rarity Colors will be moved to interfaces. Kept here for legacy. for (int i = 0; i<NUM_ITEM_RARITY; i++) { string ColorIn; stringstream ss; ss.str(""); ss << "RarityColor" << i; if (pt = el->Attribute(ss.str().c_str())) get_att(el, ss.str().c_str(), ColorIn); { get_att(el, ss.str().c_str(), ColorIn); ColorConvert.HexToSDLColor(ColorIn, items.rarity_color[i]); } } }
void sConfigData::get_catacombs_data(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("UniqueCatacombs")) get_att(el, "UniqueCatacombs", &catacombs.unique_catacombs); // load them if (pt = el->Attribute("ControlGirls")) get_att(el, "ControlGirls", catacombs.control_girls); if (pt = el->Attribute("ControlGangs")) get_att(el, "ControlGangs", catacombs.control_gangs); if (pt = el->Attribute("GirlGetsGirls")) get_att(el, "GirlGetsGirls", &catacombs.girl_gets_girls); if (pt = el->Attribute("GirlGetsItems")) get_att(el, "GirlGetsItems", &catacombs.girl_gets_items); if (pt = el->Attribute("GirlGetsBeast")) get_att(el, "GirlGetsBeast", &catacombs.girl_gets_beast); if (pt = el->Attribute("GangGetsGirls")) get_att(el, "GangGetsGirls", &catacombs.gang_gets_girls); if (pt = el->Attribute("GangGetsItems")) get_att(el, "GangGetsItems", &catacombs.gang_gets_items); if (pt = el->Attribute("GangGetsBeast")) get_att(el, "GangGetsBeast", &catacombs.gang_gets_beast); // make them positive if (catacombs.girl_gets_girls < 0) catacombs.girl_gets_girls = -catacombs.girl_gets_girls; if (catacombs.girl_gets_items < 0) catacombs.girl_gets_items = -catacombs.girl_gets_items; if (catacombs.girl_gets_beast < 0) catacombs.girl_gets_beast = -catacombs.girl_gets_beast; if (catacombs.gang_gets_girls < 0) catacombs.gang_gets_girls = -catacombs.gang_gets_girls; if (catacombs.gang_gets_items < 0) catacombs.gang_gets_items = -catacombs.gang_gets_items; if (catacombs.gang_gets_beast < 0) catacombs.gang_gets_beast = -catacombs.gang_gets_beast; // make them percents double checkggirl = catacombs.girl_gets_girls + catacombs.girl_gets_items + catacombs.girl_gets_beast; if (checkggirl == 0) catacombs.girl_gets_girls = catacombs.girl_gets_items = catacombs.girl_gets_beast = (100 / 3); else if (checkggirl != 100) { catacombs.girl_gets_girls = (100.0 / checkggirl) * catacombs.girl_gets_girls; catacombs.girl_gets_items = (100.0 / checkggirl) * catacombs.girl_gets_items; catacombs.girl_gets_beast = 100.0 - catacombs.girl_gets_girls - catacombs.girl_gets_items; } double checkggang = catacombs.gang_gets_girls + catacombs.gang_gets_items + catacombs.gang_gets_beast; if (checkggang == 0) catacombs.gang_gets_girls = catacombs.gang_gets_items = catacombs.gang_gets_beast = (100 / 3); else if (checkggang != 100) { catacombs.gang_gets_girls = (100.0 / checkggang) * catacombs.gang_gets_girls; catacombs.gang_gets_items = (100.0 / checkggang) * catacombs.gang_gets_items; catacombs.gang_gets_beast = 100.0 - catacombs.gang_gets_girls - catacombs.gang_gets_items; } }
void WED_Select::StartElement( WED_XMLReader * reader, const XML_Char * name, const XML_Char ** atts) { if(strcasecmp(name,"sel")==0) { const XML_Char * id = get_att("id",atts); if(!id) reader->FailWithError("No id"); else mSelected.insert(atoi(id)); } else if(strcasecmp(name,"selection")==0) { mSelected.clear(); } else WED_Thing::StartElement(reader,name,atts); }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ void cKdtree::m_draw_rec(cNodeKdtree *node, VVector &eye) { if(!node) return; if(!node->back && !node->front) { // eh uma folha m_draw_node(node); return; } VVector nor, p; get_att(node->axis, node->axis_value, nor, p); //int t = node->tri; int s = calculate_side(nor, p, eye); if(s == FRONT) { // estou na frente do no m_draw_rec(node->back, eye); //m_draw_node(node); m_draw_rec(node->front, eye); } else if(s == BACK) { //estou atras do no m_draw_rec(node->front, eye); //m_draw_node(node); m_draw_rec(node->back, eye); } else { m_draw_rec(node->front, eye); m_draw_rec(node->back, eye); } }
void sConfigData::get_folders_data(TiXmlElement *el) { const char *pt; folders.configXMLch = false; folders.configXMLsa = false; folders.backupsaves = false; folders.configXMLdi = false; folders.preferdefault = false; string testch = "", testsa = "", testdi = ""; if (pt = el->Attribute("Characters")) get_att(el, "Characters", testch); if (pt = el->Attribute("Saves")) get_att(el, "Saves", testsa); if (pt = el->Attribute("BackupSaves")) get_att(el, "BackupSaves", folders.backupsaves); if (pt = el->Attribute("DefaultImages")) get_att(el, "DefaultImages", testdi); if (pt = el->Attribute("PreferDefault")) get_att(el, "PreferDefault", folders.preferdefault); if (testch != "") { DirPath locationch = DirPath() << testch; XMLFileList test(locationch, "*.*girlsx"); if (test.size() > 0) { folders.characters = testch; l.ss() << "Success: config.xml: Loading Characters from: " << locationch << "\n"; l.ssend(); folders.configXMLch = true; } else { l.ss() << "\n\nWarning: config.xml: Characters folder '" << locationch << "' does not exist or has no girls in it.\nDefaulting to ./Resources/Characters\n\n"; l.ssend(); } } if (testsa != "") { DirPath locationsa = DirPath() << testsa; FILE *fp; DirPath testloc = DirPath() << testsa << ".W***e Master Save Games folder"; if ((fp = fopen(testloc, "w")) != 0) { fclose(fp); } XMLFileList test(locationsa, "*.*"); if (test.size() > 0) { folders.saves = testsa; l.ss() << "Success: config.xml: Loading Saves from: " << locationsa << "\n"; l.ssend(); folders.configXMLsa = true; } else { l.ss() << "\n\nWarning: config.xml: Save game folder '" << locationsa << "' does not exist.\nDefaulting to ./Saves\n\n"; l.ssend(); } } if (testdi != "") { DirPath locationdi = DirPath() << testdi; XMLFileList testdig(locationdi, "*.*g"); XMLFileList testdia(locationdi, "*.ani"); if (testdig.size() > 0 || testdia.size() > 0) { folders.defaultimageloc = testdi; l.ss() << "Success: config.xml: Loading Default Images from: " << locationdi; l.ssend(); folders.configXMLdi = true; } else { l.ss() << "\n\nWarning: config.xml: Default Images folder '" << locationdi << "' does not exist or has no images in it.\n\n"; l.ssend(); } } }
inline bool get_att_as_bool(NcVar *var, KeyT key) { return nc_str_to_bool(get_att(var, key)->as_string(0)); }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ cNodeKdtree* cKdtree::m_insert_rec(std::vector<cTriangle> &vet_tri, std::vector<VVector> &vet_vertex, std::vector<VVector> &vet_nor, int depth) { cNodeKdtree *node = NULL; if(vet_tri.empty()) { // ja eh uma folha return node; } if((int)vet_tri.size() == 1) { // vai ser a folha // insere no noh o indice do triangulo node = new cNodeKdtree(); add_triangle(vet_vertex[vet_tri[0].m_v[0]], vet_vertex[vet_tri[0].m_v[1]], vet_vertex[vet_tri[0].m_v[2]], m_data_tri, m_data_vet, m_data_nor); node->is_leaf = true; node->tri = (int) m_data_tri.size() - 1; return node; } std::vector<cTriangle> vet_tri_front; std::vector<VVector> vet_vertex_front, vet_nor_front; std::vector<cTriangle> vet_tri_back; std::vector<VVector> vet_vertex_back, vet_nor_back; // escolher o eixo e o valor do eixo int axis, axis_value; selected_plane_kdtree(vet_tri, vet_vertex, vet_nor, axis, axis_value, depth); printf("Axis: %d\tvalue: %d\n", axis, axis_value); VVector normal_plane, point; get_att(axis, axis_value, normal_plane, point); // cria o noh node = new cNodeKdtree(); node->is_leaf = false; node->axis = axis; node->axis_value = axis_value; vet_tri_front.clear(); vet_vertex_front.clear(); vet_nor_front.clear(); vet_tri_back.clear(); vet_vertex_back.clear(); vet_nor_back.clear(); // separar os triangulos for(int i = 0; i < (int)vet_tri.size(); i++) { int side = calculate_side(normal_plane, point, vet_vertex[vet_tri[i].m_v[0]], vet_vertex[vet_tri[i].m_v[1]], vet_vertex[vet_tri[i].m_v[2]]); if(side == CUT) { cut_triangle(normal_plane, point, i, vet_tri, vet_vertex, vet_nor, vet_tri_front, vet_vertex_front, vet_nor_front, vet_tri_back, vet_vertex_back, vet_nor_back); } else if(side == FRONT) { add_triangle(vet_vertex[vet_tri[i].m_v[0]], vet_vertex[vet_tri[i].m_v[1]], vet_vertex[vet_tri[i].m_v[2]], vet_tri_front, vet_vertex_front, vet_nor_front); } else// if(side == BACK) { add_triangle(vet_vertex[vet_tri[i].m_v[0]], vet_vertex[vet_tri[i].m_v[1]], vet_vertex[vet_tri[i].m_v[2]], vet_tri_back, vet_vertex_back, vet_nor_back); } } //vet_tri.clear(); vet_vertex.clear(); vet_nor.clear(); node->front = m_insert_rec(vet_tri_front, vet_vertex_front, vet_nor_front, depth + 1); node->back = m_insert_rec(vet_tri_back, vet_vertex_back, vet_nor_back, depth + 1); //vet_tri_front.clear(); vet_vertex_front.clear(); vet_nor_front.clear(); //vet_tri_back.clear(); vet_vertex_back.clear(); vet_nor_back.clear(); return node; }
void sConfigData::get_initial_values(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("Gold")) get_att(el, "Gold", &initial.gold); if (pt = el->Attribute("GirlMeet")) get_att(el, "GirlMeet", &initial.girl_meet); if (pt = el->Attribute("GirlsHousePerc")) get_att(el, "GirlsHousePerc", &initial.girls_house_perc); // `J` added if (pt = el->Attribute("GirlsKeepTips")) get_att(el, "GirlsKeepTips", initial.girls_keep_tips); // `J` added if (pt = el->Attribute("SlavePayOutOfPocket")) get_att(el, "SlavePayOutOfPocket", initial.slave_pay_outofpocket); // `J` added if (pt = el->Attribute("SlaveHousePerc")) get_att(el, "SlaveHousePerc", &initial.slave_house_perc); if (pt = el->Attribute("SlaveKeepTips")) get_att(el, "SlaveKeepTips", initial.slave_keep_tips); // `J` added if (pt = el->Attribute("GirlsAccom")) get_att(el, "GirlsAccom", &initial.girls_accom); if (pt = el->Attribute("SlaveAccom")) get_att(el, "SlaveAccom", &initial.slave_accom); if (pt = el->Attribute("AutoUseItems")) get_att(el, "AutoUseItems", initial.auto_use_items); if (pt = el->Attribute("AutoCombatEquip")) get_att(el, "AutoCombatEquip", initial.auto_combat_equip); // `J` moved from items if (pt = el->Attribute("TortureTraitWeekMod")) get_att(el, "TortureTraitWeekMod", &initial.torture_mod); if (pt = el->Attribute("HoroscopeType")) get_att(el, "HoroscopeType", &initial.horoscopetype); }
void sConfigData::get_income_factors(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("ExtortionIncome")) get_att(el, "ExtortionIncome", &in_fact.extortion); // `J` ?not used? if (pt = el->Attribute("GirlsWorkBrothel")) get_att(el, "GirlsWorkBrothel", &in_fact.brothel_work); // `J` ?not used? if (pt = el->Attribute("GirlsWorkStreet")) get_att(el, "GirlsWorkStreet", &in_fact.street_work); // `J` ?not used? if (pt = el->Attribute("MovieIncome")) get_att(el, "MovieIncome", &in_fact.movie_income); // `J` ?not used? if (pt = el->Attribute("StripperIncome")) get_att(el, "StripperIncome", &in_fact.stripper_work); // `J` ?not used? if (pt = el->Attribute("BarmaidIncome")) get_att(el, "BarmaidIncome", &in_fact.barmaid_work); // `J` ?not used? if (pt = el->Attribute("SlaveSales")) get_att(el, "SlaveSales", &in_fact.slave_sales); if (pt = el->Attribute("ItemSales")) get_att(el, "ItemSales", &in_fact.item_sales); // `J` ?not used? if (pt = el->Attribute("ClinicIncome")) get_att(el, "ClinicIncome", &in_fact.clinic_income); // `J` ?not used? if (pt = el->Attribute("ArenaIncome")) get_att(el, "ArenaIncome", &in_fact.arena_income); // `J` ?not used? if (pt = el->Attribute("FarmIncome")) get_att(el, "FarmIncome", &in_fact.farm_income); // `J` ?not used? }
void sConfigData::get_expense_factors(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("Training")) get_att(el, "Training", &out_fact.training); if (pt = el->Attribute("MovieCost")) get_att(el, "MovieCost", &out_fact.movie_cost); if (pt = el->Attribute("ActressWages")) get_att(el, "ActressWages", &out_fact.actress_wages); // `J` ?not used? if (pt = el->Attribute("GoonWages")) get_att(el, "GoonWages", &out_fact.goon_wages); if (pt = el->Attribute("MatronWages")) get_att(el, "MatronWages", &out_fact.matron_wages); if (pt = el->Attribute("StaffWages")) get_att(el, "StaffWages", &out_fact.staff_wages); // `J` ?not used? if (pt = el->Attribute("GirlSupport")) get_att(el, "GirlSupport", &out_fact.girl_support); // `J` ?not used? if (pt = el->Attribute("Consumables")) get_att(el, "Consumables", &out_fact.consumables); if (pt = el->Attribute("Items")) get_att(el, "Items", &out_fact.item_cost); if (pt = el->Attribute("SlavesBought")) get_att(el, "SlavesBought", &out_fact.slave_cost); if (pt = el->Attribute("BuyBrothel")) get_att(el, "BuyBrothel", &out_fact.brothel_cost); if (pt = el->Attribute("BrothelSupport")) get_att(el, "BrothelSupport", &out_fact.brothel_support); if (pt = el->Attribute("BarSupport")) get_att(el, "BarSupport", &out_fact.bar_cost); // `J` ?not used? if (pt = el->Attribute("CasinoSupport")) get_att(el, "CasinoSupport", &out_fact.casino_cost); // `J` ?not used? if (pt = el->Attribute("Bribes")) get_att(el, "Bribes", &out_fact.bribes); // `J` ?not used? if (pt = el->Attribute("Fines")) get_att(el, "Fines", &out_fact.fines); // `J` ?not used? if (pt = el->Attribute("Advertising")) get_att(el, "Advertising", &out_fact.advertising); }
void sConfigData::get_preg_factors(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("PlayerChance")) get_att(el, "PlayerChance", &pregnancy.player_chance); if (pt = el->Attribute("CustomerChance")) get_att(el, "CustomerChance", &pregnancy.customer_chance); if (pt = el->Attribute("MonsterChance")) get_att(el, "MonsterChance", &pregnancy.monster_chance); if (pt = el->Attribute("GoodSexFactor")) get_att(el, "GoodSexFactor", &pregnancy.good_sex_factor); if (pt = el->Attribute("ChanceOfGirl")) get_att(el, "ChanceOfGirl", &pregnancy.chance_of_girl); if (pt = el->Attribute("WeeksPregnant")) get_att(el, "WeeksPregnant", &pregnancy.weeks_pregnant); if (pt = el->Attribute("WeeksMonsterP")) get_att(el, "WeeksMonsterP", &pregnancy.weeks_monster_p); // `J` added if (pt = el->Attribute("MiscarriageChance")) get_att(el, "MiscarriageChance", &pregnancy.miscarriage_chance); // `J` added if (pt = el->Attribute("MiscarriageMonster")) get_att(el, "MiscarriageMonster", &pregnancy.miscarriage_monster); // `J` added if (pt = el->Attribute("WeeksTillGrown")) get_att(el, "WeeksTillGrown", &pregnancy.weeks_till_grown); if (pt = el->Attribute("CoolDown")) get_att(el, "CoolDown", &pregnancy.cool_down); if (pt = el->Attribute("AntiPregFailure")) get_att(el, "AntiPregFailure", &pregnancy.anti_preg_failure); if (pt = el->Attribute("MultiBirthChance")) get_att(el, "MultiBirthChance", &pregnancy.multi_birth_chance); // `J` added if (pregnancy.multi_birth_chance > 50) pregnancy.multi_birth_chance = 50; // `J` limited }
void sConfigData::get_pros_factors(TiXmlElement *el) { const char *pt; if (pt = el->Attribute("RapeStreet")) get_att(el, "RapeStreet", &prostitution.rape_streets); if (pt = el->Attribute("RapeBrothel")) get_att(el, "RapeBrothel", &prostitution.rape_brothel); }