overhauled physics engine

This commit is contained in:
Dynamitos
2023-01-21 18:43:21 +01:00
parent 3c7346cf7b
commit 2208ab438a
164 changed files with 22606 additions and 928 deletions
+3 -3
View File
@@ -16,21 +16,21 @@ TextureLoader::TextureLoader(Gfx::PGraphics graphics)
{
placeholderAsset = new TextureAsset(std::filesystem::absolute("./textures/placeholder.ktx"));
placeholderAsset->load();
AssetRegistry::get().textures[""] = placeholderAsset;
AssetRegistry::get().assetRoot.textures[""] = placeholderAsset;
}
TextureLoader::~TextureLoader()
{
}
void TextureLoader::importAsset(const std::filesystem::path& path)
void TextureLoader::importAsset(const std::filesystem::path& path, const std::string& importPath)
{
std::filesystem::path assetPath = path.filename();
assetPath.replace_extension("asset");
PTextureAsset asset = new TextureAsset(assetPath.generic_string());
asset->setStatus(Asset::Status::Loading);
asset->setTexture(placeholderAsset->getTexture());
AssetRegistry::get().registerTexture(asset);
AssetRegistry::get().registerTexture(asset, importPath);
import(path, asset);
}