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

Function LoadEntityDescriptionFromXML

Source/Game/EntityDescription.cpp:1197–1303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1195}
1196
1197void LoadEntityDescriptionFromXML(EntityDescription& desc, const TiXmlElement* el) {
1198 const char* type = el->Value();
1199 switch (type[0]) {
1200 case 'A':
1201 switch (type[1]) {
1202 case 'c':
1203 if (strcmp(type, "ActorObject") == 0) {
1204 LoadActorFromXML(desc, el, _movement_object);
1205 }
1206 break;
1207 case 'm':
1208 if (strcmp(type, "AmbientSoundObject") == 0) {
1209 LoadActorFromXML(desc, el, _ambient_sound_object);
1210 }
1211 break;
1212 }
1213 break;
1214 case 'C':
1215 if (strcmp(type, "CameraObject") == 0) {
1216 LoadActorFromXML(desc, el, _camera_type);
1217 }
1218 break;
1219 case 'D':
1220 switch (type[1]) {
1221 case 'e':
1222 if (strcmp(type, "Decal") == 0) {
1223 LoadDecalDescriptionFromXML(desc, el);
1224 }
1225 break;
1226 case 'y':
1227 if (strcmp(type, "DynamicLightObject") == 0) {
1228 LoadActorFromXML(desc, el, _dynamic_light_object);
1229 }
1230 break;
1231 }
1232 break;
1233 case 'E':
1234 if (strcmp(type, "EnvObject") == 0) {
1235 LoadEnvDescriptionFromXML(desc, el);
1236 }
1237 break;
1238 case 'G':
1239 if (strcmp(type, "Group") == 0) {
1240 LoadGroupDescriptionFromXML(desc, el);
1241 }
1242 break;
1243 case 'H':
1244 if (strcmp(type, "Hotspot") == 0) {
1245 LoadHotspotFromXML(desc, el);
1246 }
1247 break;
1248 case 'I':
1249 if (strcmp(type, "ItemObject") == 0) {
1250 LoadActorFromXML(desc, el, _item_object);
1251 }
1252 break;
1253 case 'L':
1254 switch (type[5]) {

Callers 1

Calls 7

LoadActorFromXMLFunction · 0.85
LoadHotspotFromXMLFunction · 0.85
ValueMethod · 0.45

Tested by

no test coverage detected