2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-26 19:08:07 +00:00

refactor: introduce subasset loading

This commit is contained in:
Jan Laupetin
2026-02-05 16:25:00 +00:00
parent 1be411b371
commit aa47ffa629
255 changed files with 1668 additions and 3132 deletions
+17
View File
@@ -19,6 +19,10 @@ namespace
"xmodelalias", "rawfile", "stringtable", "leaderboard", "structureddatadef",
"tracer", "vehicle", "addonmapents",
};
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
"technique",
};
} // namespace
namespace IW4
@@ -58,4 +62,17 @@ namespace IW4
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 IW4