Code:
HRESULT (APIENTRY *DrawIndexedPrimitive_orig) ( LPDIRECT3DDEVICE9,D3DPRIMITIVETYPE ,INT ,UINT ,UINT ,UINT ,UINT ) = (long (__stdcall *) ( LPDIRECT3DDEVICE9,D3DPRIMITIVETYPE ,INT ,UINT ,UINT ,UINT ,UINT ))0x4FDD8840;
HRESULT APIENTRY DrawIndexedPrimitive_det(LPDIRECT3DDEVICE9 pDevice,D3DPRIMITIVETYPE Type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
return DrawIndexedPrimitive_orig(pDevice, Type,BaseVertexIndex, MinVertexIndex,NumVertices,startIndex,primCount);
}
Code:
DetourFunction( ( PBYTE )0x4FDD8840, ( PBYTE )&DrawIndexedPrimitive_det );
__asm mov [ DrawIndexedPrimitive_orig ], eax;
faster way.
Bookmarks