[saco] Implement/match CDeathWindow::PushBack()

This commit is contained in:
RD42 2024-07-27 17:26:10 +08:00
parent b544ded1f2
commit 555b116b01
2 changed files with 25 additions and 1 deletions

View File

@ -28,6 +28,17 @@ void CDeathWindow::AddMessage(CHAR *a1, CHAR *a2, DWORD a3, DWORD a4, BYTE a5)
//----------------------------------------------------
void CDeathWindow::PushBack()
{
int x=0;
while(x!=(MAX_DISP_DEATH_MESSAGES - 1)) {
memcpy(&m_DeathWindowEntries[x],&m_DeathWindowEntries[x+1],sizeof(DEATH_WINDOW_ENTRY));
x++;
}
}
//----------------------------------------------------
PCHAR CDeathWindow::SpriteIDForWeapon(BYTE byteWeaponID)
{
switch (byteWeaponID) {

View File

@ -1,6 +1,15 @@
#pragma once
#define MAX_DISP_DEATH_MESSAGES 5
#pragma pack(1)
typedef struct _DEATH_WINDOW_ENTRY
{
char _gap0[59];
} DEATH_WINDOW_ENTRY;
#define SPECIAL_ENTRY_CONNECT 200
#define SPECIAL_ENTRY_DISCONNECT 201
@ -9,10 +18,14 @@
class CDeathWindow
{
private:
char _gap0[331];
char _gap0[4];
DEATH_WINDOW_ENTRY m_DeathWindowEntries[MAX_DISP_DEATH_MESSAGES];
char _gap012B[24];
BOOL field_14B;
ID3DXFont *field_14F;
ID3DXFont *field_153;
void PushBack();
public:
void AddMessage(CHAR *a1, CHAR *a2, DWORD a3, DWORD a4, BYTE a5);