Advertisement
keybode

Overlay.h

Dec 17th, 2014
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #ifndef OVERLAY_H
  2. #define OVERLAY_H
  3.  
  4. #pragma once
  5.  
  6. #include "Main.h"
  7.  
  8. #undef DrawText
  9.  
  10. #define COLOR_WHITE D3DCOLOR_RGBA(255, 255, 255, 255)
  11. #define COLOR_BLACK D3DCOLOR_RGBA(0, 0, 0, 255)
  12. #define COLOR_RED D3DCOLOR_RGBA(255, 0, 0, 255)
  13. #define COLOR_GREEN D3DCOLOR_RGBA(0, 255, 0, 255)
  14. #define COLOR_BLUE D3DCOLOR_RGBA(0, 0, 255, 255)
  15. #define COLOR_CYAN D3DCOLOR_RGBA(0, 128, 255, 255)
  16. #define COLOR_YELLOW D3DCOLOR_RGBA(255, 255, 0, 255)
  17.  
  18. class COverlay
  19. {
  20. public:
  21. COverlay ();
  22. ~COverlay ();
  23.  
  24. bool Init ();
  25. void Shutdown ();
  26.  
  27. bool PreFrame ();
  28. void PostFrame ();
  29.  
  30. void DrawRect ( int x, int y, int w, int h, D3DCOLOR color );
  31. void DrawText ( int x, int y, D3DCOLOR color, const char* text, ... );
  32.  
  33. void SetGameWnd ( HWND hWnd );
  34.  
  35. private:
  36. static LRESULT CALLBACK WndProc ( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
  37.  
  38. private:
  39. IDirect3D9* m_pDirect3d;
  40. IDirect3DDevice9* m_pDevice;
  41. ID3DXLine* m_pLine;
  42. ID3DXFont* m_pFont;
  43. MSG m_MSG;
  44. D3DPRESENT_PARAMETERS m_Present;
  45. int m_Resolution[2];
  46. int m_Center[2];
  47. HWND m_hGameWnd;
  48. HWND m_hOverlayWnd;
  49. };
  50.  
  51. extern COverlay* overlay;
  52.  
  53. #endif // OVERLAY_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement