How to use Numvertices and Primitives into chams?
Every Characters have each correct modelrec inorder to chams,
Example for PSU Character ModRec logged
1. Define each characters you want to chams for PSU# Numvertices |# Primitives |
87 | Arms |139| Arms |
79 | Feet |105| Feet |
126| Hands |172| Hands |
370| Legs |740| Legs |
499| Body |624| Body |
523| Head |846| Head |
-----------------------------
Code:
2. Then, in Global#define (Numvertices== 87 && Primitives == 139)//arms
Numvertices== 79 && Primitives == 105 ||//feet
Numvertices== 126 && Primitives ==172 ||//hands
Numvertices== 370 && Primitives ==740 ||//legs
Numvertices== 499 && Primitives ==624 ||//body
Numvertices== 523 && Primitives ==846) //head
Code:
3.In EndScene: for the Color Texture of the character.LPDIRECT3DTEXTURE9 Bue,Pink;
bool Color = true;
bool chams;
int Primitives;
int Numvertices;
Code:
4. In DIP: for the color chams during in-game:(Color)
{
if
GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255,255,20 ,147));
GenerateTexture(pDevice, &Blue, D3DCOLOR_ARGB (255,0 ,0 ,255));
Color = false;
}
Code:
5. Here's the actual Screeshots:LPDIRECT3DVERTEXBUFFER9 Stream;
UINT Offset;
UINT Stride;
if ( pDevice->GetStreamSource(0,&Stream,&Offset,&Stride) == D3D_OK )
{
Stream->Release();
}
if (chams)
...
...
(PSU)
...
...
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDevice->SetTexture(0,Blue);
pDrawIndexedPrimitive(pDevice,Type,BaseIndex,MinIn dex,Numvertices,Startindex,Primitive);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,Pink);
}
Credits: FireFox, DarkAppalow, 11Swift11