forked from metin2/server
44 lines
810 B
C
44 lines
810 B
C
|
#ifndef __INC_METIN_II_ATTRIBUTE_H__
|
|||
|
#define __INC_METIN_II_ATTRIBUTE_H__
|
|||
|
|
|||
|
enum EDataType
|
|||
|
{
|
|||
|
D_DWORD,
|
|||
|
D_WORD,
|
|||
|
D_BYTE
|
|||
|
};
|
|||
|
|
|||
|
//
|
|||
|
// <20><> <20>Ӽ<EFBFBD><D3BC><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
|||
|
//
|
|||
|
class CAttribute
|
|||
|
{
|
|||
|
public:
|
|||
|
CAttribute(DWORD width, DWORD height); // dword Ÿ<><C5B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 0<><30> ä<><C3A4><EFBFBD><EFBFBD>.
|
|||
|
CAttribute(DWORD * attr, DWORD width, DWORD height); // attr<74><72> <20>о smart<72>ϰ<EFBFBD> <20>Ӽ<EFBFBD><D3BC><EFBFBD> <20>о<EFBFBD><D0BE>´<EFBFBD>.
|
|||
|
~CAttribute();
|
|||
|
void Alloc();
|
|||
|
int GetDataType();
|
|||
|
void * GetDataPtr();
|
|||
|
void Set(DWORD x, DWORD y, DWORD attr);
|
|||
|
void Remove(DWORD x, DWORD y, DWORD attr);
|
|||
|
DWORD Get(DWORD x, DWORD y);
|
|||
|
void CopyRow(DWORD y, DWORD * row);
|
|||
|
|
|||
|
private:
|
|||
|
void Initialize(DWORD width, DWORD height);
|
|||
|
|
|||
|
private:
|
|||
|
int dataType;
|
|||
|
DWORD defaultAttr;
|
|||
|
DWORD width, height;
|
|||
|
|
|||
|
void * data;
|
|||
|
|
|||
|
BYTE ** bytePtr;
|
|||
|
WORD ** wordPtr;
|
|||
|
DWORD ** dwordPtr;
|
|||
|
};
|
|||
|
|
|||
|
#endif
|