forked from metin2/client
Used shared pointers and string streams to read data from the CEterPackManager
This commit is contained in:
@ -192,15 +192,14 @@ BOOL CEffectMesh::__LoadData_Ver002(int iSize, const BYTE * c_pbBuf)
|
||||
|
||||
if (0 == strExtension.compare("ifl"))
|
||||
{
|
||||
LPCVOID pMotionData;
|
||||
CMappedFile File;
|
||||
CEterPackManager::TPackDataPtr motionData;
|
||||
CMemoryTextFileLoader textFileLoader;
|
||||
|
||||
if (CEterPackManager::Instance().Get(File, pMeshData->szDiffuseMapFileName, &pMotionData))
|
||||
if (CEterPackManager::Instance().Get(pMeshData->szDiffuseMapFileName, motionData))
|
||||
{
|
||||
CMemoryTextFileLoader textFileLoader;
|
||||
std::vector<std::string> stTokenVector;
|
||||
|
||||
textFileLoader.Bind(File.Size(), pMotionData);
|
||||
textFileLoader.Bind(motionData->size(), motionData->data());
|
||||
|
||||
std::string strPathName;
|
||||
GetOnlyPathName(pMeshData->szDiffuseMapFileName, strPathName);
|
||||
@ -337,15 +336,14 @@ BOOL CEffectMesh::__LoadData_Ver001(int iSize, const BYTE * c_pbBuf)
|
||||
|
||||
if (0 == strExtension.compare("ifl"))
|
||||
{
|
||||
LPCVOID pMotionData;
|
||||
CMappedFile File;
|
||||
CEterPackManager::TPackDataPtr motionData;
|
||||
CMemoryTextFileLoader textFileLoader;
|
||||
|
||||
if (CEterPackManager::Instance().Get(File, pMeshData->szDiffuseMapFileName, &pMotionData))
|
||||
if (CEterPackManager::Instance().Get(pMeshData->szDiffuseMapFileName, motionData))
|
||||
{
|
||||
CMemoryTextFileLoader textFileLoader;
|
||||
std::vector<std::string> stTokenVector;
|
||||
|
||||
textFileLoader.Bind(File.Size(), pMotionData);
|
||||
textFileLoader.Bind(motionData->size(), motionData->data());
|
||||
|
||||
std::string strPathName;
|
||||
GetOnlyPathName(pMeshData->szDiffuseMapFileName, strPathName);
|
||||
|
Reference in New Issue
Block a user