Mercurial > mm7
comparison mm7_3.cpp @ 315:2a09e1d6fc8f
Some 0041D895 GameUI_DrawItemInfo overhaul
author | Nomad |
---|---|
date | Wed, 20 Feb 2013 01:17:13 +0200 |
parents | cc8e4dc397ec |
children | 922a96fdcc86 |
comparison
equal
deleted
inserted
replaced
306:e33f5a1cdc46 | 315:2a09e1d6fc8f |
---|---|
136 } | 136 } |
137 while ( 1 ) | 137 while ( 1 ) |
138 { | 138 { |
139 v11 = v9->pFloors[v10]; | 139 v11 = v9->pFloors[v10]; |
140 v12 = &pIndoor->pFaces[v11]; | 140 v12 = &pIndoor->pFaces[v11]; |
141 if ( v12->uAttributes & 1 | 141 if ( v12->TwoSided() |
142 || stru_721530.sMaxX > v12->pBounding.x2 | 142 || stru_721530.sMaxX > v12->pBounding.x2 |
143 || stru_721530.sMinX < v12->pBounding.x1 | 143 || stru_721530.sMinX < v12->pBounding.x1 |
144 || stru_721530.sMaxY > v12->pBounding.y2 | 144 || stru_721530.sMaxY > v12->pBounding.y2 |
145 || stru_721530.sMinY < v12->pBounding.y1 | 145 || stru_721530.sMinY < v12->pBounding.y1 |
146 || stru_721530.sMaxZ > v12->pBounding.z2 | 146 || stru_721530.sMaxZ > v12->pBounding.z2 |
2255 LABEL_35: | 2255 LABEL_35: |
2256 LayingItem::_42F933(v10); | 2256 LayingItem::_42F933(v10); |
2257 goto LABEL_36; | 2257 goto LABEL_36; |
2258 } | 2258 } |
2259 v11 = v4->uLifetime; | 2259 v11 = v4->uLifetime; |
2260 if ( item->uAttributes & 2 ) | 2260 if (item->uAttributes & 2) |
2261 v11 = *((short *)v2 + 1); | 2261 v11 = *((short *)v2 + 1); |
2262 if ( v8 < v11 ) | 2262 if ( v8 < v11 ) |
2263 { | 2263 { |
2264 LABEL_22: | 2264 LABEL_22: |
2265 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) | 2265 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) |
4594 || (v5 = (unsigned __int64)(a2->x * (signed __int64)a4->pFacePlane_old.vNormal.x) >> 16, | 4594 || (v5 = (unsigned __int64)(a2->x * (signed __int64)a4->pFacePlane_old.vNormal.x) >> 16, |
4595 a4b = (unsigned __int64)(a2->y * (signed __int64)a4->pFacePlane_old.vNormal.y) >> 16, | 4595 a4b = (unsigned __int64)(a2->y * (signed __int64)a4->pFacePlane_old.vNormal.y) >> 16, |
4596 v6 = (unsigned __int64)(a2->z * (signed __int64)v4->pFacePlane_old.vNormal.z) >> 16, | 4596 v6 = (unsigned __int64)(a2->z * (signed __int64)v4->pFacePlane_old.vNormal.z) >> 16, |
4597 v7 = v5 + v6 + a4b, | 4597 v7 = v5 + v6 + a4b, |
4598 (v16 = v5 + v6 + a4b) == 0) | 4598 (v16 = v5 + v6 + a4b) == 0) |
4599 || v7 > 0 && !(v4->uAttributes & 1) ) | 4599 || v7 > 0 && !v4->TwoSided()) |
4600 return 0; | 4600 return 0; |
4601 v8 = v4->pFacePlane_old.vNormal.z * a1->z; | 4601 v8 = v4->pFacePlane_old.vNormal.z * a1->z; |
4602 v9 = -(v4->pFacePlane_old.dist + v8 + a1->y * v4->pFacePlane_old.vNormal.y + a1->x * v4->pFacePlane_old.vNormal.x); | 4602 v9 = -(v4->pFacePlane_old.dist + v8 + a1->y * v4->pFacePlane_old.vNormal.y + a1->x * v4->pFacePlane_old.vNormal.x); |
4603 if ( v7 <= 0 ) | 4603 if ( v7 <= 0 ) |
4604 { | 4604 { |
4654 v12 = (unsigned __int64)(a8 * (signed __int64)a2->pFacePlane_old.vNormal.z) >> 16, | 4654 v12 = (unsigned __int64)(a8 * (signed __int64)a2->pFacePlane_old.vNormal.z) >> 16, |
4655 v13 = v10 + v12 + v11 == 0, | 4655 v13 = v10 + v12 + v11 == 0, |
4656 v14 = v10 + v12 + v11, | 4656 v14 = v10 + v12 + v11, |
4657 v22 = v10 + v12 + v11, | 4657 v22 = v10 + v12 + v11, |
4658 v13) | 4658 v13) |
4659 || v14 > 0 && !(a2->uAttributes & 1) ) | 4659 || v14 > 0 && !a2->TwoSided()) |
4660 return 0; | 4660 return 0; |
4661 v15 = a4 * a2->pFacePlane_old.vNormal.y; | 4661 v15 = a4 * a2->pFacePlane_old.vNormal.y; |
4662 v16 = -(a2->pFacePlane_old.dist + v15 + a3 * a2->pFacePlane_old.vNormal.x + a5 * a2->pFacePlane_old.vNormal.z); | 4662 v16 = -(a2->pFacePlane_old.dist + v15 + a3 * a2->pFacePlane_old.vNormal.x + a5 * a2->pFacePlane_old.vNormal.z); |
4663 if ( v14 <= 0 ) | 4663 if ( v14 <= 0 ) |
4664 { | 4664 { |
12382 v4 = &pIndoor->pFaces[v2->pFaceIDs[v3->uCoplanarOffset]]; | 12382 v4 = &pIndoor->pFaces[v2->pFaceIDs[v3->uCoplanarOffset]]; |
12383 v5 = v4->pFacePlane_old.dist | 12383 v5 = v4->pFacePlane_old.dist |
12384 + pBLVRenderParams->vPartyPos.x * v4->pFacePlane_old.vNormal.x | 12384 + pBLVRenderParams->vPartyPos.x * v4->pFacePlane_old.vNormal.x |
12385 + pBLVRenderParams->vPartyPos.y * v4->pFacePlane_old.vNormal.y | 12385 + pBLVRenderParams->vPartyPos.y * v4->pFacePlane_old.vNormal.y |
12386 + pBLVRenderParams->vPartyPos.z * v4->pFacePlane_old.vNormal.z; | 12386 + pBLVRenderParams->vPartyPos.z * v4->pFacePlane_old.vNormal.z; |
12387 if ( v4->uAttributes & 1 && v4->uSectorID != v12->uSectorID ) | 12387 if (v4->TwoSided() && v4->uSectorID != v12->uSectorID ) |
12388 v5 = -v5; | 12388 v5 = -v5; |
12389 v11 = v5 > 0; | 12389 v11 = v5 > 0; |
12390 if ( v5 <= 0 ) | 12390 if ( v5 <= 0 ) |
12391 v6 = v3->uFront; | 12391 v6 = v3->uFront; |
12392 else | 12392 else |
13597 v50 = v73; | 13597 v50 = v73; |
13598 } | 13598 } |
13599 else | 13599 else |
13600 v50 = 1; | 13600 v50 = 1; |
13601 } | 13601 } |
13602 pRenderer->_4A6776( | 13602 pRenderer->DrawTransparentRedShade(v47, v49, (Texture *)(pTextureIDs_pMapDirs[v50] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v50]] : 0)); |
13603 v47, | |
13604 v49, | |
13605 (Texture *)(pTextureIDs_pMapDirs[v50] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v50]] : 0)); | |
13606 } | 13603 } |
13607 result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 13604 result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
13608 v95 = 0; | 13605 v95 = 0; |
13609 v86 = result; | 13606 v86 = result; |
13610 if ( (signed int)uNumLevelDecorations > 0 ) | 13607 if ( (signed int)uNumLevelDecorations > 0 ) |