forked from metin2/client
114 lines
3.2 KiB
C
114 lines
3.2 KiB
C
|
#pragma once
|
|||
|
|
|||
|
#include "../eterBase/Singleton.h"
|
|||
|
|
|||
|
/*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٴϴ<EFBFBD> <EFBFBD>ؽ<EFBFBD>Ʈ ó<EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
class CPythonTextTail : public CSingleton<CPythonTextTail>
|
|||
|
{
|
|||
|
public:
|
|||
|
typedef struct STextTail
|
|||
|
{
|
|||
|
CGraphicTextInstance* pTextInstance;
|
|||
|
CGraphicTextInstance* pOwnerTextInstance;
|
|||
|
|
|||
|
CGraphicMarkInstance* pMarkInstance;
|
|||
|
CGraphicTextInstance* pGuildNameTextInstance;
|
|||
|
|
|||
|
CGraphicTextInstance* pTitleTextInstance;
|
|||
|
CGraphicTextInstance* pLevelTextInstance;
|
|||
|
|
|||
|
|
|||
|
// Todo : <20>̰<EFBFBD> <20><><EFBFBD><EFBFBD> VID<49><44> <20>ٲٵ<D9B2><D9B5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
// <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ƨ<><C6A8> <20><><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
CGraphicObjectInstance * pOwner;
|
|||
|
|
|||
|
DWORD dwVirtualID;
|
|||
|
|
|||
|
float x, y, z;
|
|||
|
float fDistanceFromPlayer;
|
|||
|
D3DXCOLOR Color;
|
|||
|
BOOL bNameFlag; // <20≯<EFBFBD><CCB8><EFBFBD> <20>Բ<EFBFBD> <20>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
|||
|
|
|||
|
float xStart, yStart;
|
|||
|
float xEnd, yEnd;
|
|||
|
|
|||
|
DWORD LivingTime;
|
|||
|
|
|||
|
float fHeight;
|
|||
|
|
|||
|
STextTail() {}
|
|||
|
virtual ~STextTail() {}
|
|||
|
} TTextTail;
|
|||
|
|
|||
|
typedef std::map<DWORD, TTextTail*> TTextTailMap;
|
|||
|
typedef std::list<TTextTail*> TTextTailList;
|
|||
|
typedef TTextTailMap TChatTailMap;
|
|||
|
|
|||
|
public:
|
|||
|
CPythonTextTail(void);
|
|||
|
virtual ~CPythonTextTail(void);
|
|||
|
|
|||
|
void GetInfo(std::string* pstInfo);
|
|||
|
|
|||
|
void Initialize();
|
|||
|
void Destroy();
|
|||
|
void Clear();
|
|||
|
|
|||
|
void UpdateAllTextTail();
|
|||
|
void UpdateShowingTextTail();
|
|||
|
void Render();
|
|||
|
|
|||
|
void ArrangeTextTail();
|
|||
|
void HideAllTextTail();
|
|||
|
void ShowAllTextTail();
|
|||
|
void ShowCharacterTextTail(DWORD VirtualID);
|
|||
|
void ShowItemTextTail(DWORD VirtualID);
|
|||
|
|
|||
|
void RegisterCharacterTextTail(DWORD dwGuildID, DWORD dwVirtualID, const D3DXCOLOR & c_rColor, float fAddHeight=10.0f);
|
|||
|
void RegisterItemTextTail(DWORD VirtualID, const char * c_szText, CGraphicObjectInstance * pOwner);
|
|||
|
void RegisterChatTail(DWORD VirtualID, const char * c_szChat);
|
|||
|
void RegisterInfoTail(DWORD VirtualID, const char * c_szChat);
|
|||
|
void SetCharacterTextTailColor(DWORD VirtualID, const D3DXCOLOR & c_rColor);
|
|||
|
void SetItemTextTailOwner(DWORD dwVID, const char * c_szName);
|
|||
|
void DeleteCharacterTextTail(DWORD VirtualID);
|
|||
|
void DeleteItemTextTail(DWORD VirtualID);
|
|||
|
|
|||
|
int Pick(int ixMouse, int iyMouse);
|
|||
|
void SelectItemName(DWORD dwVirtualID);
|
|||
|
|
|||
|
bool GetTextTailPosition(DWORD dwVID, float* px, float* py, float* pz);
|
|||
|
bool IsChatTextTail(DWORD dwVID);
|
|||
|
|
|||
|
void EnablePKTitle(BOOL bFlag);
|
|||
|
void AttachTitle(DWORD dwVID, const char * c_szName, const D3DXCOLOR& c_rColor);
|
|||
|
void DetachTitle(DWORD dwVID);
|
|||
|
|
|||
|
void AttachLevel(DWORD dwVID, const char* c_szText, const D3DXCOLOR& c_rColor);
|
|||
|
void DetachLevel(DWORD dwVID);
|
|||
|
|
|||
|
|
|||
|
protected:
|
|||
|
TTextTail * RegisterTextTail(DWORD dwVirtualID, const char * c_szText, CGraphicObjectInstance * pOwner, float fHeight, const D3DXCOLOR & c_rColor);
|
|||
|
void DeleteTextTail(TTextTail * pTextTail);
|
|||
|
|
|||
|
void UpdateTextTail(TTextTail * pTextTail);
|
|||
|
void RenderTextTailBox(TTextTail * pTextTail);
|
|||
|
void RenderTextTailName(TTextTail * pTextTail);
|
|||
|
void UpdateDistance(const TPixelPosition & c_rCenterPosition, TTextTail * pTextTail);
|
|||
|
|
|||
|
bool isIn(TTextTail * pSource, TTextTail * pTarget);
|
|||
|
|
|||
|
protected:
|
|||
|
TTextTailMap m_CharacterTextTailMap;
|
|||
|
TTextTailMap m_ItemTextTailMap;
|
|||
|
TChatTailMap m_ChatTailMap;
|
|||
|
|
|||
|
TTextTailList m_CharacterTextTailList;
|
|||
|
TTextTailList m_ItemTextTailList;
|
|||
|
|
|||
|
private:
|
|||
|
CDynamicPool<STextTail> m_TextTailPool;
|
|||
|
};
|