comparison Render.cpp @ 49:5a08b193507f

22.01.13
author Ritor1
date Tue, 22 Jan 2013 17:37:50 +0600
parents aac67e0d2c10
children 2ee78ed62d37
comparison
equal deleted inserted replaced
47:5629105aa178 49:5a08b193507f
1591 v79 = (v73 - 66) << 9; 1591 v79 = (v73 - 66) << 9;
1592 v116 = v77; 1592 v116 = v77;
1593 v105 = v79; 1593 v105 = v79;
1594 v111 = v75 - v77; 1594 v111 = v75 - v77;
1595 do 1595 do
1596 { 1596 {// âûñîòà ÷åòûðåõ âåðøèí ÿ÷åéêè
1597 *(float *)&v106 = (double)v105; 1597 *(float *)&v106 = (double)v105;
1598 *(float *)((char *)&ptr_801A08->vWorldPosition.x + v127) = *(float *)&v106; 1598 *(float *)((char *)&ptr_801A08->vWorldPosition.x + v127) = *(float *)&v106;//x
1599 v105 = (64 - *(int *)((char *)terrain_76D9C8 + v70)) << 9; 1599 v105 = (64 - *(int *)((char *)terrain_76D9C8 + v70)) << 9;
1600 *(float *)((char *)&ptr_801A08->vWorldPosition.y + v127) = (double)v105; 1600 *(float *)((char *)&ptr_801A08->vWorldPosition.y + v127) = (double)v105;//y
1601 v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70)); 1601 v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70));
1602 *(float *)((char *)&ptr_801A08->vWorldPosition.z + v127) = (double)v105; 1602 *(float *)((char *)&ptr_801A08->vWorldPosition.z + v127) = (double)v105;//z
1603 *(float *)((char *)&ptr_801A04->vWorldPosition.x + v127) = *(float *)&v106; 1603 *(float *)((char *)&ptr_801A04->vWorldPosition.x + v127) = *(float *)&v106;//x
1604 v105 = (63 - *(int *)((char *)terrain_76D9C8 + v70)) << 9; 1604 v105 = (63 - *(int *)((char *)terrain_76D9C8 + v70)) << 9;
1605 *(float *)((char *)&ptr_801A04->vWorldPosition.y + v127) = (double)v105; 1605 *(float *)((char *)&ptr_801A04->vWorldPosition.y + v127) = (double)v105;//y
1606 v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70) + 1); 1606 v105 = pOutdoor->GetHeightOnTerrain(v112, *(int *)((char *)terrain_76D9C8 + v70) + 1);
1607 *(float *)((char *)&ptr_801A04->vWorldPosition.z + v127) = (double)v105; 1607 *(float *)((char *)&ptr_801A04->vWorldPosition.z + v127) = (double)v105;//z
1608 if ( !byte_4D864C || !(pGame->uFlags & 0x80) ) 1608 if ( !byte_4D864C || !(pGame->uFlags & 0x80) )
1609 { 1609 {
1610 a1->ViewTransform((RenderVertexSoft *)(char *)ptr_801A08 + v127, 1); 1610 a1->ViewTransform((RenderVertexSoft *)(char *)ptr_801A08 + v127, 1);
1611 a1->ViewTransform((RenderVertexSoft *)(char *)ptr_801A04 + v127, 1); 1611 a1->ViewTransform((RenderVertexSoft *)(char *)ptr_801A04 + v127, 1);
1612 a1->Project((RenderVertexSoft *)(char *)ptr_801A08 + v127, 1, 0); 1612 a1->Project((RenderVertexSoft *)(char *)ptr_801A08 + v127, 1, 0);
2876 v8 = *((short *)v1 + 1); 2876 v8 = *((short *)v1 + 1);
2877 if ( pRenderer->pRenderD3D ) 2877 if ( pRenderer->pRenderD3D )
2878 { 2878 {
2879 billboard.sZValue = v7; 2879 billboard.sZValue = v7;
2880 billboard.uFlags = v2; 2880 billboard.uFlags = v2;
2881 pRenderer->TransformBillboard( 2881 pRenderer->TransformBillboard(&billboard, &pSprites_LOD->pHardwareSprites[v6], v8, (RenderBillboard *)(v1 - 40));
2882 &billboard,
2883 &pSprites_LOD->pHardwareSprites[v6],
2884 v8,
2885 (RenderBillboard *)(v1 - 40));
2886 } 2882 }
2887 else 2883 else
2888 { 2884 {
2889 if ( *(v1 - 10) & 2 ) 2885 if ( *(v1 - 10) & 2 )
2890 v9 = PaletteManager::Get_Dark_or_Red_LUT(*((short *)v1 - 7), 0, 1); 2886 v9 = PaletteManager::Get_Dark_or_Red_LUT(*((short *)v1 - 7), 0, 1);
7081 return; 7077 return;
7082 7078
7083 if (pRenderD3D) 7079 if (pRenderD3D)
7084 { 7080 {
7085 pGame->draw_debug_outlines(); 7081 pGame->draw_debug_outlines();
7086 //DoRenderBillboards_D3D(); //Ritor1: it's temporarily 7082 DoRenderBillboards_D3D(); //Ritor1: it's temporarily
7087 pGame->pStru6Instance->RenderSpecialEffects(); 7083 pGame->pStru6Instance->RenderSpecialEffects();
7088 pRenderD3D->pDevice->EndScene(); 7084 pRenderD3D->pDevice->EndScene();
7089 } 7085 }
7090 else 7086 else
7091 pGame->pStru6Instance->RenderSpecialEffects(); 7087 pGame->pStru6Instance->RenderSpecialEffects();
8226 auto a1 = this; 8222 auto a1 = this;
8227 a3 = a1; 8223 a3 = a1;
8228 if ( a1->uNumD3DSceneBegins ) 8224 if ( a1->uNumD3DSceneBegins )
8229 { 8225 {
8230 v5 = a2; 8226 v5 = a2;
8231 v6 = (double)HIWORD(a2->sZValue); 8227 v6 = (double)a2->sZValue;
8232 v31 = v6; 8228 v31 = v6;
8233 v7 = v6; 8229 v7 = v6;
8234 v8 = Billboard_ProbablyAddToListAndSortByZOrder(LODWORD(v7)); 8230 v8 = Billboard_ProbablyAddToListAndSortByZOrder(v7);
8235 if ( BYTE3(v5->uTintColor) ) 8231 if ( BYTE3(v5->uTintColor) )
8236 pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_3; 8232 pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_3;
8237 else 8233 else
8238 pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Transparent; 8234 pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Transparent;
8239 v9 = pSprite; 8235 v9 = pSprite;
8265 pBillboardRenderListD3D[v8].pQuards[0].pos.x = pBillboarda - pSpritea * v30; 8261 pBillboardRenderListD3D[v8].pQuards[0].pos.x = pBillboarda - pSpritea * v30;
8266 a1b = (double)v23; 8262 a1b = (double)v23;
8267 pBillboardRenderListD3D[v8].pQuards[0].pos.y = a1b - v26 * v29; 8263 pBillboardRenderListD3D[v8].pQuards[0].pos.y = a1b - v26 * v29;
8268 v27 = v31 * 1000.0; 8264 v27 = v31 * 1000.0;
8269 v13 = 1.0; 8265 v13 = 1.0;
8270 pBillboardRenderListD3D[v8].pQuards[0].pos.z = 1.0 8266 pBillboardRenderListD3D[v8].pQuards[0].pos.z = 1.0 - 1.0 / (v27 / (double)pOutdoorCamera->shading_dist_mist);
8271 - 1.0 / (v27 / (double)pOutdoorCamera->shading_dist_mist);
8272 v25 = 1.0 / v31; 8267 v25 = 1.0 / v31;
8273 pBillboardRenderListD3D[v8].pQuards[0].rhw = v25; 8268 pBillboardRenderListD3D[v8].pQuards[0].rhw = v25;
8274 if ( a3->bUsingSpecular ) 8269 if ( a3->bUsingSpecular )
8275 { 8270 {
8276 v12 = sub_47C3D7_get_fog_related_stuff(0, 0, v31); 8271 v12 = sub_47C3D7_get_fog_related_stuff(0, 0, v31);