asset load refactor

genral load method, now returns loadedstate across the board
This commit is contained in:
AzaezelX 2023-11-12 16:33:17 -06:00
parent 11ad16583e
commit 1cf754dbca
13 changed files with 50 additions and 68 deletions

View file

@ -136,7 +136,6 @@ public:
bool isValid() { return mIsValidImage; }
const GBitmap& getImage();
GFXTexHandle getTexture(GFXTextureProfile* requestedProfile);
StringTableEntry getImageInfo();
@ -152,14 +151,14 @@ public:
static U32 getAssetById(StringTableEntry assetId, AssetPtr<ImageAsset>* imageAsset);
static U32 getAssetById(String assetId, AssetPtr<ImageAsset>* imageAsset) { return getAssetById(assetId.c_str(), imageAsset); };
U32 load();
protected:
virtual void initializeAsset(void);
virtual void onAssetRefresh(void);
static bool setImageFileName(void* obj, StringTableEntry index, StringTableEntry data) { static_cast<ImageAsset*>(obj)->setImageFileName(data); return false; }
static StringTableEntry getImageFileName(void* obj, StringTableEntry data) { return static_cast<ImageAsset*>(obj)->getImageFileName(); }
void loadImage();
};
DefineConsoleType(TypeImageAssetPtr, ImageAsset)