mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-02-10 17:43:03 +00:00
feat: add external image loader for every supported game
This commit is contained in:
@@ -49,7 +49,8 @@ namespace
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return image::LoadIwi(*filePathImage.m_stream);
|
||||
auto loadResult = image::LoadIwi(*filePathImage.m_stream);
|
||||
return loadResult ? std::move(loadResult->m_texture) : nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<Texture> LoadImageData(ISearchPath& searchPath, const GfxImage& image)
|
||||
|
||||
@@ -46,7 +46,8 @@ namespace
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return image::LoadIwi(*filePathImage.m_stream);
|
||||
auto loadResult = image::LoadIwi(*filePathImage.m_stream);
|
||||
return loadResult ? std::move(loadResult->m_texture) : nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<Texture> LoadImageData(ISearchPath& searchPath, const GfxImage& image)
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return image::LoadIwi(*filePathImage.m_stream);
|
||||
auto loadResult = image::LoadIwi(*filePathImage.m_stream);
|
||||
return loadResult ? std::move(loadResult->m_texture) : nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<Texture> LoadImageData(ISearchPath& searchPath, const GfxImage& image)
|
||||
|
||||
@@ -46,7 +46,8 @@ namespace
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return image::LoadIwi(*filePathImage.m_stream);
|
||||
auto loadResult = image::LoadIwi(*filePathImage.m_stream);
|
||||
return loadResult ? std::move(loadResult->m_texture) : nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<Texture> LoadImageData(ISearchPath& searchPath, const GfxImage& image)
|
||||
|
||||
@@ -47,11 +47,11 @@ namespace
|
||||
|
||||
if (ipakStream)
|
||||
{
|
||||
auto loadedTexture = image::LoadIwi(*ipakStream);
|
||||
auto loadResult = image::LoadIwi(*ipakStream);
|
||||
ipakStream->close();
|
||||
|
||||
if (loadedTexture != nullptr)
|
||||
return loadedTexture;
|
||||
if (loadResult)
|
||||
return std::move(loadResult->m_texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,8 @@ namespace
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return image::LoadIwi(*filePathImage.m_stream);
|
||||
auto loadResult = image::LoadIwi(*filePathImage.m_stream);
|
||||
return loadResult ? std::move(loadResult->m_texture) : nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<Texture> LoadImageData(ISearchPath& searchPath, const GfxImage& image)
|
||||
|
||||
Reference in New Issue
Block a user