Optimization.

This commit is contained in:
momo5502 2016-01-22 20:49:52 +01:00
parent c55c3b7364
commit a4bc6ee8d5
3 changed files with 5 additions and 2 deletions

View File

@ -211,6 +211,11 @@ namespace Components
if (AssetHandler::AssetInterfaces.find(type) != AssetHandler::AssetInterfaces.end())
{
AssetHandler::AssetInterfaces[type]->Load(&header, filename, builder);
if (header.data)
{
Components::AssetHandler::StoreTemporaryAsset(type, header);
}
}
if (!header.data)

View File

@ -66,7 +66,6 @@ namespace Assets
break;
}
Components::AssetHandler::StoreTemporaryAsset(Game::XAssetType::ASSET_TYPE_IMAGE, { image });
header->image = image;
}

View File

@ -124,7 +124,6 @@ namespace Assets
material->textureCount = (char)textureList.size() & 0xFF;
}
Components::AssetHandler::StoreTemporaryAsset(Game::XAssetType::ASSET_TYPE_MATERIAL, { material });
header->material = material;
}