Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
60
Engine/Caldron/Src/Base/BaseCacheMgr.cpp
Normal file
60
Engine/Caldron/Src/Base/BaseCacheMgr.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
/* *********************************************************************
|
||||
|
||||
* CBaseCacheMgr , CCacheObj
|
||||
|
||||
* <20><><EFBFBD><EFBFBD> : BaseCacheMgr.cpp
|
||||
* <20><><EFBFBD><EFBFBD> : Caldron<6F><6E><EFBFBD><EFBFBD> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD> CacheMgr<67><72><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> class
|
||||
* history :
|
||||
2004.01.16 wizardbug
|
||||
|
||||
********************************************************************** */
|
||||
|
||||
#include "BaseCacheMgr.h"
|
||||
#include "SceneManager.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
namespace Caldron {namespace Base {
|
||||
/*template < class T >
|
||||
T *CBaseCacheMgr<T>::LoadData(const char *strFileName)
|
||||
{
|
||||
T *pNode = new T;
|
||||
strcpy(pNode->m_strName,strFileName);
|
||||
CSceneManager::m_pNewMeshObjectContainer->AddObj(Base::CResourceLoaderObj(strFileName,pNode));
|
||||
|
||||
unsigned long DataID = GetHashID(strFileName);
|
||||
Base::CACHEITER itr = m_CacheTable.find(DataID);
|
||||
|
||||
if(itr == m_CacheTable.end())
|
||||
{
|
||||
|
||||
Base::CCacheObj *pObj = new Base::CCacheObj(pNode);
|
||||
|
||||
m_CacheTable.insert(Base::CACHETABLEOBJ(DataID,pObj));
|
||||
m_iCachesNum++;
|
||||
}
|
||||
else
|
||||
{// map <20>ȿ<EFBFBD> <20>Ȱ<EFBFBD><C8B0><EFBFBD> Hash Index <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
((*itr).second)->Add_Back(pNode);
|
||||
}
|
||||
|
||||
return pNode;
|
||||
|
||||
}
|
||||
*/
|
||||
/*
|
||||
template < class T >
|
||||
unsigned long CBaseCacheMgr<T>::GetHashID(const char *strFileName)
|
||||
{
|
||||
unsigned long ulHashId = 0;
|
||||
|
||||
int iLength = (int)strlen(strFileName);
|
||||
|
||||
for(int i=0;i < iLength; i++) {
|
||||
ulHashId += (( i + 1) * strFileName[i]);
|
||||
}
|
||||
return ulHashId;
|
||||
|
||||
}
|
||||
*/
|
||||
}}
|
||||
Reference in New Issue
Block a user