From 4b6dd99ab8c81d6ef1c2355ac02850ca2ff2528b Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 27 Jul 2024 17:52:50 +0800 Subject: [PATCH] [saco] Implement/match `CDeathWindow::RenderWeaponSprite(...)` --- saco/deathwindow.cpp | 12 ++++++++++++ saco/deathwindow.h | 1 + 2 files changed, 13 insertions(+) diff --git a/saco/deathwindow.cpp b/saco/deathwindow.cpp index 784782e..65983ee 100644 --- a/saco/deathwindow.cpp +++ b/saco/deathwindow.cpp @@ -153,6 +153,18 @@ void CDeathWindow::RenderText(CHAR *sz,RECT rect,DWORD dwColor,DWORD dwParams) //---------------------------------------------------- +void CDeathWindow::RenderWeaponSprite(CHAR *WeaponChar,RECT rect,DWORD dwColor) +{ + rect.top -= 5; + m_pWeaponFont2->DrawText(m_pSprite,"G",-1,&rect,DT_NOCLIP|DT_LEFT,0xFF000000); + + m_pWeaponFont2->DrawText(m_pSprite,"G",-1,&rect,DT_CALCRECT|DT_NOCLIP|DT_LEFT,0xFF000000); + + m_pWeaponFont->DrawText(m_pSprite,WeaponChar,-1,&rect,DT_CENTER|DT_VCENTER|DT_NOCLIP,dwColor); +} + +//---------------------------------------------------- + SIZE CDeathWindow::GetSymbolSize() { SIZE ret; diff --git a/saco/deathwindow.h b/saco/deathwindow.h index c48f97d..e351c1c 100644 --- a/saco/deathwindow.h +++ b/saco/deathwindow.h @@ -36,6 +36,7 @@ public: void AddMessage(CHAR *szKiller, CHAR *szKillee, DWORD dwKillerColor, DWORD dwKilleeColor, BYTE byteWeaponID); void RenderText(CHAR *sz,RECT rect,DWORD dwColor,DWORD dwParams); + void RenderWeaponSprite(CHAR *WeaponChar,RECT rect,DWORD dwColor); PCHAR SpriteIDForWeapon(BYTE byteWeaponID); CDeathWindow(IDirect3DDevice9 *pD3DDevice);