Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. #ifndef COVERLAY_H
  2. #define COVERLAY_H
  3.  
  4. #include <Windows.h>
  5. #include <TlHelp32.h>
  6.  
  7. #include "stdafx.h"
  8.  
  9. #define OVERLAY_NAME "Overlay"
  10.  
  11. class COverlay {
  12. public:
  13.     bool init();
  14.     void size(int &w, int &h);
  15.     bool initDirectX();
  16.     bool preFrame();
  17.     bool postFrame();
  18.  
  19.     void DrawLine(float x1, float y1, float x2, float y2, int thickness, int r, int g, int b, int a = 255);
  20.  
  21.     IDirect3DDevice9* GetDevice();
  22.  
  23.     HWND h_Target, h_Overlay;
  24. protected:
  25.     int m_Width, m_Height;
  26.     IDirect3D9*             pDirect3D;
  27.     IDirect3DDevice9*       pDevice;
  28.     D3DPRESENT_PARAMETERS   pPresent;
  29.     ID3DXLine*              pLine;
  30. private:
  31.     static LRESULT CALLBACK WndProc(HWND h, UINT message, WPARAM wPar, LPARAM lPar);
  32. };
  33.  
  34. inline COverlay* Overlay() {
  35.     static COverlay instance;
  36.     return &instance;
  37. }
  38.  
  39. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement