mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-18 11:50:57 +00:00
asset load refactor
genral load method, now returns loadedstate across the board
This commit is contained in:
parent
11ad16583e
commit
1cf754dbca
13 changed files with 50 additions and 68 deletions
|
|
@ -161,14 +161,14 @@ void TerrainAsset::initializeAsset()
|
|||
|
||||
mTerrainFilePath = getOwned() ? expandAssetFilePath(mTerrainFileName) : mTerrainFilePath;
|
||||
|
||||
loadTerrain();
|
||||
load();
|
||||
}
|
||||
|
||||
void TerrainAsset::onAssetRefresh()
|
||||
{
|
||||
mTerrainFilePath = getOwned() ? expandAssetFilePath(mTerrainFileName) : mTerrainFilePath;
|
||||
|
||||
loadTerrain();
|
||||
load();
|
||||
}
|
||||
|
||||
void TerrainAsset::setTerrainFileName(const char* pScriptFile)
|
||||
|
|
@ -189,10 +189,10 @@ void TerrainAsset::setTerrainFileName(const char* pScriptFile)
|
|||
refreshAsset();
|
||||
}
|
||||
|
||||
bool TerrainAsset::loadTerrain()
|
||||
U32 TerrainAsset::load()
|
||||
{
|
||||
if (!Torque::FS::IsFile(mTerrainFilePath))
|
||||
return false;
|
||||
return BadFileReference;
|
||||
|
||||
mTerrMaterialAssets.clear();
|
||||
mTerrMaterialAssetIds.clear();
|
||||
|
|
@ -229,9 +229,9 @@ bool TerrainAsset::loadTerrain()
|
|||
mTerrainFile = ResourceManager::get().load(mTerrainFilePath);
|
||||
|
||||
if (mTerrainFile)
|
||||
return true;
|
||||
return Ok;
|
||||
|
||||
return false;
|
||||
return BadFileReference;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue