mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-28 11:03:49 +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
|
|
@ -106,6 +106,14 @@ ConsoleSetType(TypeSoundAssetId)
|
|||
Con::warnf("(TypeAssetId) - Cannot set multiple args to a single asset.");
|
||||
}
|
||||
|
||||
const String SoundAsset::mErrCodeStrings[] =
|
||||
{
|
||||
"BadProfile",
|
||||
"BadDescription",
|
||||
"BadBufferData",
|
||||
"UnKnown"
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
SoundAsset::SoundAsset()
|
||||
|
|
@ -215,6 +223,7 @@ void SoundAsset::onAssetRefresh(void)
|
|||
|
||||
bool SoundAsset::loadSound()
|
||||
{
|
||||
if (mLoadedState == AssetErrCode::Ok) return true;
|
||||
if (mSoundPath)
|
||||
{
|
||||
if (!Torque::FS::IsFile(mSoundPath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue