Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE pType D3DparamX ,UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount )
- {
- if(pDevice->GetStreamSource(0,&Stream_Data,&OffsetInBytes,&m_Stride) == D3D_OK)
- Stream_Data->Release();
- DWORD dwOldZEnable = D3DZB_TRUE;
- if(Color)
- {
- GenerateTexture(pDevice, &texGreen , D3DCOLOR_ARGB(255,0,255,0));
- GenerateTexture(pDevice, &texRed , D3DCOLOR_ARGB(255,255,0,0));
- GenerateTexture(pDevice, &texBlue , D3DCOLOR_ARGB(255,0,0,255));
- GenerateTexture(pDevice, &texOrange , D3DCOLOR_ARGB(255,255,165,0));
- GenerateTexture(pDevice, &texYellow , D3DCOLOR_ARGB(255,255,255,0));
- GenerateTexture(pDevice, &texPink , D3DCOLOR_ARGB(255,255,192,203));
- GenerateTexture(pDevice, &texCyan , D3DCOLOR_ARGB(255,0,255,255));
- GenerateTexture(pDevice, &texPurple , D3DCOLOR_ARGB(255,160,32,240));
- GenerateTexture(pDevice, &texBlack , D3DCOLOR_ARGB(255,0,0,0));
- GenerateTexture(pDevice, &texWhite , D3DCOLOR_ARGB(255,255,255,255));
- GenerateTexture(pDevice, &texSteelBlue , D3DCOLOR_ARGB(255,33,104,140));
- GenerateTexture(pDevice, &texLightSteelBlue, D3DCOLOR_ARGB(255,201,255,255));
- GenerateTexture(pDevice, &texLightBlue , D3DCOLOR_ARGB(255,26,140,306));
- GenerateTexture(pDevice, &texSalmon , D3DCOLOR_ARGB(255,196,112,112));
- GenerateTexture(pDevice, &texBrown , D3DCOLOR_ARGB(255,168,99,20));
- GenerateTexture(pDevice, &texTeal , D3DCOLOR_ARGB(255,38,140,140));
- GenerateTexture(pDevice, &texLime , D3DCOLOR_ARGB(255,50,205,50));
- GenerateTexture(pDevice, &texElectricLime , D3DCOLOR_ARGB(255,204,255,0));
- GenerateTexture(pDevice, &texGold , D3DCOLOR_ARGB(255,255, 215, 0));
- GenerateTexture(pDevice, &texOrangeRed , D3DCOLOR_ARGB(255,255,69,0));
- GenerateTexture(pDevice, &texGreenYellow , D3DCOLOR_ARGB(255,173,255,47));
- GenerateTexture(pDevice, &texAquaMarine , D3DCOLOR_ARGB(255,127,255,212));
- GenerateTexture(pDevice, &texSkyBlue , D3DCOLOR_ARGB(255,0,191,255));
- GenerateTexture(pDevice, &texSlateBlue , D3DCOLOR_ARGB(255,132, 112, 255));
- GenerateTexture(pDevice, &texCrimson , D3DCOLOR_ARGB(255,220,20,60));
- GenerateTexture(pDevice, &texDarkOliveGreen, D3DCOLOR_ARGB(255,188,238,104 ));
- GenerateTexture(pDevice, &texPaleGreen , D3DCOLOR_ARGB(255,154,255, 154));
- GenerateTexture(pDevice, &texDarkGoldenRod , D3DCOLOR_ARGB(255,255, 185, 15 ));
- GenerateTexture(pDevice, &texFireBrick , D3DCOLOR_ARGB(255,255,48,48));
- GenerateTexture(pDevice, &texDarkBlue , D3DCOLOR_ARGB(255,0,0,204));
- GenerateTexture(pDevice, &texDarkerBlue , D3DCOLOR_ARGB(255,0,0,153));
- GenerateTexture(pDevice, &texDarkYellow , D3DCOLOR_ARGB(255,255,204,0));
- GenerateTexture(pDevice, &texLightYellow , D3DCOLOR_ARGB(255,255,255,153));
- Color = false;
- }
- if(opt.d3d.ChamsCT)
- {
- if((m_Stride == 48 || m_Stride == 52 || m_Stride == 64))
- {
- pDevice->SetRenderState(D3DRS_ZENABLE, false);
- pDevice->SetTexture(0, texGreen);
- pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nPrimitiveCount);
- pDevice->SetTexture(0, texRed);
- pDevice->SetRenderState(D3DRS_ZENABLE, true);
- }
- }
- if(opt.d3d.ChamsTERO)
- {
- if((m_Stride == 48 || m_Stride == 52 || m_Stride == 64))
- {
- pDevice->SetRenderState(D3DRS_ZENABLE, false);
- pDevice->SetTexture(0, texGreenYellow);
- pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nPrimitiveCount);
- }
- }
- if(opt.d3d.WHGlass)
- {
- if((m_Stride == 48 || m_Stride == 52 || m_Stride == 64))
- {
- SumStride=SumStride+4;
- pDevice->SetRenderState(D3DRS_ZENABLE,false);
- pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,false);
- pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCOLOR);
- pDevice->SetRenderState(D3DRS_ZENABLE,false);
- }
- }
- if(opt.hacks.panic)
- {
- if( GetAsyncKeyState( VK_END )&1)
- {
- ExitProcess(0);
- }
- }
- if(opt.d3d.HD)
- {
- pDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
- pDevice->SetRenderState(D3DRS_SPECULARENABLE, FALSE);
- }
- if(opt.d3d.WhiteWalls)
- {
- pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR);
- }
- if(opt.d3d.NoGun)
- {
- pDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_EQUAL);
- }
- return pDrawIndexedPrimitive(pDevice,pType D3DparamvalX,nMinIndex,nNumVertices,nStartIndex,nPrimitiveCount);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement