Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef OVERLAY_H
- #define OVERLAY_H
- #pragma once
- #include "Main.h"
- #undef DrawText
- #define COLOR_WHITE D3DCOLOR_RGBA(255, 255, 255, 255)
- #define COLOR_BLACK D3DCOLOR_RGBA(0, 0, 0, 255)
- #define COLOR_RED D3DCOLOR_RGBA(255, 0, 0, 255)
- #define COLOR_GREEN D3DCOLOR_RGBA(0, 255, 0, 255)
- #define COLOR_BLUE D3DCOLOR_RGBA(0, 0, 255, 255)
- #define COLOR_CYAN D3DCOLOR_RGBA(0, 128, 255, 255)
- #define COLOR_YELLOW D3DCOLOR_RGBA(255, 255, 0, 255)
- class COverlay
- {
- public:
- COverlay ();
- ~COverlay ();
- bool Init ();
- void Shutdown ();
- bool PreFrame ();
- void PostFrame ();
- void DrawRect ( int x, int y, int w, int h, D3DCOLOR color );
- void DrawText ( int x, int y, D3DCOLOR color, const char* text, ... );
- void SetGameWnd ( HWND hWnd );
- private:
- static LRESULT CALLBACK WndProc ( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
- private:
- IDirect3D9* m_pDirect3d;
- IDirect3DDevice9* m_pDevice;
- ID3DXLine* m_pLine;
- ID3DXFont* m_pFont;
- MSG m_MSG;
- D3DPRESENT_PARAMETERS m_Present;
- int m_Resolution[2];
- int m_Center[2];
- HWND m_hGameWnd;
- HWND m_hOverlayWnd;
- };
- extern COverlay* overlay;
- #endif // OVERLAY_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement