comparison Indoor.cpp @ 717:d5473972234d

m
author Ritor1
date Mon, 18 Mar 2013 01:50:50 +0600
parents 0f25d026acfa
children a5ee769b02c6
comparison
equal deleted inserted replaced
716:964323fa0d25 717:d5473972234d
3158 signed int v32; // edi@27 3158 signed int v32; // edi@27
3159 signed __int64 v33; // qtt@27 3159 signed __int64 v33; // qtt@27
3160 //Vec3_short_ *v34; // edx@27 3160 //Vec3_short_ *v34; // edx@27
3161 int v35; // edx@32 3161 int v35; // edx@32
3162 int v37; // edi@38 3162 int v37; // edi@38
3163 int v38; // ebx@40 3163 int pSectorID; // ebx@40
3164 int v39; // eax@41 3164 int v39; // eax@41
3165 BLVFace *v40; // esi@42 3165 BLVFace *pFace; // esi@42
3166 PolygonType v41; // dl@42 3166 PolygonType pPolygonType; // dl@42
3167 int v42; // edx@43 3167 int v42; // edx@43
3168 int v43[50]; // [sp+Ch] [bp-108h]@1 3168 int v43[50]; // [sp+Ch] [bp-108h]@1
3169 //int v44; // [sp+D4h] [bp-40h]@9 3169 //int v44; // [sp+D4h] [bp-40h]@9
3170 //int v45; // [sp+D8h] [bp-3Ch]@14 3170 //int v45; // [sp+D8h] [bp-3Ch]@14
3171 //int v46; // [sp+DCh] [bp-38h]@14 3171 //int v46; // [sp+DCh] [bp-38h]@14
3234 pFace->uPolygonType == POLYGON_InBetweenFloorAndWall) 3234 pFace->uPolygonType == POLYGON_InBetweenFloorAndWall)
3235 { 3235 {
3236 //pVertexIDs = pFace->pVertexIDs; 3236 //pVertexIDs = pFace->pVertexIDs;
3237 //v19 = this->pVertices; 3237 //v19 = this->pVertices;
3238 //v20 = pVertices[pFace->pVertexIDs[0]].y; 3238 //v20 = pVertices[pFace->pVertexIDs[0]].y;
3239 v54 = 0; 3239 v54 = 0;
3240 //v57 = 0; 3240 //v57 = 0;
3241 //v5 = v16->uNumVertices == 0; 3241 //v5 = v16->uNumVertices == 0;
3242 v59 = pVertices[pFace->pVertexIDs[0]].y >= sY; 3242 v59 = pVertices[pFace->pVertexIDs[0]].y >= sY;
3243 3243
3244 //v21 = pFace->pVertexIDs + 1; 3244 //v21 = pFace->pVertexIDs + 1;
3245 for (uint k = 1; k < pFace->uNumVertices; ++k) 3245 for (uint k = 1; k < pFace->uNumVertices; ++k)
3246 { 3246 {
3247 if (v54 >= 2) 3247 if (v54 >= 2)
3295 3295
3296 if (_a59 + pVertices[k - 1].x > sX) 3296 if (_a59 + pVertices[k - 1].x > sX)
3297 ++v54; 3297 ++v54;
3298 } 3298 }
3299 } 3299 }
3300 } 3300 }
3301 } 3301 }
3302 3302
3303 v59 = v50; 3303 v59 = v50;
3304 } 3304 }
3305 3305
3306 if (pFace->uNumVertices) 3306 if (pFace->uNumVertices)
3307 { 3307 {
3308 if (v54 == 1) 3308 if (v54 == 1)
3309 { 3309 {
3310 v35 = v55++; 3310 v35 = v55++;
3311 v43[v35] = uFaceID; 3311 v43[v35] = uFaceID;
3312 } 3312 }
3313 } 3313 }
3314 }
3315 } 3314 }
3316 v4 = v43[0];
3317 } 3315 }
3316 v4 = v43[0];
3317 }
3318 } 3318 }
3319 3319
3320 if ( v55 == 1 ) 3320 if ( v55 == 1 )
3321 return this->pFaces[v4].uSectorID; 3321 return this->pFaces[v4].uSectorID;
3322 v37 = 0; 3322 v37 = 0;
3323 if ( !v55 ) 3323 if ( !v55 )
3324 return 0; 3324 return 0;
3325 v38 = 0; 3325 pSectorID = 0;
3326 v53 = 0xFFFFFFu; 3326 v53 = 0xFFFFFFu;
3327 if ( v55 > 0 ) 3327 if ( v55 > 0 )
3328 { 3328 {
3329 v39 = sY; 3329 v39 = sY;
3330 while ( 1 ) 3330 while ( 1 )
3331 { 3331 {
3332 v40 = &this->pFaces[v43[v37]]; 3332 pFace = &this->pFaces[v43[v37]];
3333 v41 = v40->uPolygonType; 3333 //pPolygonType = pFace->uPolygonType;
3334 if ( v41 == 3 ) 3334 if ( pFace->uPolygonType == POLYGON_Floor )
3335 break; 3335 {
3336 if ( v41 == 4 ) 3336 v42 = this->pVertices[*pFace->pVertexIDs].z;
3337 {
3338 v51 = v40->zCalc1;
3339 v57 = (unsigned __int64)(v51 * (signed __int64)(sX << 16)) >> 16;
3340 v56 = sY << 16;
3341 v51 = v40->zCalc2;
3342 v56 = (unsigned __int64)(v51 * (signed __int64)(sY << 16)) >> 16;
3343 v42 = (v56 + v40->zCalc3 + v57 + 32768) >> 16;
3344 v39 = sZ - v42; 3337 v39 = sZ - v42;
3345 } 3338 //goto LABEL_47;
3346 LABEL_47: 3339 }
3340 if ( pFace->uPolygonType == POLYGON_InBetweenFloorAndWall )
3341 {
3342 //v51 = pFace->zCalc1;
3343 v57 = (unsigned __int64)(pFace->zCalc1 * (signed __int64)(sX << 16)) >> 16;
3344 //v56 = sY << 16;
3345 //v51 = pFace->zCalc2;
3346 v56 = (unsigned __int64)(pFace->zCalc2 * (signed __int64)(sY << 16)) >> 16;
3347 v42 = (v56 + pFace->zCalc3 + v57 + 32768) >> 16;
3348 v39 = sZ - v42;
3349 }
3350 //LABEL_47:
3347 if ( v39 >= 0 ) 3351 if ( v39 >= 0 )
3348 { 3352 {
3349 if ( v39 < v53 ) 3353 if ( v39 < v53 )
3350 { 3354 {
3351 v38 = v40->uSectorID; 3355 pSectorID = pFace->uSectorID;
3352 v53 = v39; 3356 v53 = v39;
3353 } 3357 }
3354 } 3358 }
3355 ++v37; 3359 ++v37;
3356 if ( v37 >= v55 ) 3360 if ( v37 >= v55 )
3357 return v38; 3361 return pSectorID;
3358 } 3362 }
3359 v42 = this->pVertices[*v40->pVertexIDs].z; 3363 }
3360 v39 = sZ - v42; 3364 //return pSectorID;
3361 goto LABEL_47;
3362 }
3363 return v38;
3364 } 3365 }
3365 // 49AC17: using guessed type int var_108[50]; 3366 // 49AC17: using guessed type int var_108[50];
3366 3367
3367 3368
3368 //----- (00498A41) -------------------------------------------------------- 3369 //----- (00498A41) --------------------------------------------------------