mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-06-28 03:48:07 +00:00
refactor: introduce subasset loading
This commit is contained in:
@@ -17,6 +17,12 @@ namespace
|
||||
"xmodelalias", "rawfile", "stringtable", "packindex", "xglobals", "ddl", "glasses",
|
||||
"emblemset",
|
||||
};
|
||||
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
|
||||
"technique",
|
||||
"vertexshader",
|
||||
"pixelshader",
|
||||
};
|
||||
} // namespace
|
||||
|
||||
namespace T5
|
||||
@@ -71,4 +77,17 @@ namespace T5
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
asset_type_t Game::GetSubAssetTypeCount() const
|
||||
{
|
||||
return SUB_ASSET_TYPE_COUNT;
|
||||
}
|
||||
|
||||
std::optional<const char*> Game::GetSubAssetTypeName(const asset_type_t subAssetType) const
|
||||
{
|
||||
if (subAssetType < std::extent_v<decltype(SUB_ASSET_TYPE_NAMES)>)
|
||||
return SUB_ASSET_TYPE_NAMES[subAssetType];
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
} // namespace T5
|
||||
|
||||
Reference in New Issue
Block a user