1. void Hacks::DrawFilledRectangle(int x, int y, int w, int h, D3DCOLOR Color, IDirect3DDevice9 * d3dDevice)
  2. {
  3. D3DRECT rct = (x, y, x + w, y + h);
  4. d3dDevice->Clear(1, &rct, D3DCLEAR_TARGET | D3DCLEAR_TARGET, Color, 0, 0);
  5. }
  6. void Hacks::DrawText(LPCSTR TextToDraw, int x, int y, D3DCOLOR Color)
  7. {
  8. RECT rct = (x-120, x+120, y+15);
  9. Font->DrawTextA(NULL, TextToDraw, -1, &rct, DT_NOCLIP, Color);
  10. }
  11. D3DRECT function stored in d3d9types.h as:
  12. typedef struct _D3DRECT {
  13. LONG x1;
  14. LONG y1;
  15. LONG x2;
  16. LONG y2;
  17. } D3DRECT;
  18. RECT function stored in Windef.h as:
  19. typedef struct tagRECT
  20. {
  21. LONG left;
  22. LONG top;
  23. LONG right;
  24. LONG bottom;
  25. } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;