mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
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:
parent
220771d2fe
commit
8bb43dd5ae
5 changed files with 68 additions and 22 deletions
|
|
@ -52,6 +52,18 @@ StringTableEntry assetInternalField = StringTable->insert("AssetInternal");
|
|||
StringTableEntry assetPrivateField = StringTable->insert("AssetPrivate");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
const String AssetBase::mErrCodeStrings[] =
|
||||
{
|
||||
"Failed",
|
||||
"Ok",
|
||||
"NotLoaded",
|
||||
"BadFileReference",
|
||||
"InvalidFormat",
|
||||
"DependencyNotFound",
|
||||
"FileTooLarge",
|
||||
"UsingFallback",
|
||||
"UnKnown"
|
||||
};
|
||||
|
||||
AssetBase::AssetBase() :
|
||||
mpOwningAssetManager(NULL),
|
||||
|
|
|
|||
|
|
@ -55,20 +55,6 @@ extern StringTableEntry assetAutoUnloadField;
|
|||
//#define ASSET_BASE_AUTOUNLOAD_FIELD "AssetAutoUnload"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
enum AssetErrCode
|
||||
{
|
||||
Failed,
|
||||
Ok,
|
||||
NotLoaded,
|
||||
BadFileReference,
|
||||
InvalidFormat,
|
||||
DependencyNotFound,
|
||||
FileTooLarge,
|
||||
UsingFallback,
|
||||
Extended
|
||||
};
|
||||
|
||||
class AssetBase : public SimObject
|
||||
{
|
||||
friend class AssetManager;
|
||||
|
|
@ -82,6 +68,26 @@ protected:
|
|||
U32 mAcquireReferenceCount;
|
||||
|
||||
public:
|
||||
enum AssetErrCode
|
||||
{
|
||||
Failed,
|
||||
Ok,
|
||||
NotLoaded,
|
||||
BadFileReference,
|
||||
InvalidFormat,
|
||||
DependencyNotFound,
|
||||
FileTooLarge,
|
||||
UsingFallback,
|
||||
Extended
|
||||
};
|
||||
|
||||
static const String mErrCodeStrings[AssetErrCode::Extended + 1];
|
||||
static String getAssetErrstrn(U32 errCode)
|
||||
{
|
||||
if (errCode > AssetErrCode::Extended) return "undefined error";
|
||||
return mErrCodeStrings[errCode];
|
||||
};
|
||||
|
||||
AssetBase();
|
||||
virtual ~AssetBase();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue