2024-02-05 21:59:11 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-07-27 17:26:10 +08:00
|
|
|
#define MAX_DISP_DEATH_MESSAGES 5
|
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
typedef struct _DEATH_WINDOW_ENTRY
|
|
|
|
{
|
2024-07-27 17:29:13 +08:00
|
|
|
CHAR szKiller[MAX_PLAYER_NAME+1];
|
|
|
|
CHAR szKillee[MAX_PLAYER_NAME+1];
|
|
|
|
DWORD dwKillerColor;
|
|
|
|
DWORD dwKilleeColor;
|
|
|
|
BYTE byteWeaponType;
|
2024-07-27 17:26:10 +08:00
|
|
|
} DEATH_WINDOW_ENTRY;
|
|
|
|
|
2024-07-26 19:12:51 +08:00
|
|
|
#define SPECIAL_ENTRY_CONNECT 200
|
|
|
|
#define SPECIAL_ENTRY_DISCONNECT 201
|
|
|
|
|
2024-02-05 21:59:11 +08:00
|
|
|
//----------------------------------------------------
|
|
|
|
|
2024-07-27 17:41:17 +08:00
|
|
|
#pragma pack(1)
|
2024-02-05 21:59:11 +08:00
|
|
|
class CDeathWindow
|
|
|
|
{
|
|
|
|
private:
|
2024-07-27 17:43:11 +08:00
|
|
|
int field_0;
|
2024-07-27 17:26:10 +08:00
|
|
|
DEATH_WINDOW_ENTRY m_DeathWindowEntries[MAX_DISP_DEATH_MESSAGES];
|
2024-07-27 17:41:17 +08:00
|
|
|
int m_iLongestNickLength; // In screen units, longest nick length;
|
|
|
|
LONG field_12F;
|
|
|
|
LONG field_133;
|
|
|
|
|
2024-07-27 17:26:10 +08:00
|
|
|
void PushBack();
|
2024-07-27 17:41:17 +08:00
|
|
|
SIZE GetSymbolSize();
|
2024-07-27 17:29:13 +08:00
|
|
|
void AddToDeathWindowBuffer(CHAR *szKiller,CHAR *szKillee,DWORD dwKillerColor,DWORD dwKilleeColor,BYTE byteWeaponID);
|
2024-07-26 19:12:51 +08:00
|
|
|
|
2024-02-05 21:59:11 +08:00
|
|
|
public:
|
2024-07-27 17:31:21 +08:00
|
|
|
void AddMessage(CHAR *szKiller, CHAR *szKillee, DWORD dwKillerColor, DWORD dwKilleeColor, BYTE byteWeaponID);
|
2024-03-20 23:46:57 +08:00
|
|
|
|
2024-07-27 17:52:24 +08:00
|
|
|
void RenderText(CHAR *sz,RECT rect,DWORD dwColor,DWORD dwParams);
|
2024-07-27 17:52:50 +08:00
|
|
|
void RenderWeaponSprite(CHAR *WeaponChar,RECT rect,DWORD dwColor);
|
2024-07-26 19:12:51 +08:00
|
|
|
PCHAR SpriteIDForWeapon(BYTE byteWeaponID);
|
|
|
|
|
2024-03-20 23:46:57 +08:00
|
|
|
CDeathWindow(IDirect3DDevice9 *pD3DDevice);
|
2024-07-27 17:51:43 +08:00
|
|
|
~CDeathWindow();
|
2024-07-26 19:19:31 +08:00
|
|
|
|
2024-07-27 17:41:17 +08:00
|
|
|
void CreateFonts();
|
2024-07-26 19:19:31 +08:00
|
|
|
void CreateAuxFonts();
|
|
|
|
|
2024-07-27 17:41:17 +08:00
|
|
|
ID3DXFont *m_pD3DFont;
|
|
|
|
ID3DXFont *m_pWeaponFont;
|
|
|
|
ID3DXFont *m_pWeaponFont2;
|
|
|
|
ID3DXSprite *m_pSprite;
|
|
|
|
IDirect3DDevice9 *m_pD3DDevice;
|
|
|
|
BOOL field_14B;
|
|
|
|
ID3DXFont *field_14F;
|
|
|
|
ID3DXFont *field_153;
|
2024-02-05 21:59:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------------------
|