hab da ein problem mit dieser funktion (IDirect3D9->CreateDevice)..
die funktion returned mit einem wert > 0, wenn ich aber g_pD3D9Device anschaue steht 0 drin :|
Code:
push g_pD3D9Device
push ecx
push 20h
push eax
push 1
push 0
thiscall g_pD3D9, CreateDevice
test eax, eax
je _tc_initdx_failed
mov eax, [g_pD3D9Device] ; <- hier
test eax, eax ; <- hier
je _tc_initdx_failed ; <- hier
d3dpp fülle ich so:
Code:
mov ecx, d3dpp
xor eax, eax
mov [ecx+D3DPRESENT_PARAMETERS.MultiSampleType], eax
mov [ecx+D3DPRESENT_PARAMETERS.MultiSampleQuality], eax
mov [ecx+D3DPRESENT_PARAMETERS.Flags], eax
mov [ecx+D3DPRESENT_PARAMETERS.FullScreen_RefreshRateInHz], eax
mov [ecx+D3DPRESENT_PARAMETERS.PresentationInterval], eax
mov [ecx+D3DPRESENT_PARAMETERS.EnableAutoDepthStencil], eax
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferFormat], eax
mov ax, 1
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferCount], eax
mov [ecx+D3DPRESENT_PARAMETERS.SwapEffect], eax
mov [ecx+D3DPRESENT_PARAMETERS.Windowed], eax
mov eax, 800
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferWidth], eax
mov eax, 600
mov [ecx+D3DPRESENT_PARAMETERS.BackBufferHeight], eax
mov eax, hWnd
mov [ecx+D3DPRESENT_PARAMETERS.hDeviceWindow], eax
mein thiscall macro stellt auch kein problem dar:
Code:
%macro thiscall 2
mov eax, [%1]
push eax
mov ecx, [eax]
mov eax, [ecx+%2]
call eax
%endmacro
nur hab ich leider kp wo der fehler liegt :|