Asset* AssetSystem::get(const char* pFileName) { Asset* pAsset = addPending(pFileName); if (pAsset && !pAsset->getLoaded()) { pAsset->load(); } return pAsset; }
void AssetSystem::loadPending() { // Can't cache the element count here because loading may cause // new assets to be added to the table. for (int x = 0; x < mLoadedAssetTable.getElementCount(); x++) { Asset* asset = mLoadedAssetTable.get(x); if (!asset->getLoaded()) { asset->load(); } } }