mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-02-14 03:13:03 +00:00
refactor: introduce subasset loading
This commit is contained in:
@@ -14,6 +14,12 @@ namespace
|
||||
"menulist", "menu", "localize", "weapon", "snddriverglobals", "fx", "impactfx", "aitype", "mptype", "character",
|
||||
"xmodelalias", "rawfile", "stringtable",
|
||||
};
|
||||
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
|
||||
"technique",
|
||||
"vertexshader",
|
||||
"pixelshader",
|
||||
};
|
||||
} // namespace
|
||||
|
||||
namespace IW3
|
||||
@@ -53,4 +59,17 @@ namespace IW3
|
||||
|
||||
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 IW3
|
||||
|
||||
Reference in New Issue
Block a user