[leech] stride logger d3d9 source

Posts 1–14 of 14 · Page 1 of 1
[leech] stride logger d3d9 source
leeched this from over at **********, posted by Tate, looked like it could be something useful for those of us that can actually still make working hacks (unlike me XD stupid crashing >.>) yes this is a literal C+P cuz i'm too lazy to edit anything out...at least i gave credits

This is just a basic stride logging method with a basic menu. I also released this with the name regist on GD.

This isn't anything special, just something to learn off of.

Code:
int stridenum;
stridenum = 0;

LPDIRECT3DTEXTURE9 texRed;


D3DXCreateTextureFromFileInMemory(m_pD3Ddev,(LPCVOID)&bRed,60,&texRed);


const BYTE bRed[60] =
{
   0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
   0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
   0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0xCC, 0x00, 0x00, 0x00
}; 

In EndScene()

if( GetAsyncKeyState( VK_INSERT ) & 1 )
    {
    Menu = !Menu; // Turns menu on and off. Simple switch.
    }

    if( Menu )
    {
//--Menu Operations--
if( GetAsyncKeyState( VK_RIGHT ) & 1 )
    {
    stridenum = stridenum + 1; //Adds 1 to the current integer 'stridenum'. Stridenum is used below in the menu.
    }

if( GetAsyncKeyState( VK_LEFT) & 1 )
  {
  if(stridenum > 0) //We can't go into negative model rec, so we're making sure our number is above 0.
    {
    stridenum = stridenum - 1;  //Subtracts 1 to the current integer 'stridenum'. Stridenum is used below in the menu.
    }  
  }    
//--Menu Operations--*/
  /*Drawing of the Menu*/
  D3DRECT rec2 = {149,212,351,301};
  m_pD3Ddev->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(20,45,216,35),0 ,0); 
       //Draws a nice border around the simple rectangle menu.

  D3DRECT rec1 = {150,213,350,300};//X, Y, WIDTH, HEIGHT //380 450
  m_pD3Ddev->Clear(1, &rec1, D3DCLEAR_TARGET, D3DCOLOR_ARGB(20,0,0,0),0 ,0);
    //Draws the actual menu. It's just slightly smaller than the bigger rectangle above, simulating a border.

  PrintText(m_font1, 156, 220, 255, 255,255, 255,   "Tate at *********. Shout to HF.");  
  PrintText(m_font1, 156, 265, 255, 255,255, 255, "Stride: %i", stridenum);
    //Obviously prints the menu text.
  //Drawing of the Menu*/
  } 


In DrawIndexedPrimitive()
PHP Code:
/*Debugging*/
if (m_Stride == stridenum) 
    {
    m_pD3Ddev->SetTexture(0, texRed); //Here we are filling our model rec red.
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE,D3DZB_FALSE); //Here we are doing a simple wallhack, so everything that was filled gets seen.

    }
/*Debugging*/

I realize this source is for the 'noobies', so I'll go a bit indept into why we put what where. I won't go into technical aspects, but rather physical aspects.

We draw the menu in EndScene(), because when drawing in DrawIndexedPrimitive, your drawn item doesn't necessarily appear above everything else. EndScene is what it sounds like. EndScene. Basically, Z order works like so.
I want to render a cat behind a bear behind a truck.

I would render the cat first, then the bear, then the truck, that way the truck is in the front. Same concept here. EndScene will render after everything else, therefore putting your drawn items in front of everything else.

We do the debugging in DrawIndexedPrimitive, because that's where models are drawn in game.

(Originally written by me for *********. Trying to increase the level of C++ knowledge here.)
If you try to bypass the filters, you will be dealt with
leave it starred out
if anybody asks, leave it alone
i didn't try to bypass the filter, i was simply posting credits, i didn't know a website that has NOTHING to do with CA hacks, would be stared out
Hmmm im noob at d3d but isnt DIP needed to use the strides?? /
Quote Originally Posted by Mr.Magicman View Post
Hmmm im noob at d3d but isnt DIP needed to use the strides?? /
Yes it does...
idk, like i said, i'm just sharing this, i found it elsewhere on a site that doesn't even deal with CA. it was a straight C++ forum

this could be 100% useful to sum1 or 100% wasted post
i don't even know what strides are lmao, i saw FPS hack source and clicked and copied and leeched XD
You do realise that code won't compile (at least not on VS '08 - '10) because they are declared the wrong way? --"
like i've said 3 times now, i found it, thought maybe to someone who knows c++ better than i do (just about every1 and they're great grandmother) MIGHT find it useful
Useless code is useless without a DIP hook
lol i wouldn't know that

i know about as much C++ as a squirrel...i'm just good with google for finding source codes...hence my sig
Wow so you dont know and post useless things??

You only want credz which you wont get any..
i didn't know if it would be useful or not! so i posted it figuring maybe it will be you never know till you try! quit trollin >.>
Quote Originally Posted by supercarz1991 View Post
i didn't know if it would be useful or not! so i posted it figuring maybe it will be you never know till you try! quit trollin >.>
Trollin?? im the one whos trollin??

Think again bro
Posts 1–14 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us