[Tut] : Open c+ ( YAY YOU DID IT *MOVING ON* ), File>newproject > Name your Project what ever you like, but dont confuse your self =D.
Ok im not much of a wallhack person so im gonna be giving you a Cham Tut instead ;D.
Code:
if (m_Stride==40 && // Characters =============== //
(texnum==34900580)|| // Delta Force Head
(texnum==36100604)|| // Spetsnaz Head
(texnum==38000658)|| // Spetsnaz Legs
(texnum==18300268)|| // Spetsnaz Body
(texnum==36200604)|| // GIGN Head
(texnum==21200306)|| // GIGN Body
(texnum==35500568)|| // GSG9 Head
(texnum==2200024)|| // GSG9 Bangs
(texnum==8800105)|| // GSG9 Feet
(texnum==36900650)|| // GSG9 Legs
(texnum==19600314)|| // GSG9 Body
(texnum==36700612)|| // SAS Head
(texnum==8500105)|| // SAS Feet
(texnum==37000650)|| // SAS Legs
(texnum==18000274)|| // SAS Body
(texnum==35300556)|| // KSF Head
(texnum==7500121)|| // KSF Arms
(texnum==9200115)|| // KSF Feet
(texnum==12400168)|| // KSF Hands
(texnum==30100522)|| // KSF Legs
(texnum==18700288)|| // KSF Body
(texnum==40900594)|| // ARTC Head
(texnum==11700190)|| // ARTC Arms
(texnum==9100118)|| // ARTC Feet
(texnum==12500170)|| // ARTC Hands
(texnum==37000634)|| // ARTC Legs
(texnum==41700516)|| // ARTC Body
(texnum==19400260)|| // ROKMC Body
(texnum==37900592)|| // ROKMC Head
(texnum==36500642)|| // ROKMC Legs
(texnum==44800776)|| // SRG Head
(texnum==15900200)|| // SRG Left Arm
(texnum==10500168)|| // SRG Right Arm
(texnum==80401016)|| // SRG Body
(texnum==10000121)|| // SRG Feet
(texnum==13200180)|| // SRG Hands
(texnum==33800534)) // SRG Leg
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Yellow);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Red);
}
}
if (nNumVertices == 213 && nPrimitiveCount == 174) // M67 Grenade =============== //
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Red);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Red);
}
if (nNumVertices == 158 && nPrimitiveCount == 131) // Flashbang =============== //
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Yellow);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Red);
}
if (nNumVertices == 171 && nPrimitiveCount == 143) // Smoke Grenade =============== //
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Orange);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Orange);
}
if (nNumVertices == 271 && nPrimitiveCount == 257) // VX Grenade =============== //
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Green);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Green);
}
if (nNumVertices == 338 && nPrimitiveCount == 339) // RGD-5 Grenade =============== //
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Red);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Red);
}
if (m_Stride==40 && // Equipment =============== //
(texnum==13200212)|| // Delta Force Helmet
(texnum==13200212)|| // Delta Force Helmet 2
(texnum==34700538)|| // Delta Force Gas Mask
(texnum==19500352)|| // Delta Force Balaclava
(texnum==84900778)|| // Delta Force Clan BDU
(texnum==27500442)|| // Delta Force Body Armor
(texnum==42800576)|| // Delta Force Body Armor 2
(texnum==52100658)|| // Delta Force Tactical Vest
(texnum==12200196)|| // Spetsnaz Helmet
(texnum==27100464)|| // Spetsnaz Gas Mask
(texnum==33600552)|| // Spetsnaz Body Armor
(texnum==44100646)|| // Spetsnaz Tactical Vest
(texnum==17800292)|| // GIGN Red Bandana
(texnum==21300290)|| // GIGN Helmet
(texnum==2800036)|| // GIGN Helmet Lens
(texnum==35700558)|| // GIGN Gas Mask
(texnum==22100396)|| // GIGN Balaclava
(texnum==29700492)|| // GIGN Body Armor
(texnum==11200188)|| // ROKMC Beret
(texnum==12000194)|| // ROKMC Helmet
(texnum==29800450)|| // ROKMC Gas Mask
(texnum==27100394)|| // ROKMC Body Armor
(texnum==28700374)|| // ROKMC X Harness
(texnum==34700470)|| // ROKMC X Harness
(texnum==5100056)|| // ROKMC Pouch
(texnum==9900163)|| // ROKMC Left Arm
(texnum==18300163)|| // ROKMC Right Arm
(texnum==16400266)|| // GSG9 Red Bandana
(texnum==16200243)|| // GSG9 Helmet
(texnum==31900466)|| // GSG9 Gas Mask
(texnum==19300342)|| // GSG9 Balaclava
(texnum==83600752)|| // GSG9 Clan BDU
(texnum==33400477)|| // GSG9 Body Armor
(texnum==10500163)|| // GSG9 Rolled Up Sleeves
(texnum==38100666)|| // GSG9 Tactical Knee Pads
(texnum==9600172)|| // SAS Boonie Hat
(texnum==14200236)|| // SAS Helmet
(texnum==37800552)|| // SAS Gas Mask
(texnum==28100486)|| // SAS Balaclava
(texnum==62400752)|| // SAS Clan BDU
(texnum==27900456)|| // SAS Body Armor
(texnum==45700654)|| // SAS Tactical Vest
(texnum==39800532)|| // SAS Tactical Vest 2
(texnum==9200100)|| // SAS Holster
(texnum==4800040)|| // SAS Magazine Pouch
(texnum==4000044)|| // SAS Pouch
(texnum==6500110) || // KSF Boonie Hat
(texnum==12900208)|| // KSF Helmet
(texnum==29600448)|| // KSF Gas Mask
(texnum==31100398)|| // KSF Sunglasses
(texnum==84700776)|| // KSF Clan BDU
(texnum==600004)|| // KSF Clan BDU Logo
(texnum==36500606)|| // KSF Body Armor
(texnum==63100646)|| // KSF Tactical Vest
(texnum==19800163)|| // KSF Rolled Up Sleeves
(texnum==7000066)|| // KSF Holster
(texnum==10400190)|| // SRG Beret
(texnum==23800294)|| // SRG Deer Head
(texnum==11600180)|| // SRG NIJ IIIA Helmet
(texnum==17100278)|| // SRG Red Bandana
(texnum==14600198)|| // SRG Battle Cap
(texnum==18200266)|| // SRG Helmet
(texnum==19100106)|| // SRG Gas Mask
(texnum==54300350)|| // SRG Sunglasses
(texnum==30800380)|| // SRG Mid Class Sunglasses
(texnum==79300995)|| // SRG Clan BDU 1
(texnum==13300138)|| // SRG Clan BDU 2
(texnum==300001)|| // SRG Clan BDU 3
(texnum==1200012)|| // SRG Clan BDU Logo
(texnum==10900110)|| // SRG Bulletproof Vest
(texnum==6200064)|| // SRG Holster
(texnum==22700250)) // SRG Pouch
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Yellow);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Red);
}
if (Guns)
{
texnum = (nNumVertices*100000)+nPrimitiveCount;
if (m_Stride==40 && // Guns =============== //
(texnum==187200968)|| // GALIL
(texnum==187200968)|| // GALIL 2
(texnum==149701124)|| // UZI
(texnum==193701304)|| // M249
(texnum==232501431)|| // SIG551
(texnum==161500751)|| // FA-MAS
(texnum==107400724)|| // FR-F2
(texnum==141600900)|| // AN94
(texnum==145900805)|| // G36C
(texnum==42200339)|| // K1
(texnum==23400116)|| // K1 2
(texnum==17500073)|| // K1 3
(texnum==3200012)|| // K1 4
(texnum==2300012)|| // K1 5
(texnum==71900459)|| // MP5
(texnum==1800008)|| // MP5 2
(texnum==20300084)|| // MP5 3
(texnum==16700083)|| // MP5 4
(texnum==79100469)|| // M4A1
(texnum==12000044)|| // M4A1 2
(texnum==16800062)|| // M4A1 3
(texnum==2400008)|| // M4A1 4
(texnum==600002)|| // M4A1 5
(texnum==12800050)|| // M4A1 6
(texnum==2600010)|| // M4A1 7
(texnum==4200014)|| // M4A1 8
(texnum==1400008)|| // M4A1 9
(texnum==80600442)|| // M16A2
(texnum==13400052)|| // M16A2 2
(texnum==17600066)|| // M16A2 3
(texnum==5400018)|| // M16A2 4
(texnum==46200348)|| // STEYR_AUG
(texnum==27000133)|| // STEYR_AUG 2
(texnum==4100025)|| // STEYR_AUG 3
(texnum==1200006)|| // STEYR_AUG 4
(texnum==400002)|| // STEYR_AUG 5
(texnum==46800367)|| // PSG-1
(texnum==9600042)|| // PSG-1 2
(texnum==18800092)|| // PSG-1 3
(texnum==16900071)|| // PSG-1 4
(texnum==3400012)|| // PSG-1 5
(texnum==800004)|| // PSG-1 6
(texnum==40500383)|| // K2
(texnum==15800089)|| // K2 2
(texnum==2200012)|| // K2 3
(texnum==7000034)|| // K2 4
(texnum==60700349)|| // P90
(texnum==5500033)|| // P90 2
(texnum==47700227)|| // P90 3
(texnum==10300047)|| // P90 4
(texnum==3800014)|| // P90 5
(texnum==50300349)|| // AK-74
(texnum==14700071)|| // AK-74 2
(texnum==13100061)|| // AK-74 3
(texnum==194501145)|| // MG36
(texnum==116000670)|| // DESERT EAGLE
(texnum==182101089)|| // MR73
(texnum==62500454)|| // REMINGTON M870
(texnum==95200571)|| // BENELLI M1
(texnum==40700334)|| // GLOCK 23
(texnum==71500449)|| // BERETTA M92F
(texnum==11000044)|| // BERETTA M92F 2
(texnum==16500075)|| // BERETTA M92F 3
(texnum==4400020)|| // BERETTA M92F 4
(texnum==2800014)|| // BERETTA M92F 5
(texnum==92000543)|| // COLT 45
(texnum==239001276)) // DRAGONUV
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Yellow);
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Red);
}
}
HRESULT res = pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
///
SetHook(HOOK HERE);
///
return res;
}
This is chams for the new characters and guns, i might me missing m110 and g3a3 + ty89 and gold and engraved ak/psg.
Now those were chams for character equips like face mask/bacalava watever.
I might update later on so keep checking this thread once or twice a day
Now for Color Shading/Texture:
Code:
GenerateTexture(pDevice, &Red, D3DCOLOR_ARGB (255 , 255 , 0 , 0 )); GenerateTexture(pDevice, &Yellow, D3DCOLOR_ARGB (255 , 255 , 255 , 0 )); GenerateTexture(pDevice, &Green, D3DCOLOR_ARGB (255 , 0 , 255 , 0 )); GenerateTexture(pDevice, &Blue, D3DCOLOR_ARGB (255 , 0 , 0 , 255 )); GenerateTexture(pDevice, &Purple, D3DCOLOR_ARGB (255 , 102 , 0 , 153 )); GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255 , 255 , 20 , 147 )); GenerateTexture(pDevice, &Orange, D3DCOLOR_ARGB (255 , 255 , 165 , 0 ));
As you can see here
pDevice->SetTexture(0,Pink);
The texture is set to Pink now all you have to do is change that to one of the other color provided above
so it becomes
pDevice->SetTexture(0,Red);
Another example of changing colors is using forces body parts heres an example.
if(m_Stride==40&&texnum==34900580) //Delta Force head
pDevice->SetTexture(0,Blue); //change blue to one of the colors provided
this line makes the delta force head Blue but this won't make it chammed just changes the color.
//the nades are commented out
if you just want to do something like set all the forces head the same color just use the
nPrimitiveCount
and
nNumVertices
of the body part
nNumVertices and nPrimitiveCount
Code:
(nNumVertices == 100 && nPrimitiveCount == 121) || //Foot (nNumVertices == 105 && nPrimitiveCount == 168) || //Right Arm (nNumVertices == 132 && nPrimitiveCount == 180) || //Hand (nNumVertices == 159 && nPrimitiveCount == 200) || //Left Arm (nNumVertices == 338 && nPrimitiveCount == 534) || //Underbody thanks japennese guy =) (nNumVertices == 448 && nPrimitiveCount == 776) || //Head (nNumVertices == 804 && nPrimitiveCount == 1016) || //Body //SRG Option item (nNumVertices == 109 && nPrimitiveCount == 110) || //Bulletproof Vest (nNumVertices == 336 && nPrimitiveCount == 532)) //Battle Pants
Code:
if(m_Stride==40 &&//face,mask etc... (texnum==34900580)|| // Delta Force Head (texnum==36100604)|| // Spetsnaz Head (texnum==38000658)|| // Spetsnaz Legs (texnum==18300268)|| // Spetsnaz Body (texnum==36200604)|| // GIGN Head (texnum==21200306)|| // GIGN Body (texnum==35500568)|| // GSG9 Head (texnum==2200024)|| // GSG9 Bangs (texnum==8800105)|| // GSG9 Feet (texnum==36900650)|| // GSG9 Legs (texnum==19600314)|| // GSG9 Body (texnum==36700612)|| // SAS Head (texnum==8500105)|| // SAS Feet (texnum==37000650)|| // SAS Legs (texnum==18000274)|| // SAS Body (texnum==35300556)|| // KSF Head (texnum==7500121)|| // KSF Arms (texnum==9200115)|| // KSF Feet (texnum==12400168)|| // KSF Hands (texnum==30100522)|| // KSF Legs (texnum==18700288)|| // KSF Body (texnum==40900594)|| // ARTC Head (texnum==11700190)|| // ARTC Arms (texnum==9100118)|| // ARTC Feet (texnum==12500170)|| // ARTC Hands (texnum==37000634)|| // ARTC Legs (texnum==41700516)|| // ARTC Body (texnum==19400260)|| // ROKMC Body (texnum==37900592)|| // ROKMC Head (texnum==36500642)|| // ROKMC Legs (texnum==44800776)|| // SRG Head (texnum==15900200)|| // SRG Left Arm (texnum==10500168)|| // SRG Right Arm (texnum==80401016)|| // SRG Body (texnum==10000121)|| // SRG Feet (texnum==13200180)|| // SRG Hands (texnum==33800534)|| // SRG Leg (texnum==13200212)|| // Delta Force Helmet (texnum==13200212)|| // Delta Force Helmet 2 (texnum==34700538)|| // Delta Force Gas Mask (texnum==19500352)|| // Delta Force Balaclava (texnum==84900778)|| // Delta Force Clan BDU (texnum==27500442)|| // Delta Force Body Armor (texnum==42800576)|| // Delta Force Body Armor 2 (texnum==52100658)|| // Delta Force Tactical Vest (texnum==12200196)|| // Spetsnaz Helmet (texnum==27100464)|| // Spetsnaz Gas Mask (texnum==33600552)|| // Spetsnaz Body Armor (texnum==44100646)|| // Spetsnaz Tactical Vest (texnum==17800292)|| // GIGN Red Bandana (texnum==21300290)|| // GIGN Helmet (texnum==2800036)|| // GIGN Helmet Lens (texnum==35700558)|| // GIGN Gas Mask (texnum==22100396)|| // GIGN Balaclava (texnum==29700492)|| // GIGN Body Armor (texnum==11200188)|| // ROKMC Beret (texnum==12000194)|| // ROKMC Helmet (texnum==29800450)|| // ROKMC Gas Mask (texnum==27100394)|| // ROKMC Body Armor (texnum==28700374)|| // ROKMC X Harness (texnum==34700470)|| // ROKMC X Harness (texnum==5100056)|| // ROKMC Pouch (texnum==9900163)|| // ROKMC Left Arm (texnum==18300163)|| // ROKMC Right Arm (texnum==16400266)|| // GSG9 Red Bandana (texnum==16200243)|| // GSG9 Helmet (texnum==31900466)|| // GSG9 Gas Mask (texnum==19300342)|| // GSG9 Balaclava (texnum==83600752)|| // GSG9 Clan BDU (texnum==33400477)|| // GSG9 Body Armor (texnum==10500163)|| // GSG9 Rolled Up Sleeves (texnum==38100666)|| // GSG9 Tactical Knee Pads (texnum==9600172)|| // SAS Boonie Hat (texnum==14200236)|| // SAS Helmet (texnum==37800552)|| // SAS Gas Mask (texnum==28100486)|| // SAS Balaclava (texnum==62400752)|| // SAS Clan BDU (texnum==27900456)|| // SAS Body Armor (texnum==45700654)|| // SAS Tactical Vest (texnum==39800532)|| // SAS Tactical Vest 2 (texnum==9200100)|| // SAS Holster (texnum==4800040)|| // SAS Magazine Pouch (texnum==4000044)|| // SAS Pouch (texnum==6500110) || // KSF Boonie Hat (texnum==12900208)|| // KSF Helmet (texnum==29600448)|| // KSF Gas Mask (texnum==31100398)|| // KSF Sunglasses (texnum==84700776)|| // KSF Clan BDU (texnum==600004)|| // KSF Clan BDU Logo (texnum==36500606)|| // KSF Body Armor (texnum==63100646)|| // KSF Tactical Vest (texnum==19800163)|| // KSF Rolled Up Sleeves (texnum==7000066)|| // KSF Holster (texnum==10400190)|| // SRG Beret (texnum==23800294)|| // SRG Deer Head (texnum==11600180)|| // SRG NIJ IIIA Helmet (texnum==17100278)|| // SRG Red Bandana (texnum==14600198)|| // SRG Battle Cap (texnum==18200266)|| // SRG Helmet (texnum==19100106)|| // SRG Gas Mask (texnum==54300350)|| // SRG Sunglasses (texnum==30800380)|| // SRG Mid Class Sunglasses (texnum==79300995)|| // SRG Clan BDU 1 (texnum==13300138)|| // SRG Clan BDU 2 (texnum==300001)|| // SRG Clan BDU 3 (texnum==1200012)|| // SRG Clan BDU Logo (texnum==10900110)|| // SRG Bulletproof Vest (texnum==6200064)|| // SRG Holster (texnum==22700250)|| // SRG Pouch (texnum==2800036)|| // Force Recon Helmet Lens (texnum==35700558)|| // Force Recon Gas Mask (texnum==22100396)|| // Force Recon Balaclava (texnum==29700492)|| // Force Recon Body Armor (texnum==11200188)|| // Force Recon Beret (texnum==12000194)|| // Force Recon Helmet (texnum==29800450)|| // Force Recon Gas Mask (texnum==27100394)|| // Force Recon Body Armor (texnum==28700374)|| // Force Recon X Harness (texnum==34700470)|| // Force Recon X Harness (texnum==5100056)|| // Force Recon Pouch (texnum==9900163)|| // Force ReconLeft Arm (texnum==18300163)|| // Force Recon Right Arm (nNumVertices == 448 && nPrimitiveCount == 776))
Use Vtable if running Vista * READ THE REST PLEASE*
--------------------------
Memory Vtable:
1)The order of the vtable is in memory.
I dont have any d3d8 games installed so im using d3d9.
If you go to Dip offset in ollydebug.... right click analyse->analyse code.Then on the offset right click find refrences->selected command.There will be two vtable pointers,click on it now the vtable is order for you.
Code:
4FDE6D80 . 3088E54F DD d3d9.4FE58830[82] 4FDE6D84 . 7089E54F DD d3d9.4FE58970[83] 4FDE6D88 . C08BE54F DD d3d9.4FE58BC0[84] 4FDE6D8C . 409EE64F DD d3d9.4FE69E40[85] 4FDE6D90 . 601FE64F DD d3d9.4FE61F60[86] 4FDE6D94 . 4045E54F DD d3d9.4FE54540[87] 4FDE6D98 . 7046E54F DD d3d9.4FE54670[88] 4FDE6D9C . 6043E54F DD d3d9.4FE54360[89]
Functions in order:
then if you want to know what the function is open your d3d9.h in microsoft directx sdk.
Code:
#undef INTERFACE
#define INTERFACE IDirect3DDevice9
DECLARE_INTERFACE_(IDirect3DDevice9, IUnknown)
{
/*** IUnknown methods ***/
[0] STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE;
[1] STDMETHOD_(ULONG,AddRef)(THIS) PURE;
[2] STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DDevice9 methods ***/
[3] STDMETHOD(TestCooperativeLevel)(THIS) PURE;
[4] STDMETHOD_(UINT, GetAvailableTextureMem)(THIS) PURE;
[5] STDMETHOD(EvictManagedResources)(THIS) PURE;
[6] STDMETHOD(GetDirect3D)(THIS_ IDirect3D9** ppD3D9) PURE;
[7] STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS9* pCaps) PURE;
[8] STDMETHOD(GetDisplayMode)(THIS_ UINT iSwapChain,D3DDISPLAYMODE* pMode) PURE;
[9] STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS *pParameters) PURE;
[10] STDMETHOD(SetCursorProperties)(THIS_ UINT XHotSpot,UINT YHotSpot,IDirect3DSurface9* pCursorBitmap) PURE;
[11] STDMETHOD_(void, SetCursorPosition)(THIS_ int X,int Y,DWORD Flags) PURE;
[12] STDMETHOD_(BOOL, ShowCursor)(THIS_ BOOL bShow) PURE;
[13] STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DSwapChain9** pSwapChain) PURE;
[14] STDMETHOD(GetSwapChain)(THIS_ UINT iSwapChain,IDirect3DSwapChain9** pSwapChain) PURE;
[15] STDMETHOD_(UINT, GetNumberOfSwapChains)(THIS) PURE;
[16] STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE;
[17] STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion) PURE;
[18] STDMETHOD(GetBackBuffer)(THIS_ UINT iSwapChain,UINT iBackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface9** ppBackBuffer) PURE;
[19] STDMETHOD(GetRasterStatus)(THIS_ UINT iSwapChain,D3DRASTER_STATUS* pRasterStatus) PURE;
[20] STDMETHOD(SetDialogBoxMode)(THIS_ BOOL bEnableDialogs) PURE;
[21] STDMETHOD_(void, SetGammaRamp)(THIS_ UINT iSwapChain,DWORD Flags,CONST D3DGAMMARAMP* pRamp) PURE;
[22] STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain,D3DGAMMARAMP* pRamp) PURE;
[23] STDMETHOD(CreateTexture)(THIS_ UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DTexture9** ppTexture,HANDLE* pSharedHandle) PURE;
[24] STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DVolumeTexture9** ppVolumeTexture,HANDLE* pSharedHandle) PURE;
[25] STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DCubeTexture9** ppCubeTexture,HANDLE* pSharedHandle) PURE;
[26] STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,IDirect3DVertexBuffer9** ppVertexBuffer,HANDLE* pSharedHandle) PURE;
[27] STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer9** ppIndexBuffer,HANDLE* pSharedHandle) PURE;
[28] STDMETHOD(CreateRenderTarget)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Lockable,IDirect3DSurface9** ppSurface,HANDLE* pSharedHandle) PURE;
[29] STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,DWORD MultisampleQuality,BOOL Discard,IDirect3DSurface9** ppSurface,HANDLE* pSharedHandle) PURE;
[30] STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9* pSourceSurface,CONST RECT* pSourceRect,IDirect3DSurface9* pDestinationSurface,CONST POINT* pDestPoint) PURE;
[31] STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9* pSourceTexture,IDirect3DBaseTexture9* pDestinationTexture) PURE;
[32] STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9* pRenderTarget,IDirect3DSurface9* pDestSurface) PURE;
[33] STDMETHOD(GetFrontBufferData)(THIS_ UINT iSwapChain,IDirect3DSurface9* pDestSurface) PURE;
[34] STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9* pSourceSurface,CONST RECT* pSourceRect,IDirect3DSurface9* pDestSurface,CONST RECT* pDestRect,D3DTEXTUREFILTERTYPE Filter) PURE;
[35] STDMETHOD(ColorFill)(THIS_ IDirect3DSurface9* pSurface,CONST RECT* pRect,D3DCOLOR color) PURE;
[36] STDMETHOD(CreateOffscreenPlainSurface)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,D3DPOOL Pool,IDirect3DSurface9** ppSurface,HANDLE* pSharedHandle) PURE;
[37] STDMETHOD(SetRenderTarget)(THIS_ DWORD RenderTargetIndex,IDirect3DSurface9* pRenderTarget) PURE;
[38] STDMETHOD(GetRenderTarget)(THIS_ DWORD RenderTargetIndex,IDirect3DSurface9** ppRenderTarget) PURE;
[39] STDMETHOD(SetDepthStencilSurface)(THIS_ IDirect3DSurface9* pNewZStencil) PURE;
[40] STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface9** ppZStencilSurface) PURE;
[41] STDMETHOD(BeginScene)(THIS) PURE;
[42] STDMETHOD(EndScene)(THIS) PURE;
[43] STDMETHOD(Clear)(THIS_ DWORD Count,CONST D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil) PURE;
[44] STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix) PURE;
[45] STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix) PURE;
[46] STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE;
[47] STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT9* pViewport) PURE;
[48] STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT9* pViewport) PURE;
[49] STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9* pMaterial) PURE;
[50] STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL9* pMaterial) PURE;
[51] STDMETHOD(SetLight)(THIS_ DWORD Index,CONST D3DLIGHT9*) PURE;
[52] STDMETHOD(GetLight)(THIS_ DWORD Index,D3DLIGHT9*) PURE;
[53] STDMETHOD(LightEnable)(THIS_ DWORD Index,BOOL Enable) PURE;
[54] STDMETHOD(GetLightEnable)(THIS_ DWORD Index,BOOL* pEnable) PURE;
[55] STDMETHOD(SetClipPlane)(THIS_ DWORD Index,CONST float* pPlane) PURE;
[56] STDMETHOD(GetClipPlane)(THIS_ DWORD Index,float* pPlane) PURE;
[57] STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State,DWORD Value) PURE;
[58] STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE State,DWORD* pValue) PURE;
[59] STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE Type,IDirect3DStateBlock9** ppSB) PURE;
[60] STDMETHOD(BeginStateBlock)(THIS) PURE;
[61] STDMETHOD(EndStateBlock)(THIS_ IDirect3DStateBlock9** ppSB) PURE;
[62] STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS9* pClipStatus) PURE;
[63] STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS9* pClipStatus) PURE;
[64] STDMETHOD(GetTexture)(THIS_ DWORD Stage,IDirect3DBaseTexture9** ppTexture) PURE;
[65] STDMETHOD(SetTexture)(THIS_ DWORD Stage,IDirect3DBaseTexture9* pTexture) PURE;
[66] STDMETHOD(GetTextureStageState)(THIS_ DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue) PURE;
[67] STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value) PURE;
[68] STDMETHOD(GetSamplerState)(THIS_ DWORD Sampler,D3DSAMPLERSTATETYPE Type,DWORD* pValue) PURE;
[69] STDMETHOD(SetSamplerState)(THIS_ DWORD Sampler,D3DSAMPLERSTATETYPE Type,DWORD Value) PURE;
[70] STDMETHOD(ValidateDevice)(THIS_ DWORD* pNumPasses) PURE;
[71] STDMETHOD(SetPaletteEntries)(THIS_ UINT PaletteNumber,CONST PALETTEENTRY* pEntries) PURE;
[72] STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries) PURE;
[73] STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT PaletteNumber) PURE;
[74] STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT *PaletteNumber) PURE;
[75] STDMETHOD(SetScissorRect)(THIS_ CONST RECT* pRect) PURE;
[76] STDMETHOD(GetScissorRect)(THIS_ RECT* pRect) PURE;
[77] STDMETHOD(SetSoftwareVertexProcessing)(THIS_ BOOL bSoftware) PURE;
[78] STDMETHOD_(BOOL, GetSoftwareVertexProcessing)(THIS) PURE;
[79] STDMETHOD(SetNPatchMode)(THIS_ float nSegments) PURE;
[80] STDMETHOD_(float, GetNPatchMode)(THIS) PURE;
[81] STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount) PURE;
[82] STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount) PURE;
[83] STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride) PURE;
[84] STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertices,UINT PrimitiveCount,CONST void* pIndexData,D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride) PURE;
[85] STDMETHOD(ProcessVertices)(THIS_ UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer9* pDestBuffer,IDirect3DVertexDeclaration9* pVertexDecl,DWORD Flags) PURE;
[86] STDMETHOD(CreateVertexDeclaration)(THIS_ CONST D3DVERTEXELEMENT9* pVertexElements,IDirect3DVertexDeclaration9** ppDecl) PURE;
[87] STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9* pDecl) PURE;
[88] STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9** ppDecl) PURE;
[89] STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
[90] STDMETHOD(GetFVF)(THIS_ DWORD* pFVF) PURE;
[91] STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD* pFunction,IDirect3DVertexShader9** ppShader) PURE;
[92] STDMETHOD(SetVertexShader)(THIS_ IDirect3DVertexShader9* pShader) PURE;
[93] STDMETHOD(GetVertexShader)(THIS_ IDirect3DVertexShader9** ppShader) PURE;
[94] STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount) PURE;
[95] STDMETHOD(GetVertexShaderConstantF)(THIS_ UINT StartRegister,float* pConstantData,UINT Vector4fCount) PURE;
[96] STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount) PURE;
[97] STDMETHOD(GetVertexShaderConstantI)(THIS_ UINT StartRegister,int* pConstantData,UINT Vector4iCount) PURE;
[98] STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount) PURE;
[99] STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT StartRegister,BOOL* pConstantData,UINT BoolCount) PURE;
[100] STDMETHOD(SetStreamSource)(THIS_ UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride) PURE;
[101] STDMETHOD(GetStreamSource)(THIS_ UINT StreamNumber,IDirect3DVertexBuffer9** ppStreamData,UINT* pOffsetInBytes,UINT* pStride) PURE;
[102] STDMETHOD(SetStreamSourceFreq)(THIS_ UINT StreamNumber,UINT Setting) PURE;
[103] STDMETHOD(GetStreamSourceFreq)(THIS_ UINT StreamNumber,UINT* pSetting) PURE;
[104] STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer9* pIndexData) PURE;
[105] STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer9** ppIndexData) PURE;
[106] STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction,IDirect3DPixelShader9** ppShader) PURE;
[107] STDMETHOD(SetPixelShader)(THIS_ IDirect3DPixelShader9* pShader) PURE;
[108] STDMETHOD(GetPixelShader)(THIS_ IDirect3DPixelShader9** ppShader) PURE;
[109] STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount) PURE;
[110] STDMETHOD(GetPixelShaderConstantF)(THIS_ UINT StartRegister,float* pConstantData,UINT Vector4fCount) PURE;
[111] STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT StartRegister,CONST int* pConstantData,UINT Vector4iCount) PURE;
[112] STDMETHOD(GetPixelShaderConstantI)(THIS_ UINT StartRegister,int* pConstantData,UINT Vector4iCount) PURE;
[113] STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT StartRegister,CONST BOOL* pConstantData,UINT BoolCount) PURE;
[114] STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT StartRegister,BOOL* pConstantData,UINT BoolCount) PURE;
[115] STDMETHOD(DrawRectPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3DRECTPATCH_INFO* pRectPatchInfo) PURE;
[116] STDMETHOD(DrawTriPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3DTRIPATCH_INFO* pTriPatchInfo) PURE;
[117] STDMETHOD(DeletePatch)(THIS_ UINT Handle) PURE;
[118] STDMETHOD(CreateQuery)(THIS_ D3DQUERYTYPE Type,IDirect3DQuery9** ppQuery) PURE;
how its calculated:
if you want to know how the pointer value like 82,83,84 is calculated.
take the offset from your vtable memory search
Code:
4FDE6D80 . 3088E54F DD d3d9.4FE58830//vtable for dip 4FDE6C38 . 3004E14F DD d3d9.4FE10430//first offset in that vtable 4FDE6D80-4FDE6C38=148 bytes 148/4 bytes =52->decimal =[82]
Code:
HRESULT APIENTRY hkIDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DDevice9 **ppReturnedDeviceInterface//our pointer to the interface)
add this:
unsigned long* pInterface = (unsigned long*)*(unsigned long*)*ppReturnedDeviceInterface;
add_log("DrawIndexedPrimitive = %x\n", pInterface[82]);
I'd Like to take Credict for all This but nope
Credits :
The D3D offsets credits go to Snalf2 ( Friend of mines =] )
Cham's + Texture Coloring fill out's Lion2205 ( me duh)






