Originally Posted by
ac1d_buRn
There is nothing wrong with my X-Hair.
The SetViewPort gets the screen width and halfs it to find the perfect center!
Also, Are you actually doing that code in SetViewPort. If you not, heres where you need it.
Globals:
[php]
typedef HRESULT ( WINAPI* tSetViewport)( LPDIRECT3DDEVICE9 pDevice, CONST D3DVIEWPORT9* pViewport);
tSetViewport oSetViewport;
[/php]
And the actuall SVP
[php]
HRESULT WINAPI nSetViewport(LPDIRECT3DDEVICE9 pDevice,CONST D3DVIEWPORT9* pViewport)
{
ScreenCenterX = ( float )pViewport->Width / 2;
ScreenCenterY = ( float )pViewport->Height / 2;
}
[/php]