1
0
forked from metin2/client

Merge new archive manager with zip file support

This commit is contained in:
2025-04-12 08:26:17 +03:00
62 changed files with 924 additions and 4600 deletions

View File

@ -61,17 +61,17 @@ void CResourceManager::ProcessBackgroundLoading()
DWORD dwCurrentTime = ELTimer_GetMSec();
CFileLoaderThread::TData * pData;
while (ms_loadingThread.Fetch(&pData))
CFileLoaderThread::TData pData;
while (ms_loadingThread.Fetch(pData))
{
//printf("LOD %s\n", pData->stFileName.c_str());
CResource * pResource = GetResourcePointer(pData->stFileName.c_str());
CResource * pResource = GetResourcePointer(pData.fileName.c_str());
if (pResource)
{
if (pResource->IsEmpty())
{
pResource->OnLoad(pData->dwSize, pData->pvBuf);
pResource->OnLoad(pData.data->size(), pData.data->data());
pResource->AddReferenceOnly();
// 여기서 올라간 레퍼런스 카운트를 일정 시간이 지난 뒤에 풀어주기 위하여
@ -79,10 +79,7 @@ void CResourceManager::ProcessBackgroundLoading()
}
}
m_WaitingMap.erase(GetCRC32(pData->stFileName.c_str(), pData->stFileName.size()));
delete [] ((char *) pData->pvBuf);
delete pData;
m_WaitingMap.erase(GetCRC32(pData.fileName.c_str(), pData.fileName.size()));
}
// DO : 일정 시간이 지나고 난뒤 미리 로딩해 두었던 리소스의 레퍼런스 카운트를 감소 시킨다 - [levites]