Hey this is just a simple question i bet most coders can answer. I havent used Present and Endscene before so...
Code:
#Include"Function.h"
#Include"Hook.h"
^
|
|
|
Menu Crap
|
|
HRESULT WINAPI hkPresent(LPDIRECT3DDEVICE9 pDevice,CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{
_asm PUSHAD;
//DrawsFont//
if(pFont == NULL) D3DXCreateFontA(pDevice, 30, 6, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Perpetua", &pFont);
//D3DXCreateLine(pDevice,&pLine); //draws line/circle
//DrawsFont//
////// Draw menu checkboxes and stuff
if(Hack14 && IsIngame())
{
memcpy((LPVOID)Nametag1,"\x90\x90", 2);
memcpy((LPVOID)Nametag2, "\x90\x90", 2);
}else if(!IsIngame()){
memcpy((LPVOID)Nametag1, "\x75\x21", 2);
memcpy((LPVOID)Nametag2, "\x75\x05", 2);
}
Code:
This is Function.h
#define Nametag1 0x373723AC
#define Nametag2 0x3737244D
typedef bool (*IsConnected_t)(void);
bool IsIngame()
{
DWORD* LTBase = (DWORD*)0x3780CB90; //0x3780CB90
IsConnected_t pConnected = *(IsConnected_t*)(*LTBase + 0x8C);
return pConnected();
}
My question is....why does this D/C??Is it because i am putting it in Present and EndScene