MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / LoadGenericEntity

Function LoadGenericEntity

Source/Editors/actors_editor.cpp:85–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83extern bool shadow_cache_dirty;
84
85void LoadGenericEntity(const Path& path, EntityDescriptionList& desc_list) {
86 TiXmlDocument doc(path.GetFullPath());
87 if (!doc.LoadFile()) {
88 DisplayError("Error", ("Bad xml format in " + path.GetFullPathStr()).c_str());
89 return;
90 }
91 EntityType type = CheckGenericType(doc);
92 EntityDescription desc;
93 desc.AddEntityType(EDF_ENTITY_TYPE, type);
94 desc.AddString(EDF_FILE_PATH, path.GetOriginalPath());
95 desc_list.push_back(desc);
96}
97
98void LoadGenericEntity(const std::string& rel_path, EntityDescriptionList& desc_list) {
99 Path p = FindFilePath(rel_path.c_str(), kDataPaths | kModPaths | kAbsPath);

Callers 1

Calls 12

CheckGenericTypeFunction · 0.85
FindFilePathFunction · 0.85
GetFullPathMethod · 0.80
GetFullPathStrMethod · 0.80
AddEntityTypeMethod · 0.80
GetOriginalPathMethod · 0.80
DisplayErrorFunction · 0.50
LoadFileMethod · 0.45
c_strMethod · 0.45
AddStringMethod · 0.45
push_backMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected