Code:
HRESULT WINAPI DrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE A, INT B, UINT C, UINT D, UINT E, UINT F)
{
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT m_Stride; UINT OffsetsInBytes;
if (pDevice->GetStreamSource(NULL, &Stream_Data, &OffsetsInBytes, &m_Stride) == D3D_OK) { Stream_Data->Release(); }
if (WallHacker)
{
if ((DWORD)_ReturnAddress() >= 0x785691 && (DWORD)_ReturnAddress() <= 0x785691)
{
pDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
oDrawIndexedPrimitive(pDevice, A, B, C, D, E, F);
pDevice->SetRenderState(D3DRS_ZENABLE, TRUE);
}
}
if (ChamsColor)
{
if ((DWORD)_ReturnAddress() >= 0x785691 && (DWORD)_ReturnAddress() <= 0x785691)
{
pDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
pDevice->SetTexture(NULL, tRed);
oDrawIndexedPrimitive(pDevice, A, B, C, D, E, F);
pDevice->SetRenderState(D3DRS_ZENABLE, TRUE);
pDevice->SetTexture(NULL, tGreen);
}
}
return oDrawIndexedPrimitive(pDevice, A, B, C, D, E, F);
}
Code:
HRESULT GenerateTexture(LPDIRECT3DDEVICE9 pDevice, LPDIRECT3DTEXTURE9 *D3DTexture, DWORD D3DColor)
{
if (FAILED(pDevice->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, D3DTexture, NULL)))
return E_FAIL;
WORD Color = ((WORD)((D3DColor >> 28) & 0xF) << 12)
| (WORD)(((D3DColor >> 20) & 0xF) << 8)
| (WORD)(((D3DColor >> 12) & 0xF) << 04)
| (WORD)(((D3DColor >> 04) & 0xF) << 00);
D3DLOCKED_RECT pRect;
(*D3DTexture)->LockRect(NULL, &pRect, NULL, NULL);
WORD *pBits = (PWORD)pRect.pBits;
for (INT i = 0; i<8 * 8; i++)
*pBits++ = Color;
(*D3DTexture)->UnlockRect(NULL);
return S_OK;
}
Code:
...
GenerateTexture(pDevice, &tRed, D3DCOLOR_ARGB(255, 255, 0, 0));
GenerateTexture(pDevice, &tGreen, D3DCOLOR_ARGB(255, 0, 255, 0));
...
Code:
...
oDrawIndexedPrimitive = (tDrawIndexedPrimitive)DetourCreate((PBYTE)vTable[82], (PBYTE)&DrawIndexedPrimitive, 5/*Detour len*/);
...
Code:
Smoke : Stride -> 36
LittleHelpGuyBody: Stride -> 48
PlayerBody: Stride -> 60 ( Hair & Backpack ) Stride -> 68 ( Face ) Stride -> 76 ( Body )
Weapon : Stride -> 32
Tank ( Part of ) : Stride -> 28
NV -> 58 & 236 & 250 & 437
PC -> 82 & 296 & 384 & 729
36 => square under the player
40 => my gun
56 => my player
72 => all players chams