This site is no longer active, all members have migrated to devotedcheating.com . Thankyou


Actionhacks.net­Home­FAQ­Register­Log in
Post new topic   Reply to topicShare | 
 

 Chams tutorial. D3D9

View previous topic View next topic Go down 
AuthorMessage
Famous
Coder


Posts: 89
Reputation: 15
Join date: 2009-12-03
Age: 21
Location: West Virginia

PostSubject: Chams tutorial. D3D9   Tue Dec 15, 2009 12:38 pm

This is a D3D9 chams tutorial.

Defines -
Code:
bool Chams;
UINT m_Stride;
LPDIRECT3DTEXTURE9    texGreen;
LPDIRECT3DTEXTURE9    texYellow;


Above Initialize() -

Code:
HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
{
   if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
      return E_FAIL;
   
   WORD colour16 =   ((WORD)((colour32>>28)&0xF)<<12)
         |(WORD)(((colour32>>20)&0xF)<<8)
         |(WORD)(((colour32>>12)&0xF)<<4)
         |(WORD)(((colour32>>4)&0xF)<<0);

   D3DLOCKED_RECT d3dlr;   
   (*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
   WORD *pDst16 = (WORD*)d3dlr.pBits;

   for(int xy=0; xy < 8*8; xy++)
      *pDst16++ = colour16;

   (*ppD3Dtex)->UnlockRect(0);

   return S_OK;
}


Initialize() -

Code:
GenerateTexture(m_pD3Ddev, &texYellow,D3DCOLOR_ARGB(255,255,255,0));
GenerateTexture(m_pD3Ddev, &texGreen,D3DCOLOR_ARGB(255,0,255,0));


DrawIndexedPrimitive -

Code:
   if (Chams)
   {
      if (m_Stride == 44)
      {
            DWORD dwOldZEnable = D3DZB_TRUE;
            m_pD3Ddev->SetTexture(0, texYellow);
            m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
            m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
          m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
            m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
            m_pD3Ddev->SetTexture(0, texGreen);
}
   }


SetStreamSource -

Code:
if( StreamNumber == 0 ){m_Stride = Stride;}


BeginScene -

Code:
   if (GetAsyncKeyState(VK_INSERT)&1)
{
   Chams = !Chams;
}


Dl -
http://uppit.com/v/ER3HEPME

Virus Scan -
http://www.virustotal.com/analisis/9f725de90fdcaa791c0df46489e469de403d4c02f0574eb13887216aaae1efaf-1260848181

You'll need

- C++ , MS Visual Studio
- A SDK

The stride is the CF main player stride, the hotkey is insert if you successfully make chams and compile!

Post questions or problems, I'll try and help.
Back to top Go down
DARIUS
GFX
GFX


Posts: 49
Reputation: 1
Join date: 2009-12-04

PostSubject: Re: Chams tutorial. D3D9   Tue Dec 15, 2009 2:43 pm

i understand none of this of course!!
Back to top Go down
ensetp
General Member
General Member


Posts: 1
Reputation: 0
Join date: 2009-12-15

PostSubject: Re: Chams tutorial. D3D9   Wed Dec 16, 2009 5:04 am

CAN U SEND D CHARM HACK TO HERE..IF U FINISHED IT
Back to top Go down
Morphed
Tech Support


Posts: 67
Reputation: 6
Join date: 2009-11-11

PostSubject: Re: Chams tutorial. D3D9   Wed Dec 16, 2009 12:36 pm

Nice, chams tutroial im still personally getting the hang of d3d

_________________

"The mind is like a parachute. It doesn't work unless it's open"
Back to top Go down
Flyindingo
Admin
Admin


Posts: 160
Reputation: 8
Join date: 2009-09-19

PostSubject: Re: Chams tutorial. D3D9   Thu Dec 17, 2009 6:09 am

ensetp wrote:
CAN U SEND D CHARM HACK TO HERE..IF U FINISHED IT


I see we have a CA player..

Noob CAPS
Noob grammar
Charm???

_________________
Back to top Go down
http://www.ActionHacks.net
Morphed
Tech Support


Posts: 67
Reputation: 6
Join date: 2009-11-11

PostSubject: Re: Chams tutorial. D3D9   Thu Dec 17, 2009 11:35 am

Lolz very true fly,
Horrible grammer and he doesn't even try to compile the hack
hes even to lazy to be a script kiddie lol

_________________

"The mind is like a parachute. It doesn't work unless it's open"
Back to top Go down
 

Chams tutorial. D3D9

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
 :: Public Section: Coding :: D3D :: Tutorials-
Post new topic   Reply to topic