error string interpreter, example of usage in shapebase::preload, plus flips the datablock filter back on to save some network bandwidth.

This commit is contained in:
AzaezelX 2020-12-03 15:37:51 -06:00
parent 220771d2fe
commit 8bb43dd5ae
5 changed files with 68 additions and 22 deletions

View file

@ -113,6 +113,15 @@ ConsoleSetType(TypeShapeAssetId)
//-----------------------------------------------------------------------------
const String ShapeAsset::mErrCodeStrings[] =
{
"TooManyVerts",
"TooManyBones",
"MissingAnimatons",
"UnKnown"
};
//-----------------------------------------------------------------------------
ShapeAsset::ShapeAsset()
{
mFileName = StringTable->EmptyString();

View file

@ -87,7 +87,16 @@ public:
{
TooManyVerts = AssetErrCode::Extended,
TooManyBones,
MissingAnimatons
MissingAnimatons,
Extended
};
static const String mErrCodeStrings[ShapeAssetErrCode::Extended - Parent::Extended + 1];
static String getAssetErrstrn(U32 errCode)
{
if (errCode < Parent::Extended) return Parent::getAssetErrstrn(errCode);
if (errCode > ShapeAssetErrCode::Extended) return "undefined error";
return mErrCodeStrings[errCode];
};
ShapeAsset();