allen434343

HELP MEEEE CROSSHAIR

Jul 12th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. 1337 legit jasperxd.cpp ----------------------------------------------------------------------------------------
  2.  
  3. #include "stdafx.h"
  4. #include <windows.h>
  5. #include <d3d9.h>
  6. #include <d3dx9.h>
  7.  
  8. #pragma comment (lib,"d3d9")
  9. #pragma comment (lib,"d3dx9")
  10.  
  11. LPDIRECT3DDEVICE9 crosshair;
  12. bool ScreenCenterX = false;
  13. bool ScreenCenterY = false;
  14. void crosshair(void);
  15.  
  16. void Crosshair(LPDIRECT3DDEVICE9 pDevice, D3DCOLOR color)
  17. {
  18. D3DVIEWPORT9 viewP;
  19. pDevice->GetViewport( &viewP );
  20. DWORD ScreenCenterX = viewP.Width / 2;
  21. DWORD ScreenCenterY = viewP.Height / 2;
  22. D3DRECT rect1 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+5, ScreenCenterY+1};
  23. D3DRECT rect2 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+1, ScreenCenterY+5};
  24. pDevice->Clear( 1, &rect1, D3DCLEAR_TARGET, color, 0, 0 );
  25. pDevice->Clear( 1, &rect2, D3DCLEAR_TARGET, color, 0, 0 );
  26. }
  27.  
  28. dllmain.cpp ----------------------------------------------------------------------------------------
  29.  
  30. #include "stdafx.h"
  31.  
  32. #define WIN32_LEAN_AND_MEAN
  33. #include <windows.h>
  34. #define DLL_FUNC extern *C* __declspec(dllexport)
  35.  
  36. DLL_FUNC int __stdcall Hello()
  37. {
  38. MessageBox(HWND_DESKTOP, "Made By JasperXD", "JasperXD", MB_OK);
  39. return TRUE;
  40. }
  41.  
  42. BOOL APIENTRY DllMain( HMODULE hModule,
  43. DWORD ul_reason_for_call,
  44. LPVOID lpReserved
  45. )
  46. {
  47. switch (ul_reason_for_call)
  48. {
  49. case DLL_PROCESS_ATTACH:
  50. case DLL_THREAD_ATTACH:
  51. case DLL_THREAD_DETACH:
  52. case DLL_PROCESS_DETACH:
  53. break;
  54. }
  55. return TRUE;
  56. }
  57.  
  58.  
  59. stdafx.h ----------------------------------------------------------------------------------------
  60.  
  61. // stdafx.h : include file for standard system include files,
  62. // or project specific include files that are used frequently, but
  63. // are changed infrequently
  64. //
  65.  
  66. #pragma once
  67.  
  68. #include "targetver.h"
  69.  
  70. #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
  71. // Windows Header Files:
  72. #include <windows.h>
  73. #include <stdio.h>
  74. #include <d3d9.h>
  75. #include <d3dx9.h>
  76.  
  77. #pragma comment(lib, "d3dx9.lib")
  78.  
  79. // TODO: reference additional headers your program requires here
Advertisement
Add Comment
Please, Sign In to add comment