
void Wallhack( LPDIRECT3DDEVICE9 D3DDEVICE, DWORD VALUE )
{
D3DDEVICE->SetRenderState( D3DRS_ZENABLE, VALUE );
}
void FullBright( LPDIRECT3DDEVICE9 D3DDEVICE, DWORD VALUE )
{
D3DDEVICE->SetRenderState( D3DRS_LIGHTING, VALUE );
}
void Fillmode( LPDIRECT3DDEVICE9 D3DDEVICE, DWORD FILLMODE )
{
D3DDEVICE->SetRenderState( D3DRS_FILLMODE, FILLMODE );
}
void Chams( LPDIRECT3DDEVICE9 D3DDEVICE, DWORD COLOR )
{
D3DDEVICE->SetRenderState( D3DRS_AMBIENT, COLOR );
}
void InstantChams( LPDIRECT3DDEVICE9 D3DDEVICE, LPDIRECT3DTEXTURE9 tCOLOR, DWORD COLOR )
{
GenerateTexture( D3DDEVICE, &tCOLOR, COLOR );
D3DDEVICE->SetTexture( 0, tCOLOR );
}
/*Wallhack*/ Wallhack( pDevice, D3DZB_FALSE ); /*FullBright*/ FullBright( pDevice, D3DZB_FALSE ); /*Fillmode*/ FullBright( pDevice, D3DFILL_WIREFRAME ); //You even can use Point etc. /*Chams*/ Chams( pDevice, Red ); /*Instant Chams*/ InstantChams( pDevice, tYellow, Yellow );//Define tYellow like that: LPDIRECT3DTEXTURE9 tYellow;
HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
{
if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
return E_FAIL;
WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
|(WORD)(((colour32>>20)&0xF)<<8)
|(WORD)(((colour32>>12)&0xF)<<4)
|(WORD)(((colour32>>4)&0xF)<<0);
D3DLOCKED_RECT d3dlr;
(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
WORD *pDst16 = (WORD*)d3dlr.pBits;
for(int xy=0; xy < 8*8; xy++)
*pDst16++ = colour16;
(*ppD3Dtex)->UnlockRect(0);
return S_OK;
}









// Windows 7
DIPD3D9 = FindPattern( hD3D,
0x128000,
( PBYTE )"\xC3\x90\x90\x90\x90\x90\x8B\xFF\x55\x8B\xEC\x5D\xEB\x05\x90\x90\x90\x90\x90\x8B\xFF\x55\x8B\xEC\x6A\xFF",
"xxxxxxxxxxxxxxxxxxxxxxxxxx" );
.
.
.