Mercurial > mm7
diff mm7_3.cpp @ 2206:15a327be07e2
DrawSpriteObjects_ODM() cleaned
author | Ritor1 |
---|---|
date | Thu, 06 Feb 2014 00:38:03 +0600 |
parents | db94443ea4e7 |
children | ff8920a40c21 |
line wrap: on
line diff
--- a/mm7_3.cpp Wed Feb 05 17:24:38 2014 +0600 +++ b/mm7_3.cpp Thu Feb 06 00:38:03 2014 +0600 @@ -1565,7 +1565,7 @@ int stru6_stru1_indoor_sw_billboard::_4775ED(float a2) { char *v2; // edi@1 - int v3; // eax@1 + //int v3; // eax@1 char *v4; // edx@2 char *v5; // esi@3 double v6; // st7@6 @@ -1613,22 +1613,23 @@ v2 += 4; *(int *)v2 = this->field_64[2]; *((int *)v2 + 1) = this->field_64[3]; - v3 = this->uNumVertices; + //v3 = this->uNumVertices; v35 = this; - if ( v3 > 0 ) + if ( this->uNumVertices > 0 ) { v40 = &this->field_64[20]; v4 = (char *)&this->field_64[3] + 3; - v34 = v3; - while ( 1 ) + + //while ( 1 ) + for ( v34 = this->uNumVertices; v34; --v34 ) { v5 = v4 - 15; if ( *(float *)(v4 - 15) <= (double)a2 && *(float *)(v4 + 1) <= (double)a2 ) { v4 += 16; - --v34; - if ( !v34 ) - return this->uNumVertices = v38; + //--v34; + //if ( !v34 ) + //return this->uNumVertices = v38; continue; } if ( *(float *)v5 <= (double)a2 ) @@ -1701,9 +1702,9 @@ *v27 = *(int *)v28; v27[1] = *(int *)(v28 + 4); v4 += 16; - --v34; - if ( !v34 ) - return this->uNumVertices = v38; + //--v34; + //if ( !v34 ) + //return this->uNumVertices = v38; } } return this->uNumVertices = v38; @@ -2141,7 +2142,7 @@ stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationX); v17 = v3 * stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationY) + v4 * stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationY); if (pGame->pIndoorCameraD3D->sRotationX) - v17 = (unsigned __int64)(v17 * (signed __int64)stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationX)) >> 16; + v17 = fixpoint_mul(v17, stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationX)); v19 = v4 * stru_5C6E00->Cos(pGame->pIndoorCameraD3D->sRotationY) - v3 * stru_5C6E00->Sin(pGame->pIndoorCameraD3D->sRotationY); v9 = int_get_vector_length(abs(v3), abs(v4), 0); //v10 = v14 * 188; @@ -2150,9 +2151,9 @@ if ( v9 < pOutdoor->pBModels[uModelID].sBoundingRadius + 256 ) *reachable = true; if ( v19 >= 0 ) - v11 = ((unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)v17) >> 16) - ((unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)v19) >> 16); + v11 = fixpoint_mul(stru_5C6E00->Sin(angle), v17) - fixpoint_mul(stru_5C6E00->Cos(angle), v19); else - v11 = ((unsigned __int64)(stru_5C6E00->Cos(angle) * (signed __int64)v19) >> 16) + ((unsigned __int64)(stru_5C6E00->Sin(angle) * (signed __int64)v17) >> 16); + v11 = fixpoint_mul(stru_5C6E00->Cos(angle), v19) + fixpoint_mul(stru_5C6E00->Sin(angle), v17); v12 = v11 >> 16; if ( v9 <= pODMRenderParams->shading_dist_mist + 2048 ) {