allen434343

Untitled

Jul 12th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. // 1337 Legit JasperXD Crosshair.cpp : Defines the exported functions for the DLL application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <windows.h>
  6. #include <d3d9.h>
  7. #include <d3dx9.h>
  8.  
  9. #pragma comment (lib,"d3d9")
  10. #pragma comment (lib,"d3dx9")
  11.  
  12. float ScreenCenterX = 0.0f;//Horizontal Position
  13. float ScreenCenterY = 0.0f;//Vertical Position
  14. bool xhair = false;
  15. D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );
  16.  
  17. if (GetAsyncKeyState (VK_INSERT)&1)
  18. {
  19. xhair = !xhair;
  20. }
  21.  
  22. if (xhair)
  23. {
  24. D3DVIEWPORT9 viewP;
  25. pDevice->GetViewport( &viewP );
  26. DWORD ScreenCenterX = viewP.Width / 2;
  27. DWORD ScreenCenterY = viewP.Height / 2;
  28. D3DRECT rect1 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+5, ScreenCenterY+1};
  29. D3DRECT rect2 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+1, ScreenCenterY+5};
  30. pDevice->Clear( 1, &rect1, D3DCLEAR_TARGET, color, 0, 0 );
  31. pDevice->Clear( 1, &rect2, D3DCLEAR_TARGET, color, 0, 0 );
  32. }
Advertisement
Add Comment
Please, Sign In to add comment