Thread Rating:
  • 4 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transparent Background for Text
#6
not working for me 0.o

i put the .code part in generic.inc's .code part
and .data part in generic.inc's .data part
and the
    ASM-Code:
.data
hDC dd ?
 
.code
draw_text proc
 
var_4           = dword ptr -4
lpString        = dword ptr  4
arg_4           = dword ptr  8
arg_8           = dword ptr  0Ch
arg_C           = dword ptr  10h
 
                push    esi
                mov     esi, [esp+4+lpString]
                mov     eax, [esi]
                mov     edx, [eax+44h]
                push    edi
                lea     ecx, [esp+8+lpString]
                push    ecx
                push    esi
                call    edx   ;Magic Call #1
                mov     edi, eax
                test    edi, edi
                jl      short loc_4012FC
                mov     eax, [esp+0Ch+arg_4]
                mov     ecx, [esp+0Ch]
                push    ebx
                push    TRANSPARENT             ; mode
                push    ecx             ; HDC
                mov        hDC, ecx
                call    ds:SetBkMode
                mov     edx, [esp+10h+arg_8]
                mov     eax, [esp+10h]
                push    edx             ; COLORREF
                push    eax             ; HDC
                call    ds:SetTextColor
                mov     ebx, [esp+10h+lpString]
                push    ebx             ; lpString
                call    ds:lstrlenA
                mov     ecx, [esp+24h]
                mov     edx, [esp+10h+arg_C]
                push    eax             ; int
                mov     eax, [esp+14h]
                push    ebx             ; LPCSTR
                push    ecx             ; int
                push    edx             ; int
                push    eax             ; HDC
                call    ds:TextOutA
                mov     edx, [esp+10h]
                mov     ecx, [esi]
                mov     eax, [ecx+68h]
 
                push    edx
                push    esi
                call    eax    ; Magic Call 2
                mov     eax, edi
                pop     ebx
 
 
loc_4012FC:                             ; CODE XREF: sub_401290+17j
                pop     edi
                pop     esi
 
 
    ret
 
draw_text endp


and this
include \masm32\include\gdi32.inc
includelib \masm32\lib\gdi32.lib
in rarara. asm top part (they were toghether)

and these

#1:
;makes the background of the first line in the credits transparent
invoke CallPatch,004272C2h, addr draw_text

#2:
;i haven't tested this, should make all text transparent
invoke JmpPatch,00401290h, addr draw_text

tried both not working
Reply
Thanks given by:


Messages In This Thread
Transparent Background for Text - by Boop - 07-21-2009, 10:01 AM
RE: Transparent Background for Text - by Boop - 07-21-2009, 11:49 AM
RE: Transparent Background for Text - by TheNave - 07-21-2009, 12:27 PM
RE: Transparent Background for Text - by naruto hyuuga - 07-22-2009, 11:36 AM
RE: Transparent Background for Text - by Boop - 07-22-2009, 11:53 AM
RE: Transparent Background for Text - by Boop - 07-22-2009, 01:03 PM
RE: Transparent Background for Text - by Ramond - 07-22-2009, 01:03 PM



Users browsing this thread: 1 Guest(s)