Mercurial > mm7
comparison Render.cpp @ 726:9d13d2ec35a6
Слияние
author | Ritor1 |
---|---|
date | Fri, 22 Mar 2013 01:29:46 +0600 |
parents | 737d7fec67f0 735dab8d3c9a |
children | 9f596a163257 |
comparison
equal
deleted
inserted
replaced
725:7037f22cd716 | 726:9d13d2ec35a6 |
---|---|
839 LODWORD(v15) = v46 << 16; | 839 LODWORD(v15) = v46 << 16; |
840 HIDWORD(v15) = v46 >> 16; | 840 HIDWORD(v15) = v46 >> 16; |
841 v16 = v42 + ((unsigned __int64)(v3->ptr_38->field_10 * (signed __int64)v10) >> 16); | 841 v16 = v42 + ((unsigned __int64)(v3->ptr_38->field_10 * (signed __int64)v10) >> 16); |
842 v17 = v40 + ((unsigned __int64)(v3->ptr_38->field_1C * (signed __int64)v10) >> 16); | 842 v17 = v40 + ((unsigned __int64)(v3->ptr_38->field_1C * (signed __int64)v10) >> 16); |
843 v18 = v15 / v52; | 843 v18 = v15 / v52; |
844 v43 = v3->pTexture->pLevelOfDetail0; | 844 v43 = v3->pTexture->pLevelOfDetail0_prolly_alpha_mask; |
845 v19 = v3->sTextureDeltaU + ((signed int)((unsigned __int64)(v16 * v15 / v52) >> 16) >> 3); | 845 v19 = v3->sTextureDeltaU + ((signed int)((unsigned __int64)(v16 * v15 / v52) >> 16) >> 3); |
846 v56 = v15 / v52; | 846 v56 = v15 / v52; |
847 v20 = v3->sTextureDeltaV + ((signed int)((unsigned __int64)(v17 * v15 / v52) >> 16) >> 3); | 847 v20 = v3->sTextureDeltaV + ((signed int)((unsigned __int64)(v17 * v15 / v52) >> 16) >> 3); |
848 v21 = (unsigned __int64)(v55 * (signed __int64)v56) >> 16; | 848 v21 = (unsigned __int64)(v55 * (signed __int64)v56) >> 16; |
849 v39 = (signed int)((unsigned __int64)(v21 * (signed __int64)v38) >> 16) >> 3; | 849 v39 = (signed int)((unsigned __int64)(v21 * (signed __int64)v38) >> 16) >> 3; |
9662 unsigned int v24; // [sp+2Ch] [bp+Ch]@32 | 9662 unsigned int v24; // [sp+2Ch] [bp+Ch]@32 |
9663 | 9663 |
9664 if ( this->uNumSceneBegins && a4 && a4->pPalette16 ) | 9664 if ( this->uNumSceneBegins && a4 && a4->pPalette16 ) |
9665 { | 9665 { |
9666 v4 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 9666 v4 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
9667 v20 = a4->pLevelOfDetail0; | 9667 v20 = a4->pLevelOfDetail0_prolly_alpha_mask; |
9668 v5 = a4->uTextureWidth; | 9668 v5 = a4->uTextureWidth; |
9669 v6 = a4->uTextureHeight; | 9669 v6 = a4->uTextureHeight; |
9670 v19 = a4->uTextureWidth; | 9670 v19 = a4->uTextureWidth; |
9671 v18 = a4->uTextureWidth; | 9671 v18 = a4->uTextureWidth; |
9672 if ( this->bClip ) | 9672 if ( this->bClip ) |
10131 { | 10131 { |
10132 if ( pTexture->pPalette16 ) | 10132 if ( pTexture->pPalette16 ) |
10133 { | 10133 { |
10134 v5 = pTexture->uTextureHeight; | 10134 v5 = pTexture->uTextureHeight; |
10135 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 10135 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
10136 v19 = pTexture->pLevelOfDetail0; | 10136 v19 = pTexture->pLevelOfDetail0_prolly_alpha_mask; |
10137 v20 = pTexture->uTextureWidth; | 10137 v20 = pTexture->uTextureWidth; |
10138 v18 = pTexture->uTextureWidth; | 10138 v18 = pTexture->uTextureWidth; |
10139 if ( this->bClip ) | 10139 if ( this->bClip ) |
10140 { | 10140 { |
10141 v7 = this->uClipX; | 10141 v7 = this->uClipX; |
10241 { | 10241 { |
10242 if ( a4->pPalette16 ) | 10242 if ( a4->pPalette16 ) |
10243 { | 10243 { |
10244 v5 = a4->uTextureHeight; | 10244 v5 = a4->uTextureHeight; |
10245 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 10245 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
10246 v19 = a4->pLevelOfDetail0; | 10246 v19 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10247 v20 = a4->uTextureWidth; | 10247 v20 = a4->uTextureWidth; |
10248 v18 = a4->uTextureWidth; | 10248 v18 = a4->uTextureWidth; |
10249 if ( this->bClip ) | 10249 if ( this->bClip ) |
10250 { | 10250 { |
10251 v7 = this->uClipX; | 10251 v7 = this->uClipX; |
10344 int v27; // [sp+2Ch] [bp+14h]@6 | 10344 int v27; // [sp+2Ch] [bp+14h]@6 |
10345 | 10345 |
10346 if ( this->uNumSceneBegins && a4 && a4->pPalette16 && a5 && a5->pPalette16 ) | 10346 if ( this->uNumSceneBegins && a4 && a4->pPalette16 && a5 && a5->pPalette16 ) |
10347 { | 10347 { |
10348 v8 = &this->pTargetSurface[x + y * this->uTargetSurfacePitch]; | 10348 v8 = &this->pTargetSurface[x + y * this->uTargetSurfacePitch]; |
10349 v24 = a4->pLevelOfDetail0; | 10349 v24 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10350 v27 = a4->uTextureWidth; | 10350 v27 = a4->uTextureWidth; |
10351 v9 = a4->uTextureHeight; | 10351 v9 = a4->uTextureHeight; |
10352 v22 = a4->uTextureWidth; | 10352 v22 = a4->uTextureWidth; |
10353 if ( this->bClip ) | 10353 if ( this->bClip ) |
10354 { | 10354 { |
10462 if ( a5 ) | 10462 if ( a5 ) |
10463 { | 10463 { |
10464 if ( a5->pPalette16 ) | 10464 if ( a5->pPalette16 ) |
10465 { | 10465 { |
10466 v10 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 10466 v10 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
10467 v28 = a4->pLevelOfDetail0; | 10467 v28 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10468 v25 = v8->uTextureWidth; | 10468 v25 = v8->uTextureWidth; |
10469 v24 = v8->uTextureHeight; | 10469 v24 = v8->uTextureHeight; |
10470 v22 = v8->uTextureWidth; | 10470 v22 = v8->uTextureWidth; |
10471 if ( this->bClip ) | 10471 if ( this->bClip ) |
10472 { | 10472 { |
10518 { | 10518 { |
10519 for ( i = 0; i < v25; ++v28 ) | 10519 for ( i = 0; i < v25; ++v28 ) |
10520 { | 10520 { |
10521 if ( *v28 ) | 10521 if ( *v28 ) |
10522 { | 10522 { |
10523 v20 = *(&v9->pLevelOfDetail0[i & v9->uWidthMinus1] + v9->uTextureWidth * (v27 & v9->uHeightMinus1)); | 10523 v20 = *(&v9->pLevelOfDetail0_prolly_alpha_mask[i & v9->uWidthMinus1] + v9->uTextureWidth * (v27 & v9->uHeightMinus1)); |
10524 if ( v20 >= a7 ) | 10524 if ( v20 >= a7 ) |
10525 { | 10525 { |
10526 if ( v20 <= a8 ) | 10526 if ( v20 <= a8 ) |
10527 { | 10527 { |
10528 v21 = a7 + (a6 + v20) % (2 * (a8 - a7)); | 10528 v21 = a7 + (a6 + v20) % (2 * (a8 - a7)); |
10581 { | 10581 { |
10582 if ( pTexture->pPalette16 ) | 10582 if ( pTexture->pPalette16 ) |
10583 { | 10583 { |
10584 uHeight = pTexture->uTextureHeight; | 10584 uHeight = pTexture->uTextureHeight; |
10585 v6 = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; | 10585 v6 = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; |
10586 v19 = pTexture->pLevelOfDetail0; | 10586 v19 = pTexture->pLevelOfDetail0_prolly_alpha_mask; |
10587 uWidth = pTexture->uTextureWidth; | 10587 uWidth = pTexture->uTextureWidth; |
10588 v18 = pTexture->uTextureWidth; | 10588 v18 = pTexture->uTextureWidth; |
10589 if ( this->bClip ) | 10589 if ( this->bClip ) |
10590 { | 10590 { |
10591 v7 = this->uClipX; | 10591 v7 = this->uClipX; |
10658 } | 10658 } |
10659 } | 10659 } |
10660 | 10660 |
10661 | 10661 |
10662 //----- (004A612A) -------------------------------------------------------- | 10662 //----- (004A612A) -------------------------------------------------------- |
10663 void Render::_4A612A(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal) | 10663 void Render::DrawMaskToZBuffer(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal) |
10664 { | 10664 { |
10665 Texture *v5; // eax@2 | 10665 Texture *v5; // eax@2 |
10666 unsigned int v6; // edx@3 | 10666 unsigned int v6; // edx@3 |
10667 int v7; // ebx@3 | 10667 int v7; // ebx@3 |
10668 int v8; // edi@3 | 10668 int v8; // edi@3 |
10688 if ( pTexture ) | 10688 if ( pTexture ) |
10689 { | 10689 { |
10690 v6 = uOutY; | 10690 v6 = uOutY; |
10691 v7 = pTexture->uTextureHeight; | 10691 v7 = pTexture->uTextureHeight; |
10692 pZBuffer = &this->pActiveZBuffer[uOutX + 640 * uOutY]; | 10692 pZBuffer = &this->pActiveZBuffer[uOutX + 640 * uOutY]; |
10693 uOutYa = v5->pLevelOfDetail0; | 10693 uOutYa = v5->pLevelOfDetail0_prolly_alpha_mask; |
10694 v8 = v5->uTextureWidth; | 10694 v8 = v5->uTextureWidth; |
10695 v20 = v5->uTextureWidth; | 10695 v20 = v5->uTextureWidth; |
10696 v19 = v5->uTextureWidth; | 10696 v19 = v5->uTextureWidth; |
10697 if ( this->bClip ) | 10697 if ( this->bClip ) |
10698 { | 10698 { |
10877 { | 10877 { |
10878 if ( a4->pPalette16 ) | 10878 if ( a4->pPalette16 ) |
10879 { | 10879 { |
10880 v5 = a4->uTextureHeight; | 10880 v5 = a4->uTextureHeight; |
10881 pTarget = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; | 10881 pTarget = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; |
10882 v19 = a4->pLevelOfDetail0; | 10882 v19 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10883 v20 = a4->uTextureWidth; | 10883 v20 = a4->uTextureWidth; |
10884 v18 = a4->uTextureWidth; | 10884 v18 = a4->uTextureWidth; |
10885 if ( this->bClip ) | 10885 if ( this->bClip ) |
10886 { | 10886 { |
10887 v7 = this->uClipX; | 10887 v7 = this->uClipX; |