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

Function CheckGenericType

Source/XML/level_loader.cpp:802–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802EntityType CheckGenericType(TiXmlDocument& doc) {
803 TiXmlHandle hDoc(&doc);
804 TiXmlNode* pNode;
805
806 pNode = hDoc.FirstChild("Object").ToNode();
807 if (pNode != NULL) return _env_object;
808
809 pNode = hDoc.FirstChild("Actor").ToNode();
810 if (pNode != NULL) return _movement_object;
811
812 pNode = hDoc.FirstChild("Sound").ToNode();
813 if (pNode != NULL) return _ambient_sound_object;
814
815 pNode = hDoc.FirstChild("item").ToNode();
816 if (pNode != NULL) return _item_object;
817
818 pNode = hDoc.FirstChild("DecalObject").ToNode();
819 if (pNode != NULL) return _decal_object;
820
821 pNode = hDoc.FirstChild("Hotspot").ToNode();
822 if (pNode != NULL) return _hotspot_object;
823
824 return _no_type;
825}

Callers 1

LoadGenericEntityFunction · 0.85

Calls 2

ToNodeMethod · 0.80
FirstChildMethod · 0.45

Tested by

no test coverage detected