Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > Anti-Cheat Software & Programming > Direct3D

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Direct3D
hacking programming reversing
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

1 error PixelShader chams
Old 08-20-2010, 02:31 PM   #1
n00bie

nenad94's Avatar

Join Date: May 2010
Posts: 4
Reputation: 10
Rep Power: 21
nenad94 has made posts that are generally average in quality
Question 1 error PixelShader chams

I trying to compile PixelShaders Chams!!


code above Initialize()
Code:
HRESULT GenerateShader(IDirect3DDevice9 *pD3Ddev, IDirect3DPixelShader9 **pShader, float r, float g, float b )
{
    char szShader[ 256 ];
    ID3DXBuffer *pShaderBuf = NULL;
    sprintf( szShader, "ps.1.1\ndef c0, %f, %f, %f, %f\nmov r0,c0", r, g, b, 1.0f );
    D3DXAssembleShader( szShader, sizeof( szShader ), NULL, NULL, 0, &pShaderBuf, NULL );
    if( FAILED( pD3Ddev->CreatePixelShader((const DWORD*)pShaderBuf->GetBufferPointer(), pShader)) )return E_FAIL;
    return S_OK;
}
Initialize()

Code:
GenerateShader( m_pD3Ddev, &Blue, 0.0f, 0.0f, 1.0f );
    GenerateShader( m_pD3Ddev, &Green, 0.0f, 1.0f, 0.0f );
    GenerateShader( m_pD3Ddev, &Orange, 1.0f, 0.5f, 0.0f );
    GenerateShader( m_pD3Ddev, &Purple, 1.0f, 0.0f, 1.0f );
    GenerateShader( m_pD3Ddev, &Red, 1.0f, 0.0f, 0.0f );
    GenerateShader( m_pD3Ddev, &White, 1.0f, 1.0f, 1.0f );
    GenerateShader( m_pD3Ddev, &Yellow, 1.0f, 1.0f, 0.0f );
Code:
LPDIRECT3DPIXELSHADER9 Blue, Red, Purple, Orange, White, Green, Yellow;
DIP
Code:
{
         if(m_Stride == 64)

		 {
           m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
           m_pD3Ddev->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
           m_pD3Ddev->SetPixelShader( Blue );
           m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
           m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
           m_pD3Ddev->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
           m_pD3Ddev->SetPixelShader( Red );

}
When i compile, it give me error,

Code:
Compiling...
d3d9dev.cpp
C:\Documents and Settings\nenad\Desktop\D3D_Starterkit_v3.0b\D3D9\d3d9dev.cpp(15) : error C2065: 'sprintf' : undeclared identifier
Error executing cl.exe.

TatniumD3D.dll - 1 error(s), 0 warning(s)
I tried to declare 'sprintf' and it give me this error, help pls!!

Code:
Compiling...
d3d9dev.cpp
C:\Documents and Settings\nenad\Desktop\D3D_Starterkit_v3.0b\D3D9\d3d9dev.cpp(16) : error C2064: term does not evaluate to a function
Error executing cl.exe.

TatniumD3D.dll - 1 error(s), 0 warning(s)
nenad94 is offline

Reply With Quote


Old 08-20-2010, 02:40 PM   #2
*_*

HOOAH07's Avatar

Join Date: Apr 2008
Location: H.M.P
Posts: 5,438
Reputation: 92853
Rep Power: 1083
HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!
Recognitions:
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 68,717, Level: 38
Points: 68,717, Level: 38 Points: 68,717, Level: 38 Points: 68,717, Level: 38
Activity: 66.7%
Activity: 66.7% Activity: 66.7% Activity: 66.7%
Last Achievements
Award-Showcase
how did you declare it?
do you know what it is?

and to fix it include stdio.h
__________________
┐(_)

°º¤ø„¸¨°º¤ø„¸¸„ø¤º°¨¸„ø¤º°¨

¨°º¤ø„¸ MONKEY „ø¤º°¨

„ø¤º°¨ FOREVER `°º¤ø...
xTc charging me up like a battery, Like 1000 volts rushing through my body
HOOAH07 is online now

Reply With Quote

Old 08-20-2010, 03:24 PM   #3
SEGnosis
Guest

Posts: n/a
Google your error, voila thousands of answers.

Reply With Quote

Old 08-20-2010, 04:36 PM   #4
n00bie

nenad94's Avatar

Threadstarter
Join Date: May 2010
Posts: 4
Reputation: 10
Rep Power: 21
nenad94 has made posts that are generally average in quality
Thanks it now working
nenad94 is offline

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
chams, error, pixelshader
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 11:27 AM.