Crosshair D3D

11/02/2008 16:30 ρσιѕση#1
Here if you guys ever going to make a crosshair
Credits Frit0
Code:
//Globals

float ScreenCenterX = 0.0f;//Horizontal Position
float ScreenCenterY = 0.0f;//Vertical Position
bool crosshair = false;
D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );


//Add this SetViewport

ScreenCenterX = ( float )pViewport->Width / 2;
ScreenCenterY = ( float )pViewport->Height / 2;

//Add this in EndScene

if(crosshair)
{
D3DRECT rec2 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+2};
D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 2,ScreenCenterY+20};

m_pD3Ddev->Clear(1, &rec2, D3DCLEAR_TARGET,redt, 0, 0);
m_pD3Ddev->Clear(1, &rec3, D3DCLEAR_TARGET,redt, 0, 0);
11/02/2008 17:14 coolkid150#2
what it that for??? i mean where do u put the code in?
11/02/2008 21:24 ρσιѕση#3
Visual Studio 2005 or any alternative
11/03/2008 02:00 coolkid150#4
:confused::confused::confused::confused::confused: :confused:ok i have 2008 visual c+++ studios so all i do is put it in my .cpp and build it then what?>???:confused::confused::confused:
11/03/2008 17:50 syntex#5
Rather hook the directx or use a wrapper.

Wrapper automaticly find the directx and hook it (on almost every game), but mostly its detected. Its no problem to hook it by your self.
11/07/2008 05:50 hyper olly1#6
Nothing new guys its a crosshair...Nice job Posion.
11/08/2008 21:30 zeedzass#7
5555
verygood
11/09/2008 22:46 minidude11#8
wait where is it??
11/10/2008 23:18 ρσιѕση#9
Quote:
Originally Posted by zeedzass View Post
5555
verygood
What's the 5"s for?
Quote:
Originally Posted by minidude11 View Post
wait where is it??
Where's what?
11/13/2008 06:15 hyper olly1#10
mini dude u have to compile it... wat do u mkean where is it..
11/13/2008 21:50 coolkid150#11
hey jj (or now Poison!) can u make a thread on how to make a crosshair?? that would be appreciated :)