Philippine Online Games
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Philippine Online Games

The No.1 Community Forum in The Philippines
 
HomeGalleryLatest imagesSearchRegisterLog in
If this is your first visit? be sure to check out the FAQ by clicking the link above. You may have to register before you can post and Download. Click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 

 Great D3D Crosshair source

Go down 
2 posters
AuthorMessage
Vip_SolidSnake
Admin
Vip_SolidSnake


Posts : 61
Reputation : 26
Join date : 2010-02-04

Great D3D Crosshair source Empty
PostSubject: Great D3D Crosshair source   Great D3D Crosshair source I_icon_minitimeSun 7 Feb 2010 - 17:41

Make your my own Great Crosshair, using D3DXCOLOR.D3D Programming Tutorials

Code:

//Globals
#include <D3DX8.h>

//NOTE: If you're planning on doing this in DirectX9
// you will have to change the 8 to 9 to include the correct header.

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

Code:

//in SetViewport add this
ScreenCenterX = ( float )pViewport->Width / 2;
ScreenCenterY = ( float )pViewport->Height / 2;

Code:
//in EndScene

if (GetAsyncKeyState (VK_INSERT)&1)
{
xhair = !xhair;
}

if (xhair)
{    D3DRECT rec1 = {ScreenCenterX-25, ScreenCenterY, ScreenCenterX+ 25, ScreenCenterY+1};
   D3DRECT rec2 = {ScreenCenterX, ScreenCenterY-25, ScreenCenterX+ 1,ScreenCenterY+25}; 
   psyDevice->Clear( 1, &rec1, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );//red
   psyDevice->Clear( 1, &rec2, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );

   
   D3DRECT rec3 = {ScreenCenterX-15, ScreenCenterY, ScreenCenterX+ 15, ScreenCenterY+1};
   D3DRECT rec4 = {ScreenCenterX, ScreenCenterY-15, ScreenCenterX+ 1,ScreenCenterY+15}; 
   psyDevice->Clear( 1, &rec3, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 0.0, 0.0), 0,  0 );// black
   psyDevice->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 0.0, 0.0), 0,  0 );
   
   D3DRECT rec5 = {ScreenCenterX-3, ScreenCenterY, ScreenCenterX+ 3, ScreenCenterY+1};
   D3DRECT rec6 = {ScreenCenterX, ScreenCenterY-3, ScreenCenterX+ 1,ScreenCenterY+3}; 
   psyDevice->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );// black
   psyDevice->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );

}


Just an easy source for those that want a Great Crosshair.
to turn it off/on the hotkey is Insert



[You must be registered and logged in to see this image.]
Mobile number - 09286880872
Yahoo Messenger - [You must be registered and logged in to see this link.] -
[You must be registered and logged in to see this image.]
Back to top Go down
http://vipcoders.omgforum.net
kissme123




Posts : 1
Reputation : 0
Join date : 2010-03-22

Great D3D Crosshair source Empty
PostSubject: Re: Great D3D Crosshair source   Great D3D Crosshair source I_icon_minitimeTue 23 Mar 2010 - 2:17

PAKI UPLOAD NAMAN UNG MGA FILES NA KAILANGAN NAMIN PARA D MAG ERROR


d3d8.lib
detours.h

YAN LANG PO SALAMAT
Back to top Go down
 
Great D3D Crosshair source
Back to top 
Page 1 of 1
 Similar topics
-
» NEW UNDETECTED CROSSHAIR JUST FOR YOU GUYZ............
» NEW UNDETECTED CROSSHAIR JUST FOR YOU GUYZ............

Permissions in this forum:You cannot reply to topics in this forum
Philippine Online Games :: VIP :: Programming :: D3D Programming [Tutorials]-
Jump to: