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

@ -150,13 +150,13 @@ public:
virtual void copyTo(SimObject* object);
//SFXResource* getSound() { return mSoundResource; }
Resource<SFXResource> getSoundResource(const U32 slotId = 0) { loadSound(); return mSFXProfile[slotId].getResource(); }
Resource<SFXResource> getSoundResource(const U32 slotId = 0) { load(); return mSFXProfile[slotId].getResource(); }
/// Declare Console Object.
DECLARE_CONOBJECT(SoundAsset);
void setSoundFile(const char* pSoundFile, const U32 slotId = 0);
bool loadSound();
U32 load();
StringTableEntry getSoundFile(const char* pSoundFile, const U32 slotId = 0);
inline StringTableEntry getSoundPath(const U32 slotId = 0) const { return mSoundPath[slotId]; };
SFXProfile* getSfxProfile(const U32 slotId = 0) { return &mSFXProfile[slotId]; }