Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include <windows.h>
- #include <D3DX9.h>
- #include "Function.h"
- #include "systeminclude.h"
- #include <iostream>
- using namespace std;
- D3DVIEWPORT9 cViewport;
- int Crosshair;
- float ScreenCenterX = 0.0f;
- float ScreenCenterY = 0.0f;
- #define GREEN D3DCOLOR_ARGB(255, 000, 255, 000)
- #define crosshair 0
- #define PI 3.14159265//Defining what PI is. PI is a Circle
- LPDIRECT3DDEVICE9 pDevice;
- ID3DXLine *pLine;
- D3DCOLOR Red = D3DCOLOR_ARGB(255, 255, 0, 0);
- HRESULT WINAPI hkEndScene (LPDIRECT3DDEVICE9 pDevice)
- {
- pDevice->GetViewport(&cViewport);
- ScreenCenterX = (float)cViewport.Width / 2;
- ScreenCenterY = (float)cViewport.Height / 2;
- if ( Crosshair )
- {
- D3DRECT Rect1 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+8, ScreenCenterY+1};
- D3DRECT Rect2 = {ScreenCenterX, ScreenCenterY-8, ScreenCenterX+1, ScreenCenterY+8};
- pDevice->Clear(1, &Rect1, D3DCLEAR_TARGET, Red, 0, 0);
- pDevice->Clear(1, &Rect2, D3DCLEAR_TARGET, Red, 0, 0);
- }
- if ( GetAsyncKeyState( VK_INSERT ) &1 )
- {
- Crosshair = !Crosshair;
- }
- return hkEndScene(pDevice);
- }
Advertisement
Add Comment
Please, Sign In to add comment