Mercurial > mm7
comparison Render.cpp @ 710:735dab8d3c9a
Town portal screen + misc gui const replacements
author | Nomad |
---|---|
date | Thu, 21 Mar 2013 20:30:17 +0200 |
parents | af08fc9e29c8 |
children | 9d13d2ec35a6 da130dd3092a |
comparison
equal
deleted
inserted
replaced
709:af08fc9e29c8 | 710:735dab8d3c9a |
---|---|
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; |
9660 unsigned int v24; // [sp+2Ch] [bp+Ch]@32 | 9660 unsigned int v24; // [sp+2Ch] [bp+Ch]@32 |
9661 | 9661 |
9662 if ( this->uNumSceneBegins && a4 && a4->pPalette16 ) | 9662 if ( this->uNumSceneBegins && a4 && a4->pPalette16 ) |
9663 { | 9663 { |
9664 v4 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 9664 v4 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
9665 v20 = a4->pLevelOfDetail0; | 9665 v20 = a4->pLevelOfDetail0_prolly_alpha_mask; |
9666 v5 = a4->uTextureWidth; | 9666 v5 = a4->uTextureWidth; |
9667 v6 = a4->uTextureHeight; | 9667 v6 = a4->uTextureHeight; |
9668 v19 = a4->uTextureWidth; | 9668 v19 = a4->uTextureWidth; |
9669 v18 = a4->uTextureWidth; | 9669 v18 = a4->uTextureWidth; |
9670 if ( this->bClip ) | 9670 if ( this->bClip ) |
10129 { | 10129 { |
10130 if ( pTexture->pPalette16 ) | 10130 if ( pTexture->pPalette16 ) |
10131 { | 10131 { |
10132 v5 = pTexture->uTextureHeight; | 10132 v5 = pTexture->uTextureHeight; |
10133 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 10133 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
10134 v19 = pTexture->pLevelOfDetail0; | 10134 v19 = pTexture->pLevelOfDetail0_prolly_alpha_mask; |
10135 v20 = pTexture->uTextureWidth; | 10135 v20 = pTexture->uTextureWidth; |
10136 v18 = pTexture->uTextureWidth; | 10136 v18 = pTexture->uTextureWidth; |
10137 if ( this->bClip ) | 10137 if ( this->bClip ) |
10138 { | 10138 { |
10139 v7 = this->uClipX; | 10139 v7 = this->uClipX; |
10239 { | 10239 { |
10240 if ( a4->pPalette16 ) | 10240 if ( a4->pPalette16 ) |
10241 { | 10241 { |
10242 v5 = a4->uTextureHeight; | 10242 v5 = a4->uTextureHeight; |
10243 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 10243 v6 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
10244 v19 = a4->pLevelOfDetail0; | 10244 v19 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10245 v20 = a4->uTextureWidth; | 10245 v20 = a4->uTextureWidth; |
10246 v18 = a4->uTextureWidth; | 10246 v18 = a4->uTextureWidth; |
10247 if ( this->bClip ) | 10247 if ( this->bClip ) |
10248 { | 10248 { |
10249 v7 = this->uClipX; | 10249 v7 = this->uClipX; |
10342 int v27; // [sp+2Ch] [bp+14h]@6 | 10342 int v27; // [sp+2Ch] [bp+14h]@6 |
10343 | 10343 |
10344 if ( this->uNumSceneBegins && a4 && a4->pPalette16 && a5 && a5->pPalette16 ) | 10344 if ( this->uNumSceneBegins && a4 && a4->pPalette16 && a5 && a5->pPalette16 ) |
10345 { | 10345 { |
10346 v8 = &this->pTargetSurface[x + y * this->uTargetSurfacePitch]; | 10346 v8 = &this->pTargetSurface[x + y * this->uTargetSurfacePitch]; |
10347 v24 = a4->pLevelOfDetail0; | 10347 v24 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10348 v27 = a4->uTextureWidth; | 10348 v27 = a4->uTextureWidth; |
10349 v9 = a4->uTextureHeight; | 10349 v9 = a4->uTextureHeight; |
10350 v22 = a4->uTextureWidth; | 10350 v22 = a4->uTextureWidth; |
10351 if ( this->bClip ) | 10351 if ( this->bClip ) |
10352 { | 10352 { |
10460 if ( a5 ) | 10460 if ( a5 ) |
10461 { | 10461 { |
10462 if ( a5->pPalette16 ) | 10462 if ( a5->pPalette16 ) |
10463 { | 10463 { |
10464 v10 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 10464 v10 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; |
10465 v28 = a4->pLevelOfDetail0; | 10465 v28 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10466 v25 = v8->uTextureWidth; | 10466 v25 = v8->uTextureWidth; |
10467 v24 = v8->uTextureHeight; | 10467 v24 = v8->uTextureHeight; |
10468 v22 = v8->uTextureWidth; | 10468 v22 = v8->uTextureWidth; |
10469 if ( this->bClip ) | 10469 if ( this->bClip ) |
10470 { | 10470 { |
10516 { | 10516 { |
10517 for ( i = 0; i < v25; ++v28 ) | 10517 for ( i = 0; i < v25; ++v28 ) |
10518 { | 10518 { |
10519 if ( *v28 ) | 10519 if ( *v28 ) |
10520 { | 10520 { |
10521 v20 = *(&v9->pLevelOfDetail0[i & v9->uWidthMinus1] + v9->uTextureWidth * (v27 & v9->uHeightMinus1)); | 10521 v20 = *(&v9->pLevelOfDetail0_prolly_alpha_mask[i & v9->uWidthMinus1] + v9->uTextureWidth * (v27 & v9->uHeightMinus1)); |
10522 if ( v20 >= a7 ) | 10522 if ( v20 >= a7 ) |
10523 { | 10523 { |
10524 if ( v20 <= a8 ) | 10524 if ( v20 <= a8 ) |
10525 { | 10525 { |
10526 v21 = a7 + (a6 + v20) % (2 * (a8 - a7)); | 10526 v21 = a7 + (a6 + v20) % (2 * (a8 - a7)); |
10579 { | 10579 { |
10580 if ( pTexture->pPalette16 ) | 10580 if ( pTexture->pPalette16 ) |
10581 { | 10581 { |
10582 uHeight = pTexture->uTextureHeight; | 10582 uHeight = pTexture->uTextureHeight; |
10583 v6 = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; | 10583 v6 = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; |
10584 v19 = pTexture->pLevelOfDetail0; | 10584 v19 = pTexture->pLevelOfDetail0_prolly_alpha_mask; |
10585 uWidth = pTexture->uTextureWidth; | 10585 uWidth = pTexture->uTextureWidth; |
10586 v18 = pTexture->uTextureWidth; | 10586 v18 = pTexture->uTextureWidth; |
10587 if ( this->bClip ) | 10587 if ( this->bClip ) |
10588 { | 10588 { |
10589 v7 = this->uClipX; | 10589 v7 = this->uClipX; |
10656 } | 10656 } |
10657 } | 10657 } |
10658 | 10658 |
10659 | 10659 |
10660 //----- (004A612A) -------------------------------------------------------- | 10660 //----- (004A612A) -------------------------------------------------------- |
10661 void Render::_4A612A(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal) | 10661 void Render::DrawMaskToZBuffer(signed int uOutX, unsigned int uOutY, Texture *pTexture, int zVal) |
10662 { | 10662 { |
10663 Texture *v5; // eax@2 | 10663 Texture *v5; // eax@2 |
10664 unsigned int v6; // edx@3 | 10664 unsigned int v6; // edx@3 |
10665 int v7; // ebx@3 | 10665 int v7; // ebx@3 |
10666 int v8; // edi@3 | 10666 int v8; // edi@3 |
10686 if ( pTexture ) | 10686 if ( pTexture ) |
10687 { | 10687 { |
10688 v6 = uOutY; | 10688 v6 = uOutY; |
10689 v7 = pTexture->uTextureHeight; | 10689 v7 = pTexture->uTextureHeight; |
10690 pZBuffer = &this->pActiveZBuffer[uOutX + 640 * uOutY]; | 10690 pZBuffer = &this->pActiveZBuffer[uOutX + 640 * uOutY]; |
10691 uOutYa = v5->pLevelOfDetail0; | 10691 uOutYa = v5->pLevelOfDetail0_prolly_alpha_mask; |
10692 v8 = v5->uTextureWidth; | 10692 v8 = v5->uTextureWidth; |
10693 v20 = v5->uTextureWidth; | 10693 v20 = v5->uTextureWidth; |
10694 v19 = v5->uTextureWidth; | 10694 v19 = v5->uTextureWidth; |
10695 if ( this->bClip ) | 10695 if ( this->bClip ) |
10696 { | 10696 { |
10875 { | 10875 { |
10876 if ( a4->pPalette16 ) | 10876 if ( a4->pPalette16 ) |
10877 { | 10877 { |
10878 v5 = a4->uTextureHeight; | 10878 v5 = a4->uTextureHeight; |
10879 pTarget = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; | 10879 pTarget = &this->pTargetSurface[uX + uY * this->uTargetSurfacePitch]; |
10880 v19 = a4->pLevelOfDetail0; | 10880 v19 = a4->pLevelOfDetail0_prolly_alpha_mask; |
10881 v20 = a4->uTextureWidth; | 10881 v20 = a4->uTextureWidth; |
10882 v18 = a4->uTextureWidth; | 10882 v18 = a4->uTextureWidth; |
10883 if ( this->bClip ) | 10883 if ( this->bClip ) |
10884 { | 10884 { |
10885 v7 = this->uClipX; | 10885 v7 = this->uClipX; |