Author Topic: Some ARMA D3D model rec  (Read 950 times)

0 Members and 1 Guest are viewing this topic.

Jurugi

  • Online Villain
  • ***
  • Posts: 190
    • View Profile
Some ARMA D3D model rec
« on: November 25, 2009, 07:41:11 am »
Well I played ARMA for about a week but now I'm looking at it and I guess I'm gonna uninstall it. I personally like OFP better, but haven't tried ARMA2 yet. Here's the small app I made, and most of the time consuming crap. Put it into DrawIndexedPrimitive:

Code: [Select]
if(Snowmode)
{
if(m_stride==40)
m_pD3Ddev->SetTexture(0, texWhite);
}


if(XQZ2)
{
if (m_stride==36 && startIndex==3||
m_stride==36 && startIndex==18)
{
DWORD dwOldZEnable;
        m_pD3Ddev->GetRenderState(D3DRS_ZENABLE,&dwOldZEnable);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetTexture(0, texBlue);
        m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
        m_pD3Ddev->SetRenderState(D3DRS_ZENABLE,dwOldZEnable);
}
else if(m_stride==36 && m_stride==36 && NumVertices==259||m_stride==36 && NumVertices==560||m_stride==36 && NumVertices==940||
m_stride==36 && NumVertices==495||m_stride==36 && NumVertices==260||m_stride==36 && NumVertices==329||
NumVertices==382||m_stride==36 && NumVertices==461||m_stride==36 && NumVertices==509||
m_stride==36 && NumVertices==566||m_stride==36 && NumVertices==596||m_stride==36 && NumVertices==728||
m_stride==36 && NumVertices==1024||m_stride==36 && NumVertices==1116||m_stride==36 && NumVertices==694||
m_stride==36 && NumVertices==1126||m_stride==36 && NumVertices==1245||m_stride==36 && NumVertices==2447||
m_stride==36 && NumVertices==3431||m_stride==36 && NumVertices==1282||m_stride==36 && NumVertices==1127||
m_stride==36 && NumVertices==3431||m_stride==36 && NumVertices==1282||m_stride==36 && NumVertices==1127||
m_stride==36 && NumVertices==2383||m_stride==36 && NumVertices==4236||m_stride==36 && NumVertices==245||
m_stride==36 && NumVertices==3431||m_stride==36 && NumVertices==1282||m_stride==36 && NumVertices==1127||
m_stride==36 && NumVertices==454||m_stride==36 && NumVertices==1282||m_stride==36 && NumVertices==1127||
m_stride==36 && NumVertices==110||m_stride==36 && NumVertices==574||m_stride==36 && NumVertices==364||
m_stride==36 && NumVertices==613||m_stride==36 && NumVertices==268||m_stride==36 && NumVertices==392||
m_stride==36 && NumVertices==246||m_stride==36 && NumVertices==455||m_stride==36 && NumVertices==861||
m_stride==36 && NumVertices==1725||m_stride==36 && NumVertices==2829||m_stride==36 && NumVertices==3416||
m_stride==36 && NumVertices==1035||m_stride==36 && NumVertices==1404||m_stride==36 && NumVertices==1805||
m_stride==36 && NumVertices==1408||m_stride==36 && NumVertices==2830||m_stride==36 && NumVertices==564||
m_stride==36 && NumVertices==466||m_stride==36 && NumVertices==668||m_stride==36 && NumVertices==819||
m_stride==36 && NumVertices==1043||m_stride==36 && NumVertices==331||m_stride==36 && NumVertices==568||
m_stride==36 && NumVertices==1434||m_stride==36 && NumVertices==1737||m_stride==36 && NumVertices==681||
m_stride==36 && NumVertices==511||m_stride==36 && NumVertices==1349||m_stride==36 && NumVertices==2017||
m_stride==36 && NumVertices==202||m_stride==36 && NumVertices==261||m_stride==36 && NumVertices==558||
m_stride==36 && NumVertices==529||m_stride==36 && NumVertices==244||m_stride==36 && NumVertices==194||
m_stride==36 && NumVertices==504||m_stride==36 && NumVertices==721||m_stride==36 && NumVertices==244||
m_stride==36 && NumVertices==335||m_stride==36 && NumVertices==408||m_stride==36 && NumVertices==409||
m_stride==36 && NumVertices==274||m_stride==36 && NumVertices==349||m_stride==36 && NumVertices==732||
m_stride==36 && NumVertices==135||m_stride==36 && NumVertices==242||m_stride==36 && NumVertices==198||
m_stride==36 && NumVertices==734||m_stride==36 && NumVertices==780||m_stride==36 && NumVertices==1135||
m_stride==36 && NumVertices==1348||m_stride==36 && NumVertices==242||
m_stride==36 && NumVertices==421||m_stride==36 && NumVertices==749||m_stride==36 && NumVertices==966||
m_stride==36 && NumVertices==965||m_stride==36 && NumVertices==616||m_stride==36 && NumVertices==642||
m_stride==36 && NumVertices==153||m_stride==530 && NumVertices==1032||m_stride==36 && NumVertices==1032||
m_stride==36 && NumVertices==1058||m_stride==36 && NumVertices==419||m_stride==36 && NumVertices==270||
m_stride==36 && NumVertices==272||m_stride==36 && NumVertices==720||m_stride==36 && NumVertices==780)
{
DWORD dwOldZEnable;
        m_pD3Ddev->GetRenderState(D3DRS_ZENABLE,&dwOldZEnable);
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, false);
m_pD3Ddev->SetTexture(0, texBlue);
        m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
        m_pD3Ddev->SetRenderState(D3DRS_ZENABLE,dwOldZEnable);
}
else m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
if(NumVertices==2060||NumVertices==424) // disable Windows, Doors
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
}


