Code :
class ColorPickClass { bool SpriteCreated1 = false; LPDIRECT3DTEXTURE9 IMAGE1; LPD3DXSPRITE SPRITE1 = NULL; IDirect3DPixelShader9 *sAdd = NULL; char ShaderAdd[] = "ps.1.0 def c0, 0.0f, 0.0f, 0.0f, 0.0f tex t0 add r0, c0, t0"; ID3DXBuffer *ShaderBufferAdd = NULL; LPDIRECT3DSTATEBLOCK9 pStateBlock = NULL; float pSize = 50; //pic size //in drawindexedprimitive if(your_model_rec) //if(Stride == 64) { if (SpriteCreated1 == FALSE) { D3DXAssembleShader(ShaderAdd, sizeof(ShaderAdd), NULL, NULL, 0, &ShaderBufferAdd, NULL); pDevice->CreatePixelShader((const DWORD*)ShaderBufferAdd->GetBufferPointer(), &sAdd); ShaderBufferAdd->Release(); D3DXCreateTextureFromFile( pDevice, "target.png", &IMAGE1 ); SpriteCreated1 = TRUE; } D3DXCreateSprite( pDevice, &SPRITE1 ); SPRITE1->Begin( D3DXSPRITE_ALPHABLEND | -1); SPRITE1->Draw( IMAGE1, NULL, NULL, NULL, 0xFFFFFFFF ); SPRITE1->End( ); if( SPRITE1 != NULL ){ SPRITE1->Release(); SPRITE1 = NULL; } LPDIRECT3DSTATEBLOCK9 pStateBlock = NULL; pDevice->CreateStateBlock( D3DSBT_ALL, &pStateBlock ); pStateBlock->Capture(); pDevice->SetTexture( 0, IMAGE1); pDevice->SetPixelShader(sAdd); pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); pDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);//<- data-blogger-escaped-pdevice-="">SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); pDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS); pDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR); pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR); pDevice->SetRenderState(D3DRS_POINTSPRITEENABLE, TRUE); pDevice->SetRenderState(D3DRS_POINTSCALEENABLE, TRUE); pDevice->SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&pSize)); pDevice->SetRenderState(D3DRS_POINTSIZE_MAX, *((DWORD*)&pSize)); pDevice->SetRenderState(D3DRS_POINTSIZE_MIN, *((DWORD*)&pSize)); pDevice->DrawPrimitive(D3DPT_POINTLIST, 0, 1); pStateBlock->Apply(); pStateBlock->Release(); }
"Jangan segan untuk bertanya, bila agan kesulitan silahkan tinggalkan komentar di bawah, maka akan saya bantu semaksimal mungkin "
om kalo edit hook itu bagaimana ya..,, trus hook itu di bagian mana nya.. hehe thanks.
BalasHapusbacod lu nying
HapusAgan, tolong ajarkan buat wallhack counterstrike online megaxus... Thnx
BalasHapustelasomu
HapusOk.. mungkin nanti saya post tutorialnya, Thx
Hapuscara Menyesuaikan Hook gmana sih? mohon ajarin.
BalasHapusHook untuk game apa?
HapusKomentar ini telah dihapus oleh administrator blog.
BalasHapus