Mercurial > mm7
diff mm7_3.cpp @ 577:7e8f5124056c
m
author | Ritor1 |
---|---|
date | Tue, 05 Mar 2013 10:45:29 +0600 |
parents | 214d9d47cf1f |
children | fdea951756f9 |
line wrap: on
line diff
--- a/mm7_3.cpp Mon Mar 04 09:22:38 2013 +0600 +++ b/mm7_3.cpp Tue Mar 05 10:45:29 2013 +0600 @@ -6170,42 +6170,33 @@ for (int i = 0; i < _this.uNumVertices; ++i) { - v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f); - v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536; - v8 = v39 + _this.ptr_38->field_C; - - v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536; - v36 = v39 + _this.ptr_38->field_18; - - v9 = (unsigned __int64)(_this.v_18.z * v33 * (v30 - v29)) / 65536; - v10 = _this.v_18.x + v9; - v39 = _this.v_18.x + v9; - if ( _this.v_18.x + v9 > 0 ) - { - v10 = 0; - v39 = 0; - } - v11 = (signed __int64)array_50AC10[i].vWorldViewProjX; - v38 = v10; - v12 = array_50AC10[i].vWorldViewProjY - 1.0; - v13 = v33 * (pViewport->uScreenCenterX - v11); - v34 = -_this.field_24; - v32 = (signed __int64)v12; - v14 = v33 * (v30 - v32); - while ( 1 ) - { - v40 = v14; - if ( !v10 ) - goto LABEL_12; - v37 = abs(v34 >> 14); - v15 = abs(v10); - if ( v37 <= v15 || v32 <= pViewport->uViewportY ) - { - if ( v39 <= 0 ) - break; - } - v14 = v40; -LABEL_12: + v29 = floorf(array_50AC10[i].vWorldViewProjY + 0.5f); + v39 = (unsigned __int64)(_this.ptr_38->field_14 * v33 * (v30 - v29)) / 65536; + v8 = v39 + _this.ptr_38->field_C; + + v39 = (unsigned __int64)(_this.ptr_38->field_20 * v33 * (v30 - v29)) / 65536; + v36 = v39 + _this.ptr_38->field_18; + + v9 = (unsigned __int64)(_this.v_18.z * v33 * (v30 - v29)) / 65536; + v10 = _this.v_18.x + v9; + v39 = _this.v_18.x + v9; + if ( _this.v_18.x + v9 > 0 ) + { + v10 = 0; + v39 = 0; + } + v11 = (signed __int64)array_50AC10[i].vWorldViewProjX; + v38 = v10; + v12 = array_50AC10[i].vWorldViewProjY - 1.0; + v13 = v33 * (pViewport->uScreenCenterX - v11); + v34 = -_this.field_24; + v32 = (signed __int64)v12; + v14 = v33 * (v30 - v32); + while ( 1 ) + { + //v40 = v14; + if ( !v10 ) + { v37 = _this.v_18.z; v16 = (unsigned __int64)(_this.v_18.z * (signed __int64)v14) >> 16; --v32; @@ -6215,47 +6206,66 @@ v38 = _this.v_18.x + v16; break; } - LODWORD(v17) = v34 << 16; - HIDWORD(v17) = v34 >> 16; - v18 = v17 / v38; - if ( v18 < 0 ) - v18 = pOutdoorCamera->shading_dist_mist; - - v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16); - v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16); - v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v37 * v18) >> 16) / 8; - v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v36 * v18) >> 16) / 8; - - array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; - array_50AC10[i]._rhw = 1.0 / (double)(v17 / 65536); - array_50AC10[i].u = (double)v35 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth); - array_50AC10[i].v = (double)v36 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth); - } - - float t = (GetTickCount() % 96000) / 96000.0f; - - array_50AC10[0].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; - array_50AC10[0]._rhw = 1; - array_50AC10[0].u = 0; - array_50AC10[0].v = 0 + t; - - array_50AC10[1].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; - array_50AC10[1]._rhw = 1; - array_50AC10[1].u = 0; - array_50AC10[1].v = 1 + t; - - array_50AC10[2].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; - array_50AC10[2]._rhw = 1; - array_50AC10[2].u = 1; - array_50AC10[2].v = 0 + t; - - array_50AC10[3].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; - array_50AC10[3]._rhw = 1; - array_50AC10[3].u = 1; - array_50AC10[3].v = 1 + t; - pRenderer->DrawStrip(_this.uNumVertices, &_this, - pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]); - return; + v37 = abs(v34 >> 14); + v15 = abs(v10); + if ( v37 <= v15 || v32 <= pViewport->uViewportY ) + { + if ( v39 <= 0 ) + break; + } + //v14 = v40; + v37 = _this.v_18.z; + v16 = (unsigned __int64)(_this.v_18.z * v14) >> 16; + --v32; + v14 += v33; + v10 = _this.v_18.x + v16; + v39 = _this.v_18.x + v16; + v38 = _this.v_18.x + v16; + break; + } + LODWORD(v17) = v34 << 16; + HIDWORD(v17) = v34 >> 16; + v18 = v17 / v38; + if ( v18 < 0 ) + v18 = pOutdoorCamera->shading_dist_mist; + + v37 += ((unsigned __int64)(_this.ptr_38->field_10 * v13) >> 16); + v36 += ((unsigned __int64)(_this.ptr_38->field_1C * v13) >> 16); + v35 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v37 * v18) >> 16) / 8; + v36 = 224 * pMiscTimer->uTotalGameTimeElapsed + (signed int)((unsigned __int64)(v36 * v18) >> 16) / 8; + + array_50AC10[i].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; + array_50AC10[i]._rhw = 1; + //array_50AC10[i].u = (double)v35 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth); + //array_50AC10[i].v = (double)v36 / (65536.0 * pBitmaps_LOD->pTextures[pOutdoor->uSky_TextureID].uTextureWidth); + } + if ( _this.uNumVertices > 0) + { + float t = (GetTickCount() % 96000) / 96000.0f; + + //array_50AC10[0].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; + //array_50AC10[0]._rhw = 1; + array_50AC10[0].u = 0; + array_50AC10[0].v = 0 + t; + + //array_50AC10[1].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; + //array_50AC10[1]._rhw = 1; + array_50AC10[1].u = 0; + array_50AC10[1].v = 1 + t; + + //array_50AC10[2].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; + //array_50AC10[2]._rhw = 1; + array_50AC10[2].u = 1; + array_50AC10[2].v = 0 + t; + + //array_50AC10[3].vWorldViewPosition.x = pOutdoorCamera->shading_dist_mist; + //array_50AC10[3]._rhw = 1; + array_50AC10[3].u = 1; + array_50AC10[3].v = 1 + t; + pRenderer->DrawStrip(_this.uNumVertices, &_this, pBitmaps_LOD->pHardwareTextures[_this.uTileBitmapID]); + return; + //} + } }