//////////////////////////////////////////////////////////////
////// Chams ////////////////////////////////////////////////
if(Chams && m_stride==36)
{
// Ambient weapons, important things
   if(NumVertices==1014||NumVertices==456||NumVertices==181||
   NumVertices==616||NumVertices==642||startIndex==3||
   startIndex==18||NumVertices==158)
m_pD3Ddev->SetTexture(0, texYellow);
// US Forces
// Tanks/vehicles
if(NumVertices==868||NumVertices==4190||NumVertices==3360)
m_pD3Ddev->SetTexture(0, texGreen);
// Soldiers
if(NumVertices==259||NumVertices==560||NumVertices==940||
NumVertices==495||NumVertices==260||NumVertices==329||
NumVertices==382||NumVertices==461||NumVertices==509||
NumVertices==566||NumVertices==596||NumVertices==728||
NumVertices==1024||NumVertices==1116||NumVertices==694||
NumVertices==1126||NumVertices==1245||NumVertices==2447||
NumVertices==3431||NumVertices==1282||NumVertices==1127||
NumVertices==3431||NumVertices==1282||NumVertices==1127||
NumVertices==2383||NumVertices==4236||NumVertices==245||
NumVertices==3431||NumVertices==1282||NumVertices==1127||
NumVertices==454||NumVertices==1282||NumVertices==1127||
NumVertices==110||NumVertices==574||NumVertices==364||
NumVertices==613||NumVertices==268||NumVertices==392||
NumVertices==246||NumVertices==455||NumVertices==861||
NumVertices==1725||NumVertices==2829||NumVertices==3416||
NumVertices==1035||NumVertices==1404||NumVertices==1805||
NumVertices==1408||NumVertices==2830||NumVertices==564||
NumVertices==466||NumVertices==668||NumVertices==819||
NumVertices==1043||NumVertices==331||NumVertices==568||
NumVertices==1434||NumVertices==1737||NumVertices==681||
NumVertices==511||NumVertices==1349||NumVertices==2017||
NumVertices==202||NumVertices==261||NumVertices==558||
NumVertices==424||NumVertices==242||NumVertices==421||
NumVertices==749||NumVertices==966||NumVertices==965||
NumVertices==153||NumVertices==1032||NumVertices==1032||
NumVertices==1058||NumVertices==419||NumVertices==270||
NumVertices==272||NumVertices==788)
m_pD3Ddev->SetTexture(0, texGreen);

// Red, enemy forces
// Tanks
if(NumVertices==983||NumVertices==995||NumVertices==316|| // bmp, enemy truck
NumVertices==136||NumVertices==403||NumVertices==638||NumVertices==684) // T-72
m_pD3Ddev->SetTexture(0, texRed);
// Soldiers
if(NumVertices==529||NumVertices==244||NumVertices==194||
NumVertices==504||NumVertices==721||NumVertices==244||
NumVertices==335||NumVertices==408||NumVertices==409||
NumVertices==274||NumVertices==349||NumVertices==732||
NumVertices==135||NumVertices==242||NumVertices==198||
NumVertices==734||NumVertices==780||NumVertices==1135||
NumVertices==1348)
m_pD3Ddev->SetTexture(0, texRed);
}


Also thanks Mr. Medic, I used your loader to inject the .dll. It's included in the .zip file. The numpad keys toggle the features, so turn on Numlock if its not working.
« Last Edit: November 25, 2009, 08:57:52 pm by Jurugi »