mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
asset load flow work
add reloading state to asset tracking, convert most asset.isnull() checks on over to skipping out unless the errcode is ::Ok, or ::UsingFallback add more errstriongcodes to hook up skip load<type> execution if the asset loaded state is ::Ok
This commit is contained in:
parent
753cbe32d9
commit
b710a309bd
23 changed files with 177 additions and 35 deletions
|
|
@ -65,6 +65,7 @@
|
|||
class ShapeAsset : public AssetBase
|
||||
{
|
||||
typedef AssetBase Parent;
|
||||
typedef AssetPtr<ShapeAsset> ConcreteAssetPtr;
|
||||
|
||||
protected:
|
||||
StringTableEntry mFileName;
|
||||
|
|
@ -104,15 +105,14 @@ public:
|
|||
|
||||
static StringTableEntry smNoShapeAssetFallback;
|
||||
|
||||
static const String mShapeErrCodeStrings[U32(ShapeAssetErrCode::Extended) - U32(Parent::Extended) + 1];
|
||||
|
||||
static U32 getAssetErrCode(AssetPtr<ShapeAsset> shapeAsset) { if (shapeAsset) return shapeAsset->mLoadedState; else return 0; }
|
||||
static const String mErrCodeStrings[U32(ShapeAssetErrCode::Extended) - U32(Parent::Extended) + 1];
|
||||
static U32 getAssetErrCode(ConcreteAssetPtr checkAsset) { if (checkAsset) return checkAsset->mLoadedState; else return 0; }
|
||||
|
||||
static String getAssetErrstrn(U32 errCode)
|
||||
{
|
||||
if (errCode < Parent::Extended) return Parent::getAssetErrstrn(errCode);
|
||||
if (errCode > ShapeAssetErrCode::Extended) return "undefined error";
|
||||
return mShapeErrCodeStrings[errCode - Parent::Extended];
|
||||
return mErrCodeStrings[errCode - Parent::Extended];
|
||||
};
|
||||
|
||||
ShapeAsset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue