const DWORD p1=0x44D8B4,p2=0x41834C,p3=0x406434,p_disp=0x4a09a0;
const DWORD old_proc=0x44d6cc;
const DWORD p4=0x44d104;
void DispText(DWORD _eax, LPCTSTR string, DWORD x, DWORD y, DWORD color=0xffffff, DWORD bcolor=0x0)
{
delphi_string dstring;
sprintf(dstring.text,"%s",string);
dstring.len=strlen(string);
DWORD address=(DWORD)&dstring.text[0];
_asm
{
mov eax, _eax
call p1
call p2
push 1
push eax
call p3
push color
push bcolor
push address
mov ecx, y
mov edx, x
mov eax, _eax
call p_disp
}
const DWORD old_proc=0x44d6cc;
const DWORD p4=0x44d104;
void DispText(DWORD _eax, LPCTSTR string, DWORD x, DWORD y, DWORD color=0xffffff, DWORD bcolor=0x0)
{
delphi_string dstring;
sprintf(dstring.text,"%s",string);
dstring.len=strlen(string);
DWORD address=(DWORD)&dstring.text[0];
_asm
{
mov eax, _eax
call p1
call p2
push 1
push eax
call p3
push color
push bcolor
push address
mov ecx, y
mov edx, x
mov eax, _eax
call p_disp
}
const
P1: DWORD = $44D8B4;
p2: DWORD = $41834C;
p3: DWORD = $406434;
p_disp: DWORD = $4a09a0;
old_proc: DWORD = $44d6cc;
p4: DWORD = $44d104;procedure DispText(
_eax: DWORD;
_string: LPCTSTR;
X, Y: DWORD;
color: DWORD = $ffffff;
bcolor: DWORD = $0
);
var
S: ShortString;
address: DWORD;
begin
S := _string;
address := DWORD(@S[0]);
asm
mov eax, _eax
call p1
call p2
push 1
push eax
call p3
push color
push bcolor
push address
mov ecx, y
mov edx, x
mov eax, _eax
call p_disp
end;
end;