allen434343

cpp jasper

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