Updated all uses of EntityXMLFile to use the new EntityFile to load entities into a world.

This commit is contained in:
2016-03-02 20:12:59 +01:00
parent 3ef15dcb81
commit 7624c6ee0a
17 changed files with 41 additions and 60 deletions
+2 -5
View File
@@ -82,11 +82,8 @@ Game::Game(int argc, char* argv[])
m_World = new World(m_EventBroker);
std::string mapToLoad = m_Config->Get<std::string>("Debug.LoadMap", "");
if (!mapToLoad.empty()) {
auto file = ResourceManager::Load<EntityXMLFile>(mapToLoad);
EntityXMLFilePreprocessor fpp(file);
fpp.RegisterComponents(m_World);
EntityXMLFileParser fp(file);
fp.MergeEntities(m_World);
auto file = ResourceManager::Load<EntityFile>(mapToLoad);
file->MergeInto(m_World);
}
// Create the sound manager