Mercurial > mm7
comparison Render.cpp @ 718:a5ee769b02c6
Слияние
author | Ritor1 |
---|---|
date | Mon, 18 Mar 2013 01:51:31 +0600 |
parents | d5473972234d e0a1fccc89b1 |
children | 737d7fec67f0 |
comparison
equal
deleted
inserted
replaced
717:d5473972234d | 718:a5ee769b02c6 |
---|---|
330 if ( v4 ) | 330 if ( v4 ) |
331 { | 331 { |
332 v5 = v4->pTexture; | 332 v5 = v4->pTexture; |
333 if ( v5 ) | 333 if ( v5 ) |
334 { | 334 { |
335 if ( v3->field_8 >= (signed int)pViewport->uViewportX || v3->field_C != pViewport->uViewportX ) | 335 if ( v3->field_8 >= (signed int)pViewport->uViewportTL_X || v3->field_C != pViewport->uViewportTL_X ) |
336 { | 336 { |
337 LOBYTE(v4->field_32) |= 2u; | 337 LOBYTE(v4->field_32) |= 2u; |
338 v14 = *(int *)&v4->flags; | 338 v14 = *(int *)&v4->flags; |
339 if ( v14 & 0x10 && v4->field_59 != 5 ) | 339 if ( v14 & 0x10 && v4->field_59 != 5 ) |
340 { | 340 { |
648 { | 648 { |
649 v30 = &pSpans[v29 - 1]; | 649 v30 = &pSpans[v29 - 1]; |
650 v2 = (stru148 *)v30->field_E; | 650 v2 = (stru148 *)v30->field_E; |
651 if ( v2 != (stru148 *)unnamed_6BE060[1] ) | 651 if ( v2 != (stru148 *)unnamed_6BE060[1] ) |
652 { | 652 { |
653 LOWORD(v2) = LOWORD(pViewport->uViewportX); | 653 LOWORD(v2) = LOWORD(pViewport->uViewportTL_X); |
654 if ( v30->field_8 >= (signed int)pViewport->uViewportX ) | 654 if ( v30->field_8 >= (signed int)pViewport->uViewportTL_X ) |
655 goto LABEL_124; | 655 goto LABEL_124; |
656 if ( v30->field_C == pViewport->uViewportX ) | 656 if ( v30->field_C == pViewport->uViewportTL_X ) |
657 { | 657 { |
658 v30->field_E = LOWORD(unnamed_6BE060[1]); | 658 v30->field_E = LOWORD(unnamed_6BE060[1]); |
659 } | 659 } |
660 else | 660 else |
661 { | 661 { |
662 v30->field_8 = LOWORD(pViewport->uViewportX); | 662 v30->field_8 = LOWORD(pViewport->uViewportTL_X); |
663 v30->field_C -= LOWORD(pViewport->uViewportX); | 663 v30->field_C -= LOWORD(pViewport->uViewportTL_X); |
664 if ( v30->field_C >= 0 ) | 664 if ( v30->field_C >= 0 ) |
665 { | 665 { |
666 LABEL_124: | 666 LABEL_124: |
667 v31 = v30->field_C; | 667 v31 = v30->field_C; |
668 v30->pParent = &array_77EC08[1999]; | 668 v30->pParent = &array_77EC08[1999]; |
691 { | 691 { |
692 v13 = &pSpans[v12 - 1]; | 692 v13 = &pSpans[v12 - 1]; |
693 v2 = (stru148 *)v13->field_E; | 693 v2 = (stru148 *)v13->field_E; |
694 if ( v2 != (stru148 *)unnamed_6BE060[1] ) | 694 if ( v2 != (stru148 *)unnamed_6BE060[1] ) |
695 { | 695 { |
696 LOWORD(v2) = LOWORD(pViewport->uViewportX); | 696 LOWORD(v2) = LOWORD(pViewport->uViewportTL_X); |
697 if ( v13->field_8 >= (signed int)pViewport->uViewportX ) | 697 if ( v13->field_8 >= (signed int)pViewport->uViewportTL_X ) |
698 goto LABEL_109; | 698 goto LABEL_109; |
699 if ( v13->field_C != pViewport->uViewportX ) | 699 if ( v13->field_C != pViewport->uViewportTL_X ) |
700 { | 700 { |
701 v13->field_8 = LOWORD(pViewport->uViewportX); | 701 v13->field_8 = LOWORD(pViewport->uViewportTL_X); |
702 v13->field_C -= LOWORD(pViewport->uViewportX); | 702 v13->field_C -= LOWORD(pViewport->uViewportTL_X); |
703 if ( v13->field_C >= 0 ) | 703 if ( v13->field_C >= 0 ) |
704 { | 704 { |
705 LABEL_109: | 705 LABEL_109: |
706 if ( pOutdoorCamera->bNoSky ) | 706 if ( pOutdoorCamera->bNoSky ) |
707 { | 707 { |
788 int v56; // [sp+54h] [bp+8h]@11 | 788 int v56; // [sp+54h] [bp+8h]@11 |
789 int *v57; // [sp+54h] [bp+8h]@11 | 789 int *v57; // [sp+54h] [bp+8h]@11 |
790 | 790 |
791 v3 = a2; | 791 v3 = a2; |
792 v4 = a1; | 792 v4 = a1; |
793 v5 = (double)(pViewport->uViewportZ - pViewport->uViewportX) * 0.5 / tan(0.6457717418670654) + 0.5; | 793 v5 = (double)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) * 0.5 / tan(0.6457717418670654) + 0.5; |
794 v35 = v5 + 6.7553994e15; | 794 v35 = v5 + 6.7553994e15; |
795 if ( LODWORD(v35) ) | 795 if ( LODWORD(v35) ) |
796 { | 796 { |
797 v55 = 65536 / SLODWORD(v35); | 797 v55 = 65536 / SLODWORD(v35); |
798 v7 = 65536 / SLODWORD(v35) * (a3 - v4->field_A); | 798 v7 = 65536 / SLODWORD(v35) * (a3 - v4->field_A); |
822 v10 = v50; | 822 v10 = v50; |
823 if ( v13 <= v14 ) | 823 if ( v13 <= v14 ) |
824 break; | 824 break; |
825 v12 = a1a; | 825 v12 = a1a; |
826 } | 826 } |
827 if ( v11 <= (signed int)pViewport->uViewportY ) | 827 if ( v11 <= (signed int)pViewport->uViewportTL_Y ) |
828 break; | 828 break; |
829 v9 = ((unsigned __int64)(v3->v_18.z * (signed __int64)v12) >> 16) + v3->v_18.x; | 829 v9 = ((unsigned __int64)(v3->v_18.z * (signed __int64)v12) >> 16) + v3->v_18.x; |
830 --v54; | 830 --v54; |
831 a1a += v55; | 831 a1a += v55; |
832 v12 = a1a; | 832 v12 = a1a; |
3002 | 3002 |
3003 billboard.uParentBillboardID = -1; | 3003 billboard.uParentBillboardID = -1; |
3004 billboard.pTarget = pRenderer->pTargetSurface; | 3004 billboard.pTarget = pRenderer->pTargetSurface; |
3005 billboard.pTargetZ = pRenderer->pActiveZBuffer; | 3005 billboard.pTargetZ = pRenderer->pActiveZBuffer; |
3006 billboard.uTargetPitch = pRenderer->uTargetSurfacePitch; | 3006 billboard.uTargetPitch = pRenderer->uTargetSurfacePitch; |
3007 billboard.uViewportX = pViewport->uViewportX; | 3007 billboard.uViewportX = pViewport->uViewportTL_X; |
3008 billboard.uViewportY = pViewport->uViewportY; | 3008 billboard.uViewportY = pViewport->uViewportTL_Y; |
3009 billboard.uViewportZ = pViewport->uViewportZ - 1; | 3009 billboard.uViewportZ = pViewport->uViewportBR_X - 1; |
3010 billboard.uViewportW = pViewport->uViewportW; | 3010 billboard.uViewportW = pViewport->uViewportBR_Y; |
3011 pOutdoorCamera->uNumBillboards = uNumBillboardsToDraw; | 3011 pOutdoorCamera->uNumBillboards = uNumBillboardsToDraw; |
3012 | 3012 |
3013 for (int i = 0; i < ::uNumBillboardsToDraw; ++i) | 3013 for (int i = 0; i < ::uNumBillboardsToDraw; ++i) |
3014 { | 3014 { |
3015 auto pBillboard = pBillboardRenderList + i; | 3015 auto pBillboard = pBillboardRenderList + i; |
3721 { | 3721 { |
3722 v26 = v41; | 3722 v26 = v41; |
3723 v42 = pSprites_LOD->pSpriteHeaders[(signed __int16)*v37].uWidth >> 1; | 3723 v42 = pSprites_LOD->pSpriteHeaders[(signed __int16)*v37].uWidth >> 1; |
3724 b = (unsigned __int64)(v42 * (signed __int64)v41) >> 16; | 3724 b = (unsigned __int64)(v42 * (signed __int64)v41) >> 16; |
3725 } | 3725 } |
3726 if ( b + v25 >= (signed int)pViewport->uViewportX && v25 - b <= (signed int)pViewport->uViewportZ ) | 3726 if ( b + v25 >= (signed int)pViewport->uViewportTL_X && v25 - b <= (signed int)pViewport->uViewportBR_X ) |
3727 { | 3727 { |
3728 if (::uNumBillboardsToDraw >= 500) | 3728 if (::uNumBillboardsToDraw >= 500) |
3729 return; | 3729 return; |
3730 v27 = &pBillboardRenderList[::uNumBillboardsToDraw++]; | 3730 v27 = &pBillboardRenderList[::uNumBillboardsToDraw++]; |
3731 ++uNumDecorationsDrawnThisFrame; | 3731 ++uNumDecorationsDrawnThisFrame; |
9244 v4 = 1.0; | 9244 v4 = 1.0; |
9245 } | 9245 } |
9246 a3 = v4 * 255.0; | 9246 a3 = v4 * 255.0; |
9247 v39 = a3 + 6.7553994e15; | 9247 v39 = a3 + 6.7553994e15; |
9248 LODWORD(v40) = LODWORD(v39); | 9248 LODWORD(v40) = LODWORD(v39); |
9249 v5 = (double)(signed int)pViewport->uViewportX; | 9249 v5 = (double)(signed int)pViewport->uViewportTL_X; |
9250 v36[0].pos.x = v5; | 9250 v36[0].pos.x = v5; |
9251 v6 = (double)(signed int)pViewport->uViewportY; | 9251 v6 = (double)(signed int)pViewport->uViewportTL_Y; |
9252 v7 = this_ | (LODWORD(v39) << 24); | 9252 v7 = this_ | (LODWORD(v39) << 24); |
9253 this_ = pViewport->uViewportW + 1; | 9253 this_ = pViewport->uViewportBR_Y + 1; |
9254 v36[0].specular = 0; | 9254 v36[0].specular = 0; |
9255 v36[0].pos.y = v6; | 9255 v36[0].pos.y = v6; |
9256 v36[0].diffuse = v7; | 9256 v36[0].diffuse = v7; |
9257 v36[1].diffuse = v7; | 9257 v36[1].diffuse = v7; |
9258 v36[0].pos.z = 0.0; | 9258 v36[0].pos.z = 0.0; |
9263 v36[0].texcoord.x = 0.0; | 9263 v36[0].texcoord.x = 0.0; |
9264 v36[2].specular = 0; | 9264 v36[2].specular = 0; |
9265 v36[3].specular = 0; | 9265 v36[3].specular = 0; |
9266 v36[0].texcoord.y = 0.0; | 9266 v36[0].texcoord.y = 0.0; |
9267 v36[1].pos.x = v5; | 9267 v36[1].pos.x = v5; |
9268 v8 = (double)(pViewport->uViewportW + 1); | 9268 v8 = (double)(pViewport->uViewportBR_Y + 1); |
9269 v36[1].pos.y = v8; | 9269 v36[1].pos.y = v8; |
9270 v36[1].pos.z = 0.0; | 9270 v36[1].pos.z = 0.0; |
9271 v36[1].rhw = 1.0; | 9271 v36[1].rhw = 1.0; |
9272 v36[1].texcoord.x = 0.0; | 9272 v36[1].texcoord.x = 0.0; |
9273 v36[1].texcoord.y = 0.0; | 9273 v36[1].texcoord.y = 0.0; |
9274 v9 = (double)(signed int)pViewport->uViewportZ; | 9274 v9 = (double)(signed int)pViewport->uViewportBR_X; |
9275 v36[2].pos.x = v9; | 9275 v36[2].pos.x = v9; |
9276 v36[2].pos.y = v8; | 9276 v36[2].pos.y = v8; |
9277 v36[2].pos.z = 0.0; | 9277 v36[2].pos.z = 0.0; |
9278 v36[2].rhw = 1.0; | 9278 v36[2].rhw = 1.0; |
9279 v36[2].texcoord.x = 0.0; | 9279 v36[2].texcoord.x = 0.0; |
9308 else | 9308 else |
9309 { | 9309 { |
9310 v40 = (1.0 - a3) * 65536.0; | 9310 v40 = (1.0 - a3) * 65536.0; |
9311 v39 = v40 + 6.7553994e15; | 9311 v39 = v40 + 6.7553994e15; |
9312 LODWORD(a3) = LODWORD(v39); | 9312 LODWORD(a3) = LODWORD(v39); |
9313 v38 = (signed int)(pViewport->uViewportZ - pViewport->uViewportX) >> 1; | 9313 v38 = (signed int)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) >> 1; |
9314 HIDWORD(v39) = pViewport->uViewportW - pViewport->uViewportY + 1; | 9314 HIDWORD(v39) = pViewport->uViewportBR_Y - pViewport->uViewportTL_Y + 1; |
9315 v13 = pViewport->uViewportX + ecx0->uTargetSurfacePitch - pViewport->uViewportZ; | 9315 v13 = pViewport->uViewportTL_X + ecx0->uTargetSurfacePitch - pViewport->uViewportBR_X; |
9316 v14 = &ecx0->pTargetSurface[pViewport->uViewportX + pViewport->uViewportY * ecx0->uTargetSurfacePitch]; | 9316 v14 = &ecx0->pTargetSurface[pViewport->uViewportTL_X + pViewport->uViewportTL_Y * ecx0->uTargetSurfacePitch]; |
9317 v37 = 2 * v13; | 9317 v37 = 2 * v13; |
9318 LODWORD(v40) = (int)v14; | 9318 LODWORD(v40) = (int)v14; |
9319 | 9319 |
9320 int __i = 0; | 9320 int __i = 0; |
9321 v15 = dword_F1B430; | 9321 v15 = dword_F1B430; |