if (wallhack>0)
{
pDevice->SetRenderState(D3DRS_DEPTHBIAS, 0);
if ((vSize == 2356 || vSize == 900 ||vSize == 2008 || vSize == 640) || (Stride == 36 && vSize == 1436) || (Stride == 48 && vSize == 1436))
{
if (wallhack == 2 && vSize != 1436)
{
float sColor[4] = { 0.0f, 1.0f, 0.0f, 1.0f };//green
pDevice->SetPixelShaderConstantF(0, sColor, 1);
SetTexture_orig(pDevice, 0, Red);
SetTexture_orig(pDevice, 1, Red);
}
float bias = 1000.0f;
float bias_float = static_cast<float>(-bias);
bias_float /= 10000.0f;
pDevice->SetRenderState(D3DRS_DEPTHBIAS, (DWORD)&bias_float);
}
}
=======================================================
//logger
if (GetAsyncKeyState('O') & 1) //-
countnum--;
if (GetAsyncKeyState('P') & 1) //+
countnum++;
if (countnum == vSize / 100)//vdesc.Size / 100000)
if (GetAsyncKeyState('I') & 1) //log
Log("Stride == %d && vSize == %d", Stride, vSize);
if (countnum == vSize / 100)//vdesc.Size / 100000)
{
//SetTexture_orig(pDevice, 0, Yellow);
//SetTexture_orig(pDevice, 1, Yellow);
return D3D_OK; //delete texture
//pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
}
return SetTexture_orig(pDevice, Sampler, pTexture);
}