void CData::Load() { fluids->LoadXml(PATHMANAGER::Data() + "/materials2/fluids.xml"); LogO(String("**** Loaded Fluids: ") + toStr(fluids->fls.size())); objs->LoadXml(); // collisions.xml LogO(String("**** Loaded Vegetation objects: ") + toStr(objs->colsMap.size())); std::string path = PATHMANAGER::GameConfigDir(); tracks->LoadIni(path + "/tracks.ini"); cars->LoadXml(path + "/cars.xml"); #ifdef SR_EDITOR pre->LoadXml(path + "/presets.xml"); LogO(String("**** Loaded Presets sky: ") + toStr(pre->sky.size())+ " ter: " + toStr(pre->ter.size()) + " road: " + toStr(pre->rd.size()) + " grass: " + toStr(pre->gr.size()) + " veget: " + toStr(pre->veg.size()) ); #else champs->LoadXml(path + "/championships.xml", tracks); LogO(String("**** Loaded Championships: ") + toStr(champs->all.size())); chall->LoadXml(path + "/challenges.xml", tracks); LogO(String("**** Loaded Challenges: ") + toStr(chall->all.size())); #endif }
void CData::Load(std::map <std::string, int>* surf_map, bool check) { // common fluids->LoadXml(PATHMANAGER::Data() + "/materials2/fluids.xml", /**/surf_map); LogO(String("**** Loaded Fluids: ") + toStr(fluids->fls.size())); objs->LoadXml(); // collisions.xml LogO(String("**** Loaded Vegetation objects: ") + toStr(objs->colsMap.size())); std::string snd = PATHMANAGER::Sounds(); reverbs->LoadXml(snd + "/reverbs.xml"); LogO(String("**** Loaded Reverbs sets: ") + toStr(reverbs->revs.size())); // cars and tracks std::string path = PATHMANAGER::GameConfigDir(); tracks->LoadIni(path + "/tracks.ini", check); cars->LoadXml(path + "/cars.xml"); #ifdef SR_EDITOR // ed pre->LoadXml(path + "/presets.xml"); LogO(String("**** Loaded Presets sky: ") + toStr(pre->sky.size())+ " ter: " + toStr(pre->ter.size()) + " road: " + toStr(pre->rd.size()) + " grass: " + toStr(pre->gr.size()) + " veget: " + toStr(pre->veg.size()) ); #else // game colors->LoadIni(path + "/colors.ini"); LogO(String("**** Loaded Car Colors: ") + toStr(colors->v.size())); champs->LoadXml(path + "/championships.xml", tracks, check); LogO(String("**** Loaded Championships: ") + toStr(champs->all.size())); chall->LoadXml(path + "/challenges.xml", tracks, check); LogO(String("**** Loaded Challenges: ") + toStr(chall->all.size())); #endif }