Mercurial > mm7
comparison Render.cpp @ 852:e3609dd06c15
m
author | Ritor1 |
---|---|
date | Sat, 30 Mar 2013 09:40:05 +0600 |
parents | 6dd2b94efce7 |
children | 8fc2f035abc0 |
comparison
equal
deleted
inserted
replaced
851:6f7c2ab9ce4f | 852:e3609dd06c15 |
---|---|
7597 } | 7597 } |
7598 // 4A26BC: could not find valid save-restore pair for esi | 7598 // 4A26BC: could not find valid save-restore pair for esi |
7599 // 4D864C: using guessed type char byte_4D864C; | 7599 // 4D864C: using guessed type char byte_4D864C; |
7600 | 7600 |
7601 //----- (004A2DA3) -------------------------------------------------------- | 7601 //----- (004A2DA3) -------------------------------------------------------- |
7602 void Render::DrawStrip(unsigned int uNumVertices, struct stru148 *a3, IDirect3DTexture2 *pTexture) | 7602 void Render::DrawSkyPolygon(unsigned int uNumVertices, stru148 *a3, IDirect3DTexture2 *pTexture) |
7603 { | 7603 { |
7604 //int v4; // ebx@1 | |
7605 int v7; // eax@7 | |
7606 float v12; // ST3C_4@8 | |
7607 int i; | |
7608 | |
7609 //v4 = (int)this; | |
7610 if (!this->uNumD3DSceneBegins) | |
7611 return; | |
7612 | |
7613 if (uNumVertices >= 3) | |
7614 { | |
7615 this->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP); | |
7616 if (this->bUsingSpecular) | |
7617 { | |
7618 this->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); | |
7619 this->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE); | |
7620 this->pRenderD3D->pDevice->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ZERO); | |
7621 } | |
7622 | |
7623 for (i = 0; i < uNumVertices; ++i) | |
7624 { | |
7625 pVertices[i].pos.x = array_50AC10[i].vWorldViewProjX; | |
7626 pVertices[i].pos.y = array_50AC10[i].vWorldViewProjY; | |
7627 pVertices[i].pos.z = 0.99989998; | |
7628 pVertices[i].rhw = array_50AC10[i]._rhw; | |
7629 | |
7630 pVertices[i].diffuse = ::GetActorTintColor(31, 0, array_50AC10[i].vWorldViewPosition.x, true, false); | |
7631 v7 = 0; | |
7632 if (this->bUsingSpecular) | |
7633 { | |
7634 v12 = array_50AC10[i].vWorldViewPosition.x; | |
7635 v7 = sub_47C3D7_get_fog_related_stuff(0, 1, v12); | |
7636 } | |
7637 pVertices[i].specular = v7; | |
7638 pVertices[i].texcoord.x = array_50AC10[i].u; | |
7639 pVertices[i].texcoord.y = array_50AC10[i].v; | |
7640 } | |
7641 pRenderer->pRenderD3D->pDevice->SetTexture(0, pTexture); | |
7642 pRenderer->pRenderD3D->pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1, | |
7643 pVertices, uNumVertices, D3DDP_DONOTUPDATEEXTENTS | D3DDP_DONOTLIGHT); | |
7644 } | |
7645 } | |
7646 | |
7647 //----- (004A2DA3) -------------------------------------------------------- | |
7648 void Render::DrawFan(unsigned int uNumVertices, stru148 *a3, IDirect3DTexture2 *pTexture) | |
7649 { | |
7650 //int v4; // ebx@1 | |
7651 int v7; // eax@7 | 7604 int v7; // eax@7 |
7652 float v13; // ST3C_4@8 | 7605 float v13; // ST3C_4@8 |
7653 int i; | 7606 int i; |
7654 | 7607 |
7655 //v4 = (int)this; | |
7656 if ( !this->uNumD3DSceneBegins ) | 7608 if ( !this->uNumD3DSceneBegins ) |
7657 return; | 7609 return; |
7658 if ( uNumVertices >= 3 ) | 7610 if ( uNumVertices >= 3 ) |
7659 { | 7611 { |
7660 this->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP); | 7612 this->pRenderD3D->pDevice->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_WRAP); |