comparison Indoor.cpp @ 1438:bc99e1a48bea

m
author Ritor1
date Mon, 22 Jul 2013 18:00:34 +0600
parents 22cb507446a4
children 468f434a8d8a
comparison
equal deleted inserted replaced
1437:47975067d6a8 1438:bc99e1a48bea
7175 //signed int v7; // edi@5 7175 //signed int v7; // edi@5
7176 //signed int bFound; // eax@5 7176 //signed int bFound; // eax@5
7177 //signed int v9; // ecx@10 7177 //signed int v9; // ecx@10
7178 //int v10; // eax@10 7178 //int v10; // eax@10
7179 //int v11; // edx@11 7179 //int v11; // edx@11
7180 int v12; // ST28_4@12 7180 int t;
7181 signed int v13; // edx@12 7181 //signed int v13; // edx@12
7182 signed __int64 v14; // qtt@12 7182 //signed __int64 v14; // qtt@12
7183 char *v15; // ebx@12 7183 //char *v15; // ebx@12
7184 int v16; // ST28_4@14 7184 //int v16; // ST28_4@14
7185 signed int v17; // eax@14 7185 //signed int v17; // eax@14
7186 signed __int64 v18; // qtt@14 7186 //signed __int64 v18; // qtt@14
7187 signed int v19; // edx@15 7187 signed int v19; // edx@15
7188 signed int v20; // edx@17 7188 signed int v20; // edx@17
7189 signed int v21; // ebx@19 7189 signed int v21; // ebx@19
7190 signed int v22; // esi@20 7190 signed int v22; // esi@20
7191 int v23; // edi@21 7191 int v23; // edi@21
7321 //v10 = stru_50B700._view_transformed_xs[v86 + 3]; 7321 //v10 = stru_50B700._view_transformed_xs[v86 + 3];
7322 next_vertices_flag = stru_50B700._view_transformed_xs[i + 3] >= 524288; 7322 next_vertices_flag = stru_50B700._view_transformed_xs[i + 3] >= 524288;
7323 if ( current_vertices_flag ^ next_vertices_flag ) 7323 if ( current_vertices_flag ^ next_vertices_flag )
7324 { 7324 {
7325 //v11 = stru_50B700._view_transformed_xs[i + 2]; 7325 //v11 = stru_50B700._view_transformed_xs[i + 2];
7326 if ( stru_50B700._view_transformed_xs[i + 3] >= 524288 ) 7326 if ( next_vertices_flag )
7327 { 7327 {
7328 v12 = stru_50B700._view_transformed_xs[i + 3] - stru_50B700._view_transformed_xs[i + 2]; 7328 //t = near_clip - v0.z/v1.z - v0.z
7329 v13 = 524288 - stru_50B700._view_transformed_xs[i + 2]; 7329 // near_clip = 8.0(524288)
7330 LODWORD(v14) = v13 << 16; 7330 t = 524288 - stru_50B700._view_transformed_xs[i + 2] / stru_50B700._view_transformed_xs[i + 3] - stru_50B700._view_transformed_xs[i + 2];
7331 HIDWORD(v14) = v13 >> 16; 7331 // new_x = (v1.x - v0.x) * t + v0.x
7332 v15 = (char *)&stru_50B700._view_transformed_ys[i + 2]; 7332 stru_50B700._view_transformed_zs[depth_num_vertices] = (unsigned __int64)(stru_50B700._view_transformed_zs[i + 3]
7333 stru_50B700._view_transformed_zs[depth_num_vertices] = ((unsigned __int64)((stru_50B700._view_transformed_zs[i + 3] 7333 - stru_50B700._view_transformed_zs[i + 2]) * t + stru_50B700._view_transformed_zs[i + 2];
7334 - stru_50B700._view_transformed_zs[i + 2]) 7334 //new_y = (v1.y - v0.y)*t + v0.y
7335 * v14 7335 stru_50B700._view_transformed_ys[depth_num_vertices] = (unsigned __int64)(stru_50B700._view_transformed_ys[i + 3] - stru_50B700._view_transformed_ys[i + 2])
7336 / v12) >> 16) 7336 * t + stru_50B700._view_transformed_ys[i + 2];
7337 + stru_50B700._view_transformed_zs[i + 2]; 7337 stru_50B700._view_transformed_xs[depth_num_vertices] = 524288;
7338 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[i + 3] - stru_50B700._view_transformed_ys[i + 2])
7339 * v14
7340 / v12) >> 16;
7341 } 7338 }
7342 else 7339 else
7343 { 7340 {
7344 v16 = stru_50B700._view_transformed_xs[i + 2] - stru_50B700._view_transformed_xs[i + 3]; 7341 //t = near_clip - v1.z/v0.z - v1.z
7345 v17 = 524288 - stru_50B700._view_transformed_xs[i + 3]; 7342 t = 524288 - stru_50B700._view_transformed_xs[i + 3] / stru_50B700._view_transformed_xs[i + 2] - stru_50B700._view_transformed_xs[i + 3];
7346 LODWORD(v18) = v17 << 16; 7343 // new_x = (v0.x - v1.x) * t + v1.x
7347 HIDWORD(v18) = v17 >> 16; 7344 stru_50B700._view_transformed_zs[depth_num_vertices] = (unsigned __int64)(stru_50B700._view_transformed_zs[i + 2]
7348 v15 = (char *)&stru_50B700._view_transformed_ys[i + 3]; 7345 - stru_50B700._view_transformed_zs[i + 3]) * t + stru_50B700._view_transformed_zs[i + 3];
7349 stru_50B700._view_transformed_zs[depth_num_vertices] = ((unsigned __int64)((stru_50B700._view_transformed_zs[i + 2] 7346 //new_y = (v0.y - v1.y)*t + v1.y
7350 - stru_50B700._view_transformed_zs[i + 3]) 7347 stru_50B700._view_transformed_ys[depth_num_vertices] = (unsigned __int64)(stru_50B700._view_transformed_ys[i + 2] - stru_50B700._view_transformed_ys[i + 3])
7351 * v18 7348 * t + stru_50B700._view_transformed_ys[i + 3];
7352 / v16) >> 16) 7349 stru_50B700._view_transformed_xs[depth_num_vertices] = 524288;
7353 + stru_50B700._view_transformed_zs[i + 3];
7354 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[i + 2] - stru_50B700._view_transformed_ys[i + 3])
7355 * v18
7356 / v16) >> 16;
7357 } 7350 }
7358 v19 = depth_num_vertices++; 7351 v19 = depth_num_vertices++;
7359 //v7 = pFace->uNumVertices; 7352 //v7 = pFace->uNumVertices;
7360 stru_50B700._view_transformed_ys[v19] = thisb + *(_DWORD *)v15; 7353 //stru_50B700._view_transformed_ys[v19] = thisb + *(_DWORD *)v15;
7361 stru_50B700._view_transformed_xs[v19] = 524288; 7354 //stru_50B700._view_transformed_xs[v19] = 524288;
7362 } 7355 }
7363 if ( next_vertices_flag ) 7356 if ( next_vertices_flag )
7364 { 7357 {
7365 v20 = depth_num_vertices++; 7358 v20 = depth_num_vertices++;
7366 stru_50B700._view_transformed_xs[v20] = stru_50B700._view_transformed_xs[i + 3]; 7359 stru_50B700._view_transformed_xs[v20] = stru_50B700._view_transformed_xs[i + 3];
7369 } 7362 }
7370 current_vertices_flag = next_vertices_flag; 7363 current_vertices_flag = next_vertices_flag;
7371 } 7364 }
7372 } 7365 }
7373 7366
7374 v87 = 0; 7367
7375 v21 = depth_num_vertices; 7368 v21 = depth_num_vertices;
7376 stru_50B700._view_transformed_xs[depth_num_vertices] = stru_50B700._view_transformed_xs[0]; 7369 stru_50B700._view_transformed_xs[depth_num_vertices] = stru_50B700._view_transformed_xs[0];
7377 stru_50B700._view_transformed_zs[depth_num_vertices] = stru_50B700._view_transformed_zs[0]; 7370 stru_50B700._view_transformed_zs[depth_num_vertices] = stru_50B700._view_transformed_zs[0];
7378 for ( stru_50B700._view_transformed_ys[depth_num_vertices] = stru_50B700._view_transformed_ys[0]; 7371 stru_50B700._view_transformed_ys[depth_num_vertices] = stru_50B700._view_transformed_ys[0];
7379 v87 < depth_num_vertices; 7372 for ( v87 = 0; v87 < depth_num_vertices; ++v87 )
7380 stru_50B700._screen_space_y[v22 + 12] = pBLVRenderParams->uViewportCenterY - v35 )
7381 { 7373 {
7382 v22 = v87; 7374 v22 = v87;
7383 thisc = abs(stru_50B700._view_transformed_xs[v87]); 7375 thisc = abs(stru_50B700._view_transformed_xs[v87]);
7384 if ( abs(stru_50B700._view_transformed_zs[v87]) >> 13 <= thisc ) 7376 if ( (abs(stru_50B700._view_transformed_zs[v87]) >> 13) <= thisc )
7385 { 7377 {
7386 v27 = stru_50B700._view_transformed_zs[v22]; 7378 v27 = stru_50B700._view_transformed_zs[v22];
7387 LODWORD(v28) = v27 << 16; 7379 LODWORD(v28) = v27 << 16;
7388 HIDWORD(v28) = v27 >> 16; 7380 HIDWORD(v28) = v27 >> 16;
7389 v26 = v28 / stru_50B700._view_transformed_xs[v22]; 7381 v26 = v28 / stru_50B700._view_transformed_xs[v22];
7414 } 7406 }
7415 } 7407 }
7416 7408
7417 v29 = stru_50B700._view_transformed_ys[v22]; 7409 v29 = stru_50B700._view_transformed_ys[v22];
7418 stru_50B700._screen_space_x[v22 + 12] = v26; 7410 stru_50B700._screen_space_x[v22 + 12] = v26;
7419 if ( abs(v29) >> 13 <= thisc ) 7411 if ( (abs(v29) >> 13) <= thisc )
7420 { 7412 {
7421 v33 = stru_50B700._view_transformed_ys[v22]; 7413 v33 = stru_50B700._view_transformed_ys[v22];
7422 LODWORD(v34) = v33 << 16; 7414 LODWORD(v34) = v33 << 16;
7423 HIDWORD(v34) = v33 >> 16; 7415 HIDWORD(v34) = v33 >> 16;
7424 v32 = v34 / stru_50B700._view_transformed_xs[v22]; 7416 v32 = v34 / stru_50B700._view_transformed_xs[v22];
7449 stru_50B700._screen_space_y[v22 + 12] = v32; 7441 stru_50B700._screen_space_y[v22 + 12] = v32;
7450 stru_50B700._screen_space_x[v22 + 12] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) 7442 stru_50B700._screen_space_x[v22 + 12] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40)
7451 * (signed __int64)stru_50B700._screen_space_x[v22 + 12]) >> 16; 7443 * (signed __int64)stru_50B700._screen_space_x[v22 + 12]) >> 16;
7452 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)stru_50B700._screen_space_y[v22 + 12]) >> 16; 7444 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)stru_50B700._screen_space_y[v22 + 12]) >> 16;
7453 stru_50B700._screen_space_x[v22 + 12] = pBLVRenderParams->uViewportCenterX - stru_50B700._screen_space_x[v22 + 12]; 7445 stru_50B700._screen_space_x[v22 + 12] = pBLVRenderParams->uViewportCenterX - stru_50B700._screen_space_x[v22 + 12];
7454 ++v87; 7446 stru_50B700._screen_space_y[v22 + 12] = pBLVRenderParams->uViewportCenterY - v35;
7447 //++v87;
7455 } 7448 }
7456 v36 = 0; 7449 v36 = 0;
7457 stru_50B700._screen_space_x[v21 + 12] = stru_50B700._screen_space_x[12]; 7450 stru_50B700._screen_space_x[v21 + 12] = stru_50B700._screen_space_x[12];
7458 stru_50B700._screen_space_y[v21 + 12] = stru_50B700._screen_space_y[12]; 7451 stru_50B700._screen_space_y[v21 + 12] = stru_50B700._screen_space_y[12];
7459 v37 = pBLVRenderParams->uViewportX; 7452 v37 = pBLVRenderParams->uViewportX;