Originally Posted by
blipi
I think that there are some errors.
must be
same with
Then i think u have forgot to generate the textures textorange and texred.
And now my problem: I have edit that stuff and generated the textures, and i compiled the dll. Then i have renamed it to D3D8.dll and i have put it in warrock/system directory, but when i start warrock it "crashes" (well, it never starts, only the updator)
if you have a d3d starter kit,it has the color functions in it.
and you have screwed it all up by adding
{
}
ok once more
here we go get a d3d starter kit(may or may not have texure colors due to the d3d kit used.
scroll down to the bottom of the codeing in d3ddev.cpp
look for setstreamsource
Code:
HRESULT APIENTRY hkIDirect3DDevice8::SetStreamSource(UINT StreamNumber,IDirect3DVertexBuffer8* pStreamData,UINT Stride)
{
if( StreamNumber == 0 ) // Used for Chams
m_Stride = Stride;
return m_pD3Ddev->SetStreamSource(StreamNumber, pStreamData, Stride);
}
that is how it should look.
now if you find drawindexprimative
Code:
HRESULT APIENTRY hkIDirect3DDevice8::DrawIndexedPrimitive(D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
if (CH_Chams)
{
if (Playerbody)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE,false);
m_pD3Ddev->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
m_pD3Ddev->SetTexture( 0, texOrange);
m_pD3Ddev->DrawIndexedPrimitive(PrimitiveType, minIndex, NumVertices, startIndex, primCount);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
m_pD3Ddev->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
m_pD3Ddev->SetTexture( 0, texRed);
}
}
// This is how we control hotkeys
if ((GetAsyncKeyState('5')&1) == 1)
CH_See = !CH_See;
if ((GetAsyncKeyState('6')&1) == 1)
CH_Chams = !CH_Chams;
return m_pD3Ddev->DrawIndexedPrimitive(PrimitiveType, minIndex, NumVertices, startIndex, primCount);
}