keybode

Renderer.h

Jan 23rd, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.93 KB | None | 0 0
  1. #ifndef RENDERER_H
  2. #define RENDERER_H
  3.  
  4. #include "Include.h"
  5.  
  6. #define COLOR_WHITE     D3DCOLOR_RGBA( 255, 255, 255, 255 )
  7. #define COLOR_RED       D3DCOLOR_RGBA( 255, 0, 0, 255 )
  8. #define COLOR_GREEN     D3DCOLOR_RGBA( 0, 255, 0, 255 )
  9. #define COLOR_BLUE      D3DCOLOR_RGBA( 0, 0, 255, 255 )
  10. #define COLOR_GRAY      D3DCOLOR_RGBA( 100, 100, 100, 255 )
  11. #define COLOR_BLACK     D3DCOLOR_RGBA( 0, 0, 0, 255 )
  12. #define COLOR_DARK_GRAY D3DCOLOR_RGBA( 50, 50, 50, 255 )
  13. #define COLOR_CYAN      D3DCOLOR_RGBA( 0, 150, 255, 255 )
  14. #define COLORCODE( r, g, b, a ) D3DCOLOR_ARGB( a, r, g, b )
  15.  
  16. class Vector;
  17.  
  18. class CRenderer
  19. {
  20. public:
  21.     CRenderer( void );
  22.     ~CRenderer( void );
  23.  
  24.     virtual void                Update( IDirect3DDevice9* pDevice );
  25.     virtual void                Release( void );
  26.  
  27.     virtual void                SetFont( ID3DXFont* pFont );
  28.     virtual void                SetLine( ID3DXLine* pLine );
  29.     virtual void                SetDevice( IDirect3DDevice9* pDevice );
  30.  
  31.     virtual IDirect3DDevice9*   GetDevice( void );
  32.     virtual ID3DXFont*          GetFont( void );
  33.     virtual ID3DXLine*          GetLine( void );
  34.  
  35.     virtual void                DrawRect( int x, int y, int w, int h, DWORD_PTR color );
  36.     virtual void                DrawRectOutlined( int x, int y, int w, int h, DWORD_PTR color, DWORD_PTR outlined, int thickness );
  37.     virtual void                DrawBorderBox( int x, int y, int w, int h, DWORD_PTR color, int thickness );
  38.     virtual void                DrawBorderBoxOutlined( int x, int y, int w, int h, DWORD_PTR color, DWORD_PTR outlined, int thickness );
  39.     virtual void                DrawLine( int x0, int y0, int x1, int y1, DWORD_PTR color );
  40.     virtual void                DrawLine( Vector x, Vector y, DWORD_PTR color );
  41.     virtual void                DrawString( int x, int y, DWORD_PTR color, const char* text, ... );
  42.     virtual void                DrawStringOutlined( int x, int y, DWORD_PTR color, const char* text, ... );
  43.  
  44. private:
  45.     virtual bool                IsReady( void );
  46.  
  47. private:
  48.     IDirect3DDevice9*           m_pDevice;
  49.     ID3DXFont*                  m_pFont;
  50.     ID3DXLine*                  m_pLine;
  51. };
  52.  
  53. extern CRenderer* g_pRenderer;
  54.  
  55. #endif // RENDERER_H
Advertisement
Add Comment
Please, Sign In to add comment