Logging Stride Numbers

Posts 1–11 of 11 · Page 1 of 1
Logging Stride Numbers
How do I log them for players, etc?
Code:
//declares
unsigned int m_Stride;
static int stride=0;
int temp = 0;
int temp2 = 0;
int temp3 = 0;

//in DrawIndexedPrimitive
    if(NumVertices == temp){
    m_pD3Ddev->SetTexture(0,texPink);
    return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }

    if(primCount == temp3){
    m_pD3Ddev->SetTexture(0,texOrange);
    return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }

//in Present
    if(GetAsyncKeyState(VK_ADD))temp++;
    if(GetAsyncKeyState(VK_SUBTRACT))temp--;
    if(GetAsyncKeyState(VK_NUMPAD9)<0)temp2++;
    if(GetAsyncKeyState(VK_NUMPAD6)<0)temp2--;
    if(GetAsyncKeyState(VK_NUMPAD8)<0)temp3++;
    if(GetAsyncKeyState(VK_NUMPAD5)<0)temp3--;

    if(GetAsyncKeyState(VK_MULTIPLY)&1){
    add_log("NumVert: %d",temp);
    add_log("m_Stride: %d",temp2);
    add_log("primCount: %d", temp3);
    }
    
    if(GetAsyncKeyState(VK_DIVIDE)&1){
    temp=0;
    temp2=0;
    temp3=0;
    }


//in SetRenderState
    if (temp2 != 0 && m_Stride == temp2){
    m_pD3Ddev->SetTexture(0,texGreen);
    }


//in SetStreamSource
 if(StreamNumber==0) m_Stride=Stride;
Credits are 100% to Alkatraz of another site. Look, this took me 20 seconds on google to find. Lrn2Search
Worst method ever tho
Quote Originally Posted by Hell_Demon View Post
Worst method ever tho
It really is. I did something like that once for AVA. It works okay if you only have one model, but when a character is composed of a bunch of different models, its a PITA, unless you want to find and log each individual one.

A much cooler method I saw on GD is to get CRC of each Model And then log all the models based on the crc's and color in all models programmatically according to that. Then you take a screenshot or something and load it up in PS or something and you can point and click and find each model by using the color finder tool and comparing the value's with the crc logged model's color values.

It was damn nice, I will definitely try that myself one day.
Quote Originally Posted by why06 View Post


It really is. I did something like that once for AVA. It works okay if you only have one model, but when a character is composed of a bunch of different models, its a PITA, unless you want to find and log each individual one.

A much cooler method I saw on GD is to get CRC of each Model And then log all the models based on the crc's and color in all models programmatically according to that. Then you take a screenshot or something and load it up in PS or something and you can point and click and find each model by using the color finder tool and comparing the value's with the crc logged model's color values.

It was damn nice, I will definitely try that myself one day.
Yep, saw that one too. I personally prefer using min/cur/max and cutting them in half(max becomes cur, cur becomes max+min /2 etc)
Can get any stride between 1 and 10k in 14 steps.
Quote Originally Posted by Hell_Demon View Post
Yep, saw that one too. I personally prefer using min/cur/max and cutting them in half(max becomes cur, cur becomes max+min /2 etc)
Can get any stride between 1 and 10k in 14 steps.
Yeh I know you showed me it once. Here we go: http://www.mpgh.net/forum/31-c-c-pro...nt-logger.html

Anthony that should help you. Also I don't think you'll ever see a stride bigger then 100, really even 50 is pushing it. I cant imagine why you would have a vertex structure that big.

Try to color everything in a range, if ur logger is single stepping each and every value.
I got a model logger, and im going to start off small with Halo Combat Evolved.
My issue is that there is:
Stride:
StartIndex:
NumVerts:
PrimCount:

To get the number, so I can use chams for Halo, would I need to use a combination, or a single one?

I used a single one and went up to the number 300 in stride, then I reset stride and tried it with every other one, but nothing...
Any help with my last post?
I compiled it and it logs, but how do I use it?

Based on what I read, do you just turn it on with NUMPAD 1, then hold 4,5, or 6?
Quote Originally Posted by aanthonyz View Post
I compiled it and it logs, but how do I use it?

Based on what I read, do you just turn it on with NUMPAD 1, then hold 4,5, or 6?
You would know if you had coded it instead of doing what you just did .

@why06
If you ever want to try that method I have snippets/logs/notes and stuff on my Dev PC, Just tell me and I'll send that to you once I get back home :3.
Quote Originally Posted by Melodia View Post

@why06
If you ever want to try that method I have snippets/logs/notes and stuff on my Dev PC, Just tell me and I'll send that to you once I get back home :3.
Wait which one? I think I understand HD's method. essentially he colors half the models red, and the other half blue, then he pick which color has the model he wants, and keeps repeating and the last one left should be green!

But yes I would very excited to see another way of doing it.
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us