Introducing KRResourceManager superclass

This commit is contained in:
2019-12-08 16:29:49 -08:00
parent 21ca133e30
commit 94b351f9ee
31 changed files with 447 additions and 49 deletions

View File

@@ -413,6 +413,22 @@ KrResult KRContext::unloadResource(const KrUnloadResourceInfo* unloadResourceInf
return KR_ERROR_NOT_IMPLEMENTED;
}
KrResult KRContext::mapResource(const KrMapResourceInfo* mapResourceInfo)
{
if (mapResourceInfo->resourceHandle < 0 || mapResourceInfo->resourceHandle >= m_resourceMapSize) {
return KR_ERROR_OUT_OF_BOUNDS;
}
/*
KRResource* resource = loadResource(loadResourceInfo->pResourcePath, data);
m_resourceMap[loadResourceInfo->resourceHandle] = resource;
return KR_SUCCESS;
*/
// TODO - Need to implement mapping logic
return KR_ERROR_NOT_IMPLEMENTED;
}
KrResult KRContext::createBundle(const KrCreateBundleInfo* createBundleInfo)
{
if (createBundleInfo->resourceHandle < 0 || createBundleInfo->resourceHandle >= m_resourceMapSize) {