Tenés que hookear DX9 o la versión que tenga.
Luego en
myDrawIndexedPrimitive podés poner:
DrawCrosshair(pDevice, 10, 1, COLOR__BLUE);
D3DCOLOR COLOR__BLUE = D3DCOLOR_ARGB(255, 0, 0, 255);
void DrawCrosshair(LPDIRECT3DDEVICE9 pDevice, int size, int strong, D3DCOLOR xcolor)
{
/*
New 05/03/2013
*/
D3DVIEWPORT9 viewPort;
float ScreenCenterX = 0.0f;
float ScreenCenterY = 0.0f;
pDevice->GetViewport(&viewPort);
ScreenCenterX = (float)viewPort.Width / 2;
ScreenCenterY = (float)viewPort.Height / 2;
D3DRECT rec2 = { (ScreenCenterX-size), ScreenCenterY, (ScreenCenterX+size), (ScreenCenterY+strong)};
D3DRECT rec3 = { ScreenCenterX, (ScreenCenterY-size), (ScreenCenterX+strong), (ScreenCenterY+size)};
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, xcolor, 1000, 0);
pDevice->Clear(1, &rec3, D3DCLEAR_TARGET, xcolor, 100, 0);
/*
New 05/03/2013
*/
/*
int iCenterX = GetSystemMetrics( 0 ) / 2;
int iCenterY = GetSystemMetrics( 1 ) / 2;
if( iCenterX < 20 && iCenterY < 20 )
{
iCenterX = ( GetSystemMetrics( 0 ) / 2 );
iCenterY = ( GetSystemMetrics( 1 ) / 2 );
}
D3DRECT rec2 = { iCenterX- size, iCenterY, iCenterX+ size, iCenterY+ strong};
D3DRECT rec3 = { iCenterX, iCenterY- size, iCenterX+ strong,iCenterY+ size};
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, xcolor, 1000, 0);
pDevice->Clear(1, &rec3, D3DCLEAR_TARGET, xcolor, 100, 0);
*/
}
Ése es parte de un hack que hice para el Killing Floor