Add support for unpackaged resources to speed up loads on Android, i.e. so we don't have to decompress entire GPAs to load a single resource.

This commit is contained in:
elasota
2020-10-12 18:03:23 -04:00
parent ec56bdace2
commit 1ecef6f8ef
26 changed files with 674 additions and 252 deletions

View File

@@ -368,25 +368,6 @@ void KillMusic (void)
musicMutex->Destroy();
}
//-------------------------------------------------------------- MusicBytesNeeded
long MusicBytesNeeded (void)
{
size_t totalBytes;
short i;
totalBytes = 0L;
for (i = 0; i < kMaxMusic; i++)
{
size_t resSize = 0;
if (!PortabilityLayer::ResourceManager::GetInstance()->GetAppResourceArchive()->GetResourceSize('snd ', i + kBaseBufferMusicID, resSize))
return -1;
totalBytes += static_cast<long>(resSize);
}
return totalBytes;
}
//-------------------------------------------------------------- TellHerNoMusic
void TellHerNoMusic (void)