Mercurial > mm7
changeset 577:7e8f5124056c
m
author | Ritor1 |
---|---|
date | Tue, 05 Mar 2013 10:45:29 +0600 |
parents | 1bd8758f50b8 |
children | fdea951756f9 |
files | MM7.vcxproj.filters Render.cpp mm7_3.cpp |
diffstat | 3 files changed, 88 insertions(+), 81 deletions(-) [+] |
line wrap: on
line diff
--- a/MM7.vcxproj.filters Mon Mar 04 09:22:38 2013 +0600 +++ b/MM7.vcxproj.filters Tue Mar 05 10:45:29 2013 +0600 @@ -149,7 +149,6 @@ <ClInclude Include="stru314.h" /> <ClInclude Include="SaveLoad.h" /> <ClInclude Include="stru287.h" /> - <ClInclude Include="stru179.h" /> <ClInclude Include="Awards.h" /> <ClInclude Include="Autonotes.h" /> <ClInclude Include="stru160.h" /> @@ -201,7 +200,6 @@ <ClInclude Include="resource.h" /> <ClInclude Include="stru346.h" /> <ClInclude Include="texts.h" /> - <ClInclude Include="SpriteObject.h" /> </ItemGroup> <ItemGroup> <Filter Include="lib">
--- a/Render.cpp Mon Mar 04 09:22:38 2013 +0600 +++ b/Render.cpp Tue Mar 05 10:45:29 2013 +0600 @@ -1744,8 +1744,7 @@ v63 = 0; // basic optimizations - unsigned int uStartX, uEndX, - uStartZ, uEndZ; + unsigned int uStartX, uEndX, uStartZ, uEndZ; if (pIndoorCamera->sRotationY >= 0 && pIndoorCamera->sRotationY <= 1024) { uStartX = 0, uEndX = 128;
--- 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; + //} + } }