forked from metin2/client
Removed Panama & HybridCrypt, added experimental Folder and Zip archive providers
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#include "../eterBase/Singleton.h"
|
||||
#include "../eterBase/Stl.h"
|
||||
|
||||
#include "FileProvider.h"
|
||||
#include "EterPack.h"
|
||||
|
||||
class CEterPackManager : public CSingleton<CEterPackManager>
|
||||
@ -22,8 +23,8 @@ class CEterPackManager : public CSingleton<CEterPackManager>
|
||||
SEARCH_PACK_FIRST
|
||||
};
|
||||
|
||||
typedef std::list<CEterPack*> TEterPackList;
|
||||
typedef std::unordered_map<std::string, CEterPack*, stringhash> TEterPackMap;
|
||||
typedef std::list<std::shared_ptr<FileProvider>> TEterPackList;
|
||||
typedef std::unordered_map<std::string, std::shared_ptr<FileProvider>, stringhash> TEterPackMap;
|
||||
|
||||
public:
|
||||
CEterPackManager();
|
||||
@ -45,30 +46,13 @@ class CEterPackManager : public CSingleton<CEterPackManager>
|
||||
bool isExist(const char * c_szFileName);
|
||||
bool isExistInPack(const char * c_szFileName);
|
||||
|
||||
bool RegisterPack(const char * c_szName, const char * c_szDirectory, const BYTE* c_pbIV = NULL);
|
||||
void RegisterRootPack(const char * c_szName);
|
||||
bool RegisterPackWhenPackMaking(const char * c_szName, const char * c_szDirectory, CEterPack* pPack);
|
||||
|
||||
|
||||
bool DecryptPackIV(DWORD key);
|
||||
|
||||
const char * GetRootPackFileName();
|
||||
|
||||
//for hybridcrypt
|
||||
void WriteHybridCryptPackInfo(const char* pFileName);
|
||||
|
||||
void RetrieveHybridCryptPackKeys( const BYTE* pStream );
|
||||
void RetrieveHybridCryptPackSDB( const BYTE* pStream );
|
||||
|
||||
// <20><DEB8> <20><><EFBFBD>ε<EFBFBD> <20>ѵ<EFBFBD> <20><><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD> <20>͵<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
public:
|
||||
void ArrangeMemoryMappedPack();
|
||||
bool RegisterPack(const char * c_szName, const char * c_szDirectory, const BYTE* c_pbIV = NULL);
|
||||
std::string ConvertFileName(std::string fileName);
|
||||
|
||||
protected:
|
||||
int ConvertFileName(const char * c_szFileName, std::string & rstrFileName); // StringPath std::string <20><><EFBFBD><EFBFBD>
|
||||
bool CompareName(const char * c_szDirectoryName, DWORD iLength, const char * c_szFileName);
|
||||
|
||||
CEterPack* FindPack(const char* c_szPathName);
|
||||
std::shared_ptr<FileProvider> FindPack(const char* c_szPathName);
|
||||
|
||||
SCache* __FindCache(DWORD dwFileNameHash);
|
||||
void __ClearCacheMap();
|
||||
@ -78,13 +62,12 @@ class CEterPackManager : public CSingleton<CEterPackManager>
|
||||
bool m_isCacheMode;
|
||||
int m_iSearchMode;
|
||||
|
||||
CEterFileDict m_FileDict;
|
||||
CEterPack m_RootPack;
|
||||
TEterPackList m_PackList;
|
||||
TEterPackMap m_PackMap;
|
||||
TEterPackMap m_DirPackMap;
|
||||
std::unordered_map<DWORD, std::shared_ptr<FileProvider>> m_FileDict;
|
||||
TEterPackMap m_PackMap;
|
||||
|
||||
std::unordered_map<DWORD, SCache> m_kMap_dwNameKey_kCache;
|
||||
|
||||
std::vector<std::shared_ptr<std::vector<char>>> keepDataReferencedArray;
|
||||
|
||||
CRITICAL_SECTION m_csFinder;
|
||||
};
|
||||
|
Reference in New Issue
Block a user