2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-04 02:01:51 +00:00

chore: add force loading of assets

This commit is contained in:
Jan
2025-01-21 23:11:37 +01:00
parent b4194eff28
commit 990bfe27df
4 changed files with 90 additions and 7 deletions

View File

@ -93,6 +93,11 @@ XAssetInfoGeneric::XAssetInfoGeneric(const asset_type_t type,
{
}
bool XAssetInfoGeneric::IsReference() const
{
return !m_name.empty() && m_name[0] == ',';
}
std::string XAssetInfoGeneric::NormalizeAssetName(std::string input)
{
utils::MakeStringLowerCase(input);

View File

@ -54,6 +54,8 @@ public:
XAssetInfoGeneric& operator=(const XAssetInfoGeneric& other) = default;
XAssetInfoGeneric& operator=(XAssetInfoGeneric&& other) noexcept = default;
[[nodiscard]] bool IsReference() const;
static std::string NormalizeAssetName(std::string input);
asset_type_t m_type;
@ -87,7 +89,7 @@ public:
std::vector<scr_string_t> usedScriptStrings,
std::vector<IndirectAssetReference> indirectAssetReferences)
: XAssetInfoGeneric(
type, std::move(name), static_cast<void*>(ptr), std::move(dependencies), std::move(usedScriptStrings), std::move(indirectAssetReferences))
type, std::move(name), static_cast<void*>(ptr), std::move(dependencies), std::move(usedScriptStrings), std::move(indirectAssetReferences))
{
}
@ -99,7 +101,7 @@ public:
std::vector<IndirectAssetReference> indirectAssetReferences,
Zone* zone)
: XAssetInfoGeneric(
type, std::move(name), static_cast<void*>(ptr), std::move(dependencies), std::move(usedScriptStrings), std::move(indirectAssetReferences), zone)
type, std::move(name), static_cast<void*>(ptr), std::move(dependencies), std::move(usedScriptStrings), std::move(indirectAssetReferences), zone)
{
}