Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. HRESULT WINAPI Hooked_Present(LPDIRECT3DDEVICE9 Device, CONST RECT *pSrcRect, CONST RECT *pDestRect, HWND hDestWindow, CONST RGNDATA *pDirtyRegion)
  2. {
  3. if (!g_Init)
  4. {
  5. if (g_Font == NULL)
  6. D3DXCreateFontA(Device, 21, 0, true, 1, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &g_Font);
  7. memset(g_Text, 0, sizeof(g_Text));
  8. GenerateTexture(Device, &g_Blue, D3DCOLOR_ARGB(255, 0, 0, 255));
  9. GenerateTexture(Device, &g_Green, D3DCOLOR_ARGB(255, 0, 255, 0));
  10. g_Init = !g_Init;
  11. }
  12.  
  13. D3DVIEWPORT9 VP;
  14. memset(&VP, 0, sizeof(D3DVIEWPORT9));
  15. Device->GetViewport(&VP);
  16. float X = (float)VP.Width / 800;
  17. float Y = (float)VP.Height / 600;
  18.  
  19. Drawing::Box(Device, X * TEXT_POS_X - 10.0f, Y * TEXT_POS_Y + 23.0f, 300.0f, 82.0f, 4.0f, D3DCOLOR_ARGB(200, 255, 0, 0));
  20. Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y, D3DCOLOR_ARGB(200, 255, 0, 0), "Momo5000's Return Address Logger");
  21.  
  22. memset(g_Text, 0, sizeof(g_Text));
  23. sprintf_s(g_Text, sizeof(g_Text), "Vector size: %d", g_Vector.size());
  24. Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y + 25.0f, D3DCOLOR_ARGB(200, 0, 0, 255), g_Text);
  25.  
  26. memset(g_Text, 0, sizeof(g_Text));
  27. sprintf_s(g_Text, sizeof(g_Text), "Selected Index: %d", g_Index);
  28. Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y + 50.0f, D3DCOLOR_ARGB(200, 0, 0, 255), g_Text);
  29.  
  30. memset(g_Text, 0, sizeof(g_Text));
  31. sprintf_s(g_Text, sizeof(g_Text), "Selected Address: [0x%X]", g_SelectedAddress);
  32. Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y + 75.0f, D3DCOLOR_ARGB(200, 0, 0, 255), g_Text);
  33.  
  34. return Orginal_Present(Device, pSrcRect, pDestRect, hDestWindow, pDirtyRegion);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement