📄 gameiconman.h
字号:
//gameIconMan.h
/*/////////////////////////////////////////////////////////////////
李亦
2006-7-7
/*/////////////////////////////////////////////////////////////////
#ifndef _GAMEICONMAN_H_
#define _GAMEICONMAN_H_
#ifndef _GAMEICONDICTIONARY_H_
#include "gameIconDictionary.h"
#endif
#ifndef _SIMBASE_H_
#include "console/simbase.h"
#endif
#ifndef _GTEXMANAGER_H_
#include "dgl/gTexManager.h"
#endif
#ifndef _MATERIALLIST_H_
#include "dgl/materialList.h"
#endif
class RectI;
namespace RPG
{
///////////////////////////////////////////////////////////////////////////////
//Socket层管理
class GameIconMan : public SimObject
{
typedef SimObject Parent;
protected:
GameIconDictionary m_gIconDict;
//Vector<TextureHandle> m_arTexureHandles;
MaterialList m_ltMaterials;
public:
static void Initialize(CSTR pObjName);
static void Destroy();
public:
GameIconMan();
virtual ~GameIconMan();
DECLARE_CONOBJECT(GameIconMan);
public:
bool LoadMaretialList(CSTR pFileName);
BOOL InitGameIcons();
BOOL CreateTextures();
BOOL DestroyTextures();
GameIconDictionary::Entry *GetGameIcon(StringTableEntry pName){return m_gIconDict.GetGameIcon(pName);}
BOOL GetIconTexture(U32 uIcon, TextureHandle& handle, RectI& rect);
BOOL GetIconTexture(STE sIcon, TextureHandle& handle, RectI& rect);
};//GameIconMan
///////////////////////////////////////////////////////////
extern GameIconMan *g_pGameIconMan;
///////////////////////////////////////////////////////////
inline BOOL GameIconMan::GetIconTexture(STE sIcon, TextureHandle& handle, RectI& rect)
{
GameIconDictionary::Entry* pEntry = m_gIconDict.GetGameIcon(sIcon);
if(pEntry)
return GetIconTexture(pEntry->uIcon, handle, rect);
return FALSE;
}
};//namespace RPG
#endif //_GAMEICONMAN_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -