mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-05 12:33:02 +00:00
fix: constraint on asset name arrays
This commit is contained in:
@@ -8,18 +8,20 @@ using namespace IW3;
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr const char* ASSET_TYPE_NAMES[ASSET_TYPE_COUNT]{
|
||||
constexpr const char* ASSET_TYPE_NAMES[]{
|
||||
"xmodelpieces", "physpreset", "xanim", "xmodel", "material", "techniqueset", "image", "sound", "soundcurve", "loadedsound",
|
||||
"clipmap_unused", "clipmap", "comworld", "gameworldsp", "gameworldmp", "mapents", "gfxworld", "lightdef", "uimap", "font",
|
||||
"menulist", "menu", "localize", "weapon", "snddriverglobals", "fx", "impactfx", "aitype", "mptype", "character",
|
||||
"xmodelalias", "rawfile", "stringtable",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(ASSET_TYPE_NAMES)> == ASSET_TYPE_COUNT);
|
||||
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[]{
|
||||
"technique",
|
||||
"vertexshader",
|
||||
"pixelshader",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(SUB_ASSET_TYPE_NAMES)> == SUB_ASSET_TYPE_COUNT);
|
||||
} // namespace
|
||||
|
||||
namespace IW3
|
||||
|
||||
@@ -8,7 +8,7 @@ using namespace IW4;
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr const char* ASSET_TYPE_NAMES[ASSET_TYPE_COUNT]{
|
||||
constexpr const char* ASSET_TYPE_NAMES[]{
|
||||
"physpreset", "physcollmap", "xanim", "xmodelsurfs", "xmodel",
|
||||
"material", "pixelshader", "vertexshader", "vertexdecl", "techniqueset",
|
||||
"image", "sound", "soundcurve", "loadedsound", "clipmap_unused",
|
||||
@@ -19,10 +19,12 @@ namespace
|
||||
"xmodelalias", "rawfile", "stringtable", "leaderboard", "structureddatadef",
|
||||
"tracer", "vehicle", "addonmapents",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(ASSET_TYPE_NAMES)> == ASSET_TYPE_COUNT);
|
||||
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[]{
|
||||
"technique",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(SUB_ASSET_TYPE_NAMES)> == SUB_ASSET_TYPE_COUNT);
|
||||
} // namespace
|
||||
|
||||
namespace IW4
|
||||
|
||||
@@ -8,7 +8,7 @@ using namespace IW5;
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr const char* ASSET_TYPE_NAMES[ASSET_TYPE_COUNT]{
|
||||
constexpr const char* ASSET_TYPE_NAMES[]{
|
||||
"physpreset",
|
||||
"physcollmap",
|
||||
"xanim",
|
||||
@@ -56,10 +56,12 @@ namespace
|
||||
"vehicle",
|
||||
"addonmapents",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(ASSET_TYPE_NAMES)> == ASSET_TYPE_COUNT);
|
||||
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[]{
|
||||
"technique",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(SUB_ASSET_TYPE_NAMES)> == SUB_ASSET_TYPE_COUNT);
|
||||
} // namespace
|
||||
|
||||
namespace IW5
|
||||
|
||||
@@ -8,7 +8,7 @@ using namespace T5;
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr const char* ASSET_TYPE_NAMES[ASSET_TYPE_COUNT]{
|
||||
constexpr const char* ASSET_TYPE_NAMES[]{
|
||||
"xmodelpieces", "physpreset", "physconstraints", "destructibledef", "xanim", "xmodel", "material",
|
||||
"techniqueset", "image", "soundbank", "soundpatch", "clipmap_unused", "clipmap", "comworld",
|
||||
"gameworldsp", "gameworldmp", "mapents", "gfxworld", "gfxlightdef", "uimap", "font",
|
||||
@@ -17,12 +17,14 @@ namespace
|
||||
"xmodelalias", "rawfile", "stringtable", "packindex", "xglobals", "ddl", "glasses",
|
||||
"emblemset",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(ASSET_TYPE_NAMES)> == ASSET_TYPE_COUNT);
|
||||
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[]{
|
||||
"technique",
|
||||
"vertexshader",
|
||||
"pixelshader",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(SUB_ASSET_TYPE_NAMES)> == SUB_ASSET_TYPE_COUNT);
|
||||
} // namespace
|
||||
|
||||
namespace T5
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace T5
|
||||
|
||||
enum SubAssetType
|
||||
{
|
||||
SUB_ASSET_TYPE_TECHNIQUE = ASSET_TYPE_COUNT,
|
||||
SUB_ASSET_TYPE_TECHNIQUE,
|
||||
SUB_ASSET_TYPE_VERTEX_SHADER,
|
||||
SUB_ASSET_TYPE_PIXEL_SHADER,
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ using namespace T6;
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr const char* ASSET_TYPE_NAMES[ASSET_TYPE_COUNT]{
|
||||
constexpr const char* ASSET_TYPE_NAMES[]{
|
||||
"xmodelpieces",
|
||||
"physpreset",
|
||||
"physconstraints",
|
||||
@@ -70,12 +70,14 @@ namespace
|
||||
"footstepfxtable",
|
||||
"zbarrier",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(ASSET_TYPE_NAMES)> == ASSET_TYPE_COUNT);
|
||||
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[SUB_ASSET_TYPE_COUNT]{
|
||||
constexpr const char* SUB_ASSET_TYPE_NAMES[]{
|
||||
"technique",
|
||||
"vertexshader",
|
||||
"pixelshader",
|
||||
};
|
||||
static_assert(std::extent_v<decltype(SUB_ASSET_TYPE_NAMES)> == SUB_ASSET_TYPE_COUNT);
|
||||
} // namespace
|
||||
|
||||
namespace T6
|
||||
|
||||
Reference in New Issue
Block a user