HelpStride

Posts 1–6 of 6 · Page 1 of 1
Stride
What is the stride meaning ?
Example for C++ code : if( Qmo4 == 1 )
{
if (Stride == 40)
{
pDevice->SetRenderState( D3DRS_SRCBLEND, 3 );
pDevice->SetRenderState( D3DRS_DESTBLEND, 4 );
pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true ); // Wall ASUS
}}

Credits to Qmo for the code . Im a newbie in C++ and need your help in C++ coding D3D Menu .
Look here.


Usually when you are making chams you hook a function that draws to the screen. ( Like DrawIndexedPrimitive ) In your hook, you check for certain models/polygons by comparing the stride number & any/all of the other characteristics ( primitiveType/baseVertex/minVertexIndex/numVertices/startIndex/primCount ) of the model being currently drawn to a list of model/polygon characteristics. Pseudocode example:

Lets assume you have logged the characteristics of a player model in some game:
Code:
#define Player((Stride == 32) && (Vertices == 604) && (Type == 4) && (Primitives == 335) && (BaseVertexIndex == 0) && (MinIndex ==0))
Now, in your hook, you can just do something like this:

Code:
LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;

if(D3DDev->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
     Stream_Data->Release();

if(Player)
{
     // DO WALLHACK/CHAMS/WHATEVER
}
@Harava somewhat right, but not 100%

D3D9 allow custom vertices,what this means is that u can create your own structure for the vertices, eg.
Code:
struct D3DTLVERTEX
{
  float x, y, z, rhw;
  DWORD color;
};
Depending on your custom vertex structure, you will use D3DFVF's so it will still know what to do with them, more info click here.
The D3DFVF for the above example is D3DFVF_XYZRHW | D3DFVF_DIFFUSE

The Stride in this case represents the size of these vertices structures in bytes. If u were to use the above structure to draw a box on screen, u can then hook DrawIndexPrimitive for the stride 20 (4 * sizeof(float) + 1 * sizeof(DWORD)).
Any better explanation ?
How to search for them ?
I want to make a D3D Menu .
Hook DrawIndexedPrimitive. Check to which strides the models belong and log those you need to a file or whatever.

There are Stride Loggers to help you do that. You just have to search.

PS: FYI you don't need those things to do a menu.
If we dont need it to do a menu , how can i insert the code instead of stride ?

Example : WriteDMAInteger("MAT",&H11039,Offsets:={&H93},&H13 9},Value:=10393,Level:=2,Nsize:=4) <---- Visual Basic Code
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us