[saco] Implement/match ID3DXFontHook::DrawTextA

This commit is contained in:
ricardoofnl committed 2026-08-02 14:14:59 +07:00
1 parent 76fa9023ba
commit 0ba6070b59
1 file changed
+28 -1
+28 -1
View File
@@ -2,9 +2,36 @@
#include "ID3DXFontHook.h"
#include "../main.h"
int dword_10136EA0;
DWORD dword_10136E90;
int dword_10136EA4;
char *dword_10140AEC;
char *dword_10140AF0;
WCHAR WideCharStr[20000];
int off_10102BF0;
void sub_100739A0(char *lpMultiByteStr, WCHAR *lpWideCharStr, int cchWideChar);
void sub_100B60C0(char *lpString);
INT __stdcall ID3DXFontHook::DrawTextA(LPD3DXSPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color)
{
// TODO: ID3DXFontHook::DrawTextA
if(pSprite)
{
dword_10136EA0 = (int)pSprite;
dword_10136E90 = Color;
dword_10136EA4 = 0;
if(strlen(pString) > 0x186A0)
return 0;
strcpy(dword_10140AEC, pString);
strcpy(dword_10140AF0, pString);
sub_100739A0(dword_10140AEC, WideCharStr, 20000);
sub_100B60C0(dword_10140AF0);
return m_pD3DFont->DrawTextA((LPD3DXSPRITE)&off_10102BF0, dword_10140AF0, strlen(dword_10140AF0), pRect, Format, Color);
}
return m_pD3DFont->DrawTextA(pSprite, pString, Count, pRect, Format, Color);
}