@@ -36,32 +36,34 @@ class CResourceManager
3636{
3737
3838public:
39- CResourceManager ( void );
40- ~CResourceManager ( void );
39+ CResourceManager ( void );
40+ ~CResourceManager ( void );
4141
42- CResource* Add ( unsigned short usNetID, const char * szResourceName, CClientEntity* pResourceEntity, CClientEntity* pResourceDynamicEntity, const SString& strMinServerReq, const SString& strMinClientReq, bool bEnableOOP );
43- CResource* GetResource ( const char * szResourceName );
44- CResource* GetResourceFromNetID ( unsigned short usNetID );
45- CResource* GetResourceFromScriptID ( uint uiScriptID );
46- CResource* GetResourceFromLuaState ( struct lua_State * luaVM );
47- SString GetResourceName ( struct lua_State * luaVM );
48- bool RemoveResource ( unsigned short usID );
49- void Remove ( CResource* pResource );
50- bool Exists ( CResource* pResource );
51- void StopAll ( void );
42+ CResource* Add ( unsigned short usNetID, const char * szResourceName, CClientEntity* pResourceEntity, CClientEntity* pResourceDynamicEntity, const SString& strMinServerReq, const SString& strMinClientReq, bool bEnableOOP );
43+ CResource* GetResource ( const char * szResourceName );
44+ CResource* GetResourceFromNetID ( unsigned short usNetID );
45+ CResource* GetResourceFromScriptID ( uint uiScriptID );
46+ CResource* GetResourceFromLuaState ( struct lua_State * luaVM );
47+ SString GetResourceName ( struct lua_State * luaVM );
48+
49+ bool RemoveResource ( unsigned short usID );
50+ void Remove ( CResource* pResource );
51+ bool Exists ( CResource* pResource );
52+ void StopAll ( void );
5253
53- void OnDownloadGroupFinished ( void );
54- void UpdatePendingDownloads ( void );
54+ void OnDownloadGroupFinished ( void );
55+ void UpdatePendingDownloads ( void );
5556
56- void OnAddResourceFile ( CDownloadableResource* pResourceFile );
57- void OnRemoveResourceFile ( CDownloadableResource* pResourceFile );
58- void OnDownloadedResourceFile ( const SString& strFilename );
59- bool IsResourceFile ( const SString& strFilename );
60- void FileModifedByScript ( const SString& strFilename );
61- void ValidateResourceFile ( const SString& strFilename, const CBuffer& fileData );
57+ void OnAddResourceFile ( CDownloadableResource* pResourceFile );
58+ void OnRemoveResourceFile ( CDownloadableResource* pResourceFile );
59+ void OnDownloadedResourceFile ( const SString& strFilename );
60+ bool IsResourceFile ( const SString& strFilename );
61+ void FileModifedByScript ( const SString& strFilename );
62+ void ValidateResourceFile ( const SString& strFilename, const CBuffer& fileData );
63+ inline CDownloadableResource* GetDownloadableResourceFile ( const SString& strFilename ) { return MapFindRef ( m_ResourceFileMap, strFilename ); }
6264
63- static bool ParseResourcePathInput ( std::string strInput, CResource* &pResource, std::string &strPath, std::string &strMetaPath );
64- static bool ParseResourcePathInput ( std::string strInput, CResource* &pResource, std::string &strPath );
65+ static bool ParseResourcePathInput ( std::string strInput, CResource* &pResource, std::string &strPath, std::string &strMetaPath );
66+ static bool ParseResourcePathInput ( std::string strInput, CResource* &pResource, std::string &strPath );
6567
6668private:
6769
0 commit comments