diff --git a/saco/deathwindow.cpp b/saco/deathwindow.cpp index da9af39..cf40c78 100644 --- a/saco/deathwindow.cpp +++ b/saco/deathwindow.cpp @@ -26,6 +26,27 @@ void CDeathWindow::AddMessage(CHAR *a1, CHAR *a2, DWORD a3, DWORD a4, BYTE a5) // TODO: CDeathWindow::AddMessage .text:1006A6B0 } +void CDeathWindow::AddToDeathWindowBuffer( CHAR *szKiller, + CHAR *szKillee, + DWORD dwKillerColor, + DWORD dwKilleeColor, + BYTE byteWeaponID ) +{ + int n = MAX_DISP_DEATH_MESSAGES-1; + + PushBack(); + + m_DeathWindowEntries[n].byteWeaponType = byteWeaponID; + m_DeathWindowEntries[n].dwKilleeColor = dwKilleeColor; + m_DeathWindowEntries[n].dwKillerColor = dwKillerColor; + + if(szKiller) strcpy(m_DeathWindowEntries[n].szKiller,szKiller); + else m_DeathWindowEntries[n].szKiller[0] = '\0'; + + if(szKillee) strcpy(m_DeathWindowEntries[n].szKillee,szKillee); + else m_DeathWindowEntries[n].szKillee[0] = '\0'; +} + //---------------------------------------------------- void CDeathWindow::PushBack() diff --git a/saco/deathwindow.h b/saco/deathwindow.h index d6412c1..bc7ae60 100644 --- a/saco/deathwindow.h +++ b/saco/deathwindow.h @@ -6,8 +6,11 @@ #pragma pack(1) typedef struct _DEATH_WINDOW_ENTRY { - char _gap0[59]; - + CHAR szKiller[MAX_PLAYER_NAME+1]; + CHAR szKillee[MAX_PLAYER_NAME+1]; + DWORD dwKillerColor; + DWORD dwKilleeColor; + BYTE byteWeaponType; } DEATH_WINDOW_ENTRY; #define SPECIAL_ENTRY_CONNECT 200 @@ -26,6 +29,7 @@ private: ID3DXFont *field_153; void PushBack(); + void AddToDeathWindowBuffer(CHAR *szKiller,CHAR *szKillee,DWORD dwKillerColor,DWORD dwKilleeColor,BYTE byteWeaponID); public: void AddMessage(CHAR *a1, CHAR *a2, DWORD a3, DWORD a4, BYTE a5);