Kenseikuriomas (07-12-2012),Wizzup (09-16-2011)
Well i found this little source in other forum and i want it to share(copy/paste) with you guys
Simple D3D function, Easy to insert to an hack ,without any address.
WallHack:
No Fog:if(m_Stride == 44)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
WireFrame:if (nofog)
{
m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE, false);
}
Glass Wall:if (m_Stride == 44)
m_pD3Ddev->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
}
FullBright:if(m_Stride == 40)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
Point Mode:if (fullbright)
{
m_pD3Ddev->SetRenderState(D3DRS_LIGHTING, false);
m_pD3Ddev->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255,255,255));
}
else
{
m_pD3Ddev->SetRenderState(D3DRS_AMBIENT, false);
}
Color Fog:if(CH_Pointmode==1)
{
if(m_Stride == 44)
{
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_POINT);
}
}
Crossair:if(CH_Fog==1) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,0,0 ,255));
if(CH_Fog==2) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,0,2 55,0));
if(CH_Fog==3) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,255 ,0,0));
if(CH_Fog==4) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,160 ,0,255));
if(CH_Fog==5) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,255 ,255,255));
if(CH_Fog==6) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,0,0 ,0));
if(CH_Fog==7) pDevice->SetRenderState(D3DRS_FOGENABLE, false);
Chams:if(Crossx==1)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 0, 0), 0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 0, 0), 0, 0);
}
if(Crossx== 2)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255,0,0,255), 0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255,0,0,255), 0, 0);
}
if(Crossx==3)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 255, 255), 0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 255, 255), 0, 0);
}
if(Crossx==4)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 255, 0), 0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 255, 0), 0, 0);
}
and Credits to:if (Chams==0)
{
if(m_Stride==44)
{
pDevice->SetTexture(1,0);
pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(0,0,0, 0));
}
}
if (Chams==1)
{
if(m_Stride==44)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice->SetRenderState(D3DRS_AMBIENT,txtGreen);
pDevice->SetTexture(0,NULL);
pDrawIndexedPrimitive( pDevice,pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice->SetRenderState(D3DRS_AMBIENT, txtBlack);
}
}
if (Chams==2)
{
if(m_Stride==44)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice->SetRenderState(D3DRS_AMBIENT,txtBlue);
pDevice->SetTexture(0,NULL);
pDrawIndexedPrimitive( pDevice,pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice->SetRenderState(D3DRS_AMBIENT, txtYellow);
}
}
if (Chams==3)
{
if(m_Stride==44)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice->SetRenderState(D3DRS_AMBIENT,txtOrange);
pDevice->SetTexture(0,NULL);
pDrawIndexedPrimitive( pDevice,pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice->SetRenderState(D3DRS_AMBIENT, txtRed);
}
}
AlbertoX
Hans211
It always starts with one thing...
Kenseikuriomas (07-12-2012),Wizzup (09-16-2011)