Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HRESULT WINAPI Hooked_Present(LPDIRECT3DDEVICE9 Device, CONST RECT *pSrcRect, CONST RECT *pDestRect, HWND hDestWindow, CONST RGNDATA *pDirtyRegion)
- {
- if (!g_Init)
- {
- if (g_Font == NULL)
- D3DXCreateFontA(Device, 21, 0, true, 1, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &g_Font);
- memset(g_Text, 0, sizeof(g_Text));
- GenerateTexture(Device, &g_Blue, D3DCOLOR_ARGB(255, 0, 0, 255));
- GenerateTexture(Device, &g_Green, D3DCOLOR_ARGB(255, 0, 255, 0));
- g_Init = !g_Init;
- }
- D3DVIEWPORT9 VP;
- memset(&VP, 0, sizeof(D3DVIEWPORT9));
- Device->GetViewport(&VP);
- float X = (float)VP.Width / 800;
- float Y = (float)VP.Height / 600;
- 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));
- Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y, D3DCOLOR_ARGB(200, 255, 0, 0), "Momo5000's Return Address Logger");
- memset(g_Text, 0, sizeof(g_Text));
- sprintf_s(g_Text, sizeof(g_Text), "Vector size: %d", g_Vector.size());
- Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y + 25.0f, D3DCOLOR_ARGB(200, 0, 0, 255), g_Text);
- memset(g_Text, 0, sizeof(g_Text));
- sprintf_s(g_Text, sizeof(g_Text), "Selected Index: %d", g_Index);
- Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y + 50.0f, D3DCOLOR_ARGB(200, 0, 0, 255), g_Text);
- memset(g_Text, 0, sizeof(g_Text));
- sprintf_s(g_Text, sizeof(g_Text), "Selected Address: [0x%X]", g_SelectedAddress);
- Drawing::DrawString(g_Font, X * TEXT_POS_X, Y * TEXT_POS_Y + 75.0f, D3DCOLOR_ARGB(200, 0, 0, 255), g_Text);
- return Orginal_Present(Device, pSrcRect, pDestRect, hDestWindow, pDirtyRegion);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement