Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/radix/data/map/XmlMapLoader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class XmlMapLoader : public MapLoader {
*/
void extractSpawn();
void extractLights();
void extractDoor();
void extractWalls();
void extractAcids();
void extractDestinations();
Expand Down
19 changes: 1 addition & 18 deletions source/data/map/XmlMapLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ void XmlMapLoader::load(const std::string &path) {

extractMaterials();
extractSpawn();
extractDoor();
extractModels();
extractLights();
extractWalls();
Expand Down Expand Up @@ -132,23 +131,6 @@ void XmlMapLoader::extractLights() {
}
}

void XmlMapLoader::extractDoor() {
PROFILER_BLOCK("XmlMapLoader::extractDoor", profiler::colors::Red100);
tinyxml2::XMLElement *endElement = rootHandle.FirstChildElement("end").ToElement();

if (endElement) {
entities::StaticModel &door = world.entityManager.create<entities::StaticModel>();
Vector3f position;
XmlHelper::extractPosition(endElement, position);
door.setPosition(position);
Vector3f angles;
XmlHelper::extractRotation(endElement, angles);
door.setOrientation(Quaternion().fromAero(angles));
door.material = MaterialLoader::loadFromXML("door/door");
door.mesh = MeshLoader::getMesh("Door.obj");
}
}

void XmlMapLoader::extractWalls() {
PROFILER_BLOCK("XmlMapLoader::extractWalls", profiler::colors::Red100);
tinyxml2::XMLElement *wallBoxElement = rootHandle.FirstChildElement("wall").ToElement();
Expand Down Expand Up @@ -263,4 +245,5 @@ void XmlMapLoader::extractModels() {
} while ((modelElement = modelElement->NextSiblingElement("model")) != nullptr);
}
}

} /* namespace radix */