comparison Indoor.cpp @ 1301:18665b8f66b2

yellow points remove
author Ritor1
date Mon, 24 Jun 2013 13:47:13 +0600
parents 5450af4f57ef
children ad903bb5b702
comparison
equal deleted inserted replaced
1300:bedc304ab617 1301:18665b8f66b2
1302 nodes[num_nodes].viewing_portal_id = -1; 1302 nodes[num_nodes].viewing_portal_id = -1;
1303 //v39 = &pIndoor->pFaces[uFaceID]; 1303 //v39 = &pIndoor->pFaces[uFaceID];
1304 1304
1305 auto pFace = &pIndoor->pFaces[uFaceID]; 1305 auto pFace = &pIndoor->pFaces[uFaceID];
1306 auto p = &nodes[node_id]; 1306 auto p = &nodes[node_id];
1307 1307 for (int i = 0; i < pIndoor->uNumFaces; ++i)
1308 {
1309 if (pIndoor->pFaces[i].Portal())
1310 {
1311 if ( pIndoor->pFaces[i].uSectorID == nodes[0].uSectorID )
1312 {
1313 Log::Warning(L"portal id = %u", i);
1314 //pIndoor->pFaces[i].uBitmapID = 9;
1315 }
1316 }
1317 }
1308 if (!pFace->Portal()) 1318 if (!pFace->Portal())
1309 { 1319 {
1310 if (num_faces < 1000) 1320 if (num_faces < 1000)
1311 { 1321 {
1312 faces[num_faces].uFaceID = uFaceID; 1322 faces[num_faces].uFaceID = uFaceID;
7178 } 7188 }
7179 //----- (00423B5D) -------------------------------------------------------- 7189 //----- (00423B5D) --------------------------------------------------------
7180 int __fastcall sub_423B5D(unsigned int uFaceID) 7190 int __fastcall sub_423B5D(unsigned int uFaceID)
7181 { 7191 {
7182 BLVFace *pFace; // ebx@1 7192 BLVFace *pFace; // ebx@1
7183 Vec3_short_ *v2; // esi@1 7193 //Vec3_short_ *v2; // esi@1
7184 //int v3; // ST28_4@1 7194 //int v3; // ST28_4@1
7185 //__int16 v4; // ST2C_2@1 7195 //__int16 v4; // ST2C_2@1
7186 signed int v5; // esi@1 7196 //signed int v5; // esi@1
7187 //Vec3_short_ *v6; // eax@4 7197 //Vec3_short_ *v6; // eax@4
7188 signed int v7; // edi@5 7198 //signed int v7; // edi@5
7189 signed int v8; // eax@5 7199 //signed int bFound; // eax@5
7190 signed int v9; // ecx@10 7200 //signed int v9; // ecx@10
7191 int v10; // eax@10 7201 //int v10; // eax@10
7192 int v11; // edx@11 7202 //int v11; // edx@11
7193 int v12; // ST28_4@12 7203 int v12; // ST28_4@12
7194 signed int v13; // edx@12 7204 signed int v13; // edx@12
7195 signed __int64 v14; // qtt@12 7205 signed __int64 v14; // qtt@12
7196 char *v15; // ebx@12 7206 char *v15; // ebx@12
7197 int v16; // ST28_4@14 7207 int v16; // ST28_4@14
7241 char v61; // zf@72 7251 char v61; // zf@72
7242 signed int v62; // edx@75 7252 signed int v62; // edx@75
7243 int v63; // ecx@76 7253 int v63; // ecx@76
7244 int v64; // esi@76 7254 int v64; // esi@76
7245 int v65; // ecx@83 7255 int v65; // ecx@83
7246 signed int v66; // [sp+14h] [bp-14h]@3 7256 //signed int v66; // [sp+14h] [bp-14h]@3
7247 int v67; // [sp+14h] [bp-14h]@34 7257 int v67; // [sp+14h] [bp-14h]@34
7248 int v68; // [sp+14h] [bp-14h]@44 7258 int v68; // [sp+14h] [bp-14h]@44
7249 int v69; // [sp+14h] [bp-14h]@54 7259 int v69; // [sp+14h] [bp-14h]@54
7250 int v70; // [sp+14h] [bp-14h]@64 7260 int v70; // [sp+14h] [bp-14h]@64
7251 signed int v71; // [sp+14h] [bp-14h]@75 7261 signed int v71; // [sp+14h] [bp-14h]@75
7252 IndoorCameraD3D *_this; // [sp+18h] [bp-10h]@1 7262 //IndoorCameraD3D *_this; // [sp+18h] [bp-10h]@1
7253 bool thisa; // [sp+18h] [bp-10h]@9 7263 bool current_vertices_flag; // [sp+18h] [bp-10h]@9
7254 int thisb; // [sp+18h] [bp-10h]@12 7264 int thisb; // [sp+18h] [bp-10h]@12
7255 int thisc; // [sp+18h] [bp-10h]@20 7265 int thisc; // [sp+18h] [bp-10h]@20
7256 bool thisd; // [sp+18h] [bp-10h]@41 7266 bool thisd; // [sp+18h] [bp-10h]@41
7257 bool thise; // [sp+18h] [bp-10h]@61 7267 bool thise; // [sp+18h] [bp-10h]@61
7258 int thisf; // [sp+18h] [bp-10h]@74 7268 int thisf; // [sp+18h] [bp-10h]@74
7259 signed int v79; // [sp+1Ch] [bp-Ch]@9 7269 signed int depth_num_vertices; // [sp+1Ch] [bp-Ch]@9
7260 int v80; // [sp+1Ch] [bp-Ch]@76 7270 int v80; // [sp+1Ch] [bp-Ch]@76
7261 bool v81; // [sp+20h] [bp-8h]@10 7271 bool next_vertices_flag; // [sp+20h] [bp-8h]@10
7262 bool v82; // [sp+20h] [bp-8h]@32 7272 bool v82; // [sp+20h] [bp-8h]@32
7263 bool v83; // [sp+20h] [bp-8h]@42 7273 bool v83; // [sp+20h] [bp-8h]@42
7264 bool v84; // [sp+20h] [bp-8h]@52 7274 bool v84; // [sp+20h] [bp-8h]@52
7265 bool v85; // [sp+20h] [bp-8h]@62 7275 bool v85; // [sp+20h] [bp-8h]@62
7266 signed int v86; // [sp+24h] [bp-4h]@9 7276 //signed int v86; // [sp+24h] [bp-4h]@9
7267 signed int v87; // [sp+24h] [bp-4h]@19 7277 signed int v87; // [sp+24h] [bp-4h]@19
7268 signed int v88; // [sp+24h] [bp-4h]@31 7278 signed int v88; // [sp+24h] [bp-4h]@31
7269 signed int v89; // [sp+24h] [bp-4h]@41 7279 signed int v89; // [sp+24h] [bp-4h]@41
7270 signed int v90; // [sp+24h] [bp-4h]@51 7280 signed int v90; // [sp+24h] [bp-4h]@51
7271 signed int v91; // [sp+24h] [bp-4h]@61 7281 signed int v91; // [sp+24h] [bp-4h]@61
7272 7282
7273 pFace = &pIndoor->pFaces[uFaceID]; 7283 pFace = &pIndoor->pFaces[uFaceID];
7274 _this = pGame->pIndoorCameraD3D; 7284 memset(&stru_50B700, 0, sizeof(stru367));
7275 v2 = &pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]]; 7285 //_this = pGame->pIndoorCameraD3D;
7286 //v2 = &pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]];
7276 //v3 = *(_DWORD *)pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].x; 7287 //v3 = *(_DWORD *)pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].x;
7277 //v4 = pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].z; 7288 //v4 = pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].z;
7278 v5 = 0; 7289 //v5 = 0;
7279 if ( pFace->pFacePlane_old.vNormal.x * (pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].x - pBLVRenderParams->vPartyPos.x) 7290 if ( pFace->pFacePlane_old.vNormal.x * (pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].x - pBLVRenderParams->vPartyPos.x)
7280 + pFace->pFacePlane_old.vNormal.y * (pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].y - pBLVRenderParams->vPartyPos.y) 7291 + pFace->pFacePlane_old.vNormal.y * (pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].y - pBLVRenderParams->vPartyPos.y)
7281 + pFace->pFacePlane_old.vNormal.z * (pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].z - pBLVRenderParams->vPartyPos.z) < 0 ) 7292 + pFace->pFacePlane_old.vNormal.z * (pIndoor->pVertices[pIndoor->pFaces[uFaceID].pVertexIDs[0]].z - pBLVRenderParams->vPartyPos.z) < 0 )
7282 { 7293 {
7283 stru_50B700.field_0 = 1; 7294 stru_50B700.field_0 = 1;
7284 } 7295 }
7285 else 7296 else
7286 { 7297 {
7287 stru_50B700.field_0 = 0; 7298 stru_50B700.field_0 = 0;
7288 if ( !(pFace->uAttributes & 1) ) 7299 if ( !(pFace->Portal()) )
7289 return 0; 7300 return 0;
7290 } 7301 }
7291 v66 = pFace->uNumVertices; 7302 //v66 = pFace->uNumVertices;
7292 if ( (signed int)pFace->uNumVertices > 0 ) 7303 if ( (signed int)pFace->uNumVertices > 0 )
7293 { 7304 {
7294 do 7305 for (uint i = 0; i < pFace->uNumVertices; ++i)
7295 { 7306 {
7296 //v6 = &pIndoor->pVertices[pFace->pVertexIDs[v5]]; 7307 //v6 = &pIndoor->pVertices[pFace->pVertexIDs[v5]];
7297 pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible( 7308 pGame->pIndoorCameraD3D->ApplyViewTransform_TrueIfStillVisible(
7298 pIndoor->pVertices[pFace->pVertexIDs[v5]].x, 7309 pIndoor->pVertices[pFace->pVertexIDs[i]].x,
7299 pIndoor->pVertices[pFace->pVertexIDs[v5]].y, 7310 pIndoor->pVertices[pFace->pVertexIDs[i]].y,
7300 pIndoor->pVertices[pFace->pVertexIDs[v5]].z, 7311 pIndoor->pVertices[pFace->pVertexIDs[i]].z,
7301 &stru_50B700._view_transformed_xs[v5 + 3], 7312 &stru_50B700._view_transformed_xs[i + 3],
7302 &stru_50B700._view_transformed_zs[v5 + 3], 7313 &stru_50B700._view_transformed_zs[i + 3],
7303 &stru_50B700._view_transformed_ys[v5 + 3], 7314 &stru_50B700._view_transformed_ys[i + 3],
7304 0); 7315 0);
7305 ++v5; 7316 }
7306 } 7317 }
7307 while ( v5 < v66 ); 7318 //v7 = pFace->uNumVertices;
7308 } 7319 if ( pFace->uNumVertices <= 0 )
7309 v7 = v66;
7310 v8 = 0;
7311 if ( v66 <= 0 )
7312 return 0; 7320 return 0;
7313 do 7321 bool bFound = false;
7314 { 7322 for (uint i = 0; i < pFace->uNumVertices; ++i)
7315 if ( stru_50B700._view_transformed_xs[v8 + 3] >= 524288 ) 7323 {
7324 if ( stru_50B700._view_transformed_xs[i + 3] >= 524288 )
7325 {
7326 bFound = true;
7316 break; 7327 break;
7317 ++v8; 7328 }
7318 } 7329 }
7319 while ( v8 < v66 ); 7330 if ( !bFound )
7320 if ( v8 >= v66 )
7321 return 0; 7331 return 0;
7322 v79 = 0; 7332
7323 stru_50B700._view_transformed_xs[v66 + 3] = stru_50B700._view_transformed_xs[3]; 7333 depth_num_vertices = 0;
7324 stru_50B700._view_transformed_zs[v66 + 3] = stru_50B700._view_transformed_zs[3]; 7334 stru_50B700._view_transformed_xs[pFace->uNumVertices + 3] = stru_50B700._view_transformed_xs[3];
7325 stru_50B700._view_transformed_ys[v66 + 3] = stru_50B700._view_transformed_ys[3]; 7335 stru_50B700._view_transformed_zs[pFace->uNumVertices + 3] = stru_50B700._view_transformed_zs[3];
7326 thisa = stru_50B700._view_transformed_xs[3] >= 524288; 7336 stru_50B700._view_transformed_ys[pFace->uNumVertices + 3] = stru_50B700._view_transformed_ys[3];
7327 v86 = 1; 7337 current_vertices_flag = stru_50B700._view_transformed_xs[3] >= 524288;
7328 if ( v66 >= 1 ) 7338 //v86 = 1;
7329 { 7339 if ( pFace->uNumVertices >= 1 )
7330 do 7340 {
7331 { 7341 for ( uint i = 1; i <= pFace->uNumVertices; ++i)
7332 v9 = v86; 7342 {
7333 v10 = stru_50B700._view_transformed_xs[v86 + 3]; 7343 //v9 = v86;
7334 v81 = v10 >= 524288; 7344 //v10 = stru_50B700._view_transformed_xs[v86 + 3];
7335 if ( thisa ^ v81 ) 7345 next_vertices_flag = stru_50B700._view_transformed_xs[i + 3] >= 524288;
7336 { 7346 if ( current_vertices_flag ^ next_vertices_flag )
7337 v11 = stru_50B700._view_transformed_xs[v9 + 2]; 7347 {
7338 if ( v10 >= 524288 ) 7348 //v11 = stru_50B700._view_transformed_xs[i + 2];
7349 if ( stru_50B700._view_transformed_xs[i + 3] >= 524288 )
7339 { 7350 {
7340 v12 = v10 - v11; 7351 v12 = stru_50B700._view_transformed_xs[i + 3] - stru_50B700._view_transformed_xs[i + 2];
7341 v13 = 524288 - v11; 7352 v13 = 524288 - stru_50B700._view_transformed_xs[i + 2];
7342 LODWORD(v14) = v13 << 16; 7353 LODWORD(v14) = v13 << 16;
7343 HIDWORD(v14) = v13 >> 16; 7354 HIDWORD(v14) = v13 >> 16;
7344 v15 = (char *)&stru_50B700._view_transformed_ys[v9 + 2]; 7355 v15 = (char *)&stru_50B700._view_transformed_ys[i + 2];
7345 stru_50B700._view_transformed_zs[v79] = ((unsigned __int64)((stru_50B700._view_transformed_zs[v9 + 3] 7356 stru_50B700._view_transformed_zs[depth_num_vertices] = ((unsigned __int64)((stru_50B700._view_transformed_zs[i + 3]
7346 - stru_50B700._view_transformed_zs[v9 + 2]) 7357 - stru_50B700._view_transformed_zs[i + 2])
7347 * v14 7358 * v14
7348 / v12) >> 16) 7359 / v12) >> 16)
7349 + stru_50B700._view_transformed_zs[v9 + 2]; 7360 + stru_50B700._view_transformed_zs[i + 2];
7350 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[v9 + 3] - stru_50B700._view_transformed_ys[v9 + 2]) 7361 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[i + 3] - stru_50B700._view_transformed_ys[i + 2])
7351 * v14 7362 * v14
7352 / v12) >> 16; 7363 / v12) >> 16;
7353 } 7364 }
7354 else 7365 else
7355 { 7366 {
7356 v16 = v11 - v10; 7367 v16 = stru_50B700._view_transformed_xs[i + 2] - stru_50B700._view_transformed_xs[i + 3];
7357 v17 = 524288 - v10; 7368 v17 = 524288 - stru_50B700._view_transformed_xs[i + 3];
7358 LODWORD(v18) = v17 << 16; 7369 LODWORD(v18) = v17 << 16;
7359 HIDWORD(v18) = v17 >> 16; 7370 HIDWORD(v18) = v17 >> 16;
7360 v15 = (char *)&stru_50B700._view_transformed_ys[v9 + 3]; 7371 v15 = (char *)&stru_50B700._view_transformed_ys[i + 3];
7361 stru_50B700._view_transformed_zs[v79] = ((unsigned __int64)((stru_50B700._view_transformed_zs[v9 + 2] 7372 stru_50B700._view_transformed_zs[depth_num_vertices] = ((unsigned __int64)((stru_50B700._view_transformed_zs[i + 2]
7362 - stru_50B700._view_transformed_zs[v9 + 3]) 7373 - stru_50B700._view_transformed_zs[i + 3])
7363 * v18 7374 * v18
7364 / v16) >> 16) 7375 / v16) >> 16)
7365 + stru_50B700._view_transformed_zs[v9 + 3]; 7376 + stru_50B700._view_transformed_zs[i + 3];
7366 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[v9 + 2] - stru_50B700._view_transformed_ys[v9 + 3]) 7377 thisb = (unsigned __int64)((stru_50B700._view_transformed_ys[i + 2] - stru_50B700._view_transformed_ys[i + 3])
7367 * v18 7378 * v18
7368 / v16) >> 16; 7379 / v16) >> 16;
7369 } 7380 }
7370 v19 = v79++; 7381 v19 = depth_num_vertices++;
7371 v7 = v66; 7382 //v7 = pFace->uNumVertices;
7372 stru_50B700._view_transformed_ys[v19] = thisb + *(_DWORD *)v15; 7383 stru_50B700._view_transformed_ys[v19] = thisb + *(_DWORD *)v15;
7373 stru_50B700._view_transformed_xs[v19] = 524288; 7384 stru_50B700._view_transformed_xs[v19] = 524288;
7374 } 7385 }
7375 if ( v81 ) 7386 if ( next_vertices_flag )
7376 { 7387 {
7377 v20 = v79++; 7388 v20 = depth_num_vertices++;
7378 stru_50B700._view_transformed_xs[v20] = stru_50B700._view_transformed_xs[v9 + 3]; 7389 stru_50B700._view_transformed_xs[v20] = stru_50B700._view_transformed_xs[i + 3];
7379 stru_50B700._view_transformed_zs[v20] = stru_50B700._view_transformed_zs[v9 + 3]; 7390 stru_50B700._view_transformed_zs[v20] = stru_50B700._view_transformed_zs[i + 3];
7380 stru_50B700._view_transformed_ys[v20] = stru_50B700._view_transformed_ys[v9 + 3]; 7391 stru_50B700._view_transformed_ys[v20] = stru_50B700._view_transformed_ys[i + 3];
7381 } 7392 }
7382 ++v86; 7393 current_vertices_flag = next_vertices_flag;
7383 thisa = v81; 7394 }
7384 } 7395 }
7385 while ( v86 <= v7 ); 7396
7386 }
7387 v87 = 0; 7397 v87 = 0;
7388 v21 = v79; 7398 v21 = depth_num_vertices;
7389 stru_50B700._view_transformed_xs[v79] = stru_50B700._view_transformed_xs[0]; 7399 stru_50B700._view_transformed_xs[depth_num_vertices] = stru_50B700._view_transformed_xs[0];
7390 stru_50B700._view_transformed_zs[v79] = stru_50B700._view_transformed_zs[0]; 7400 stru_50B700._view_transformed_zs[depth_num_vertices] = stru_50B700._view_transformed_zs[0];
7391 for ( stru_50B700._view_transformed_ys[v79] = stru_50B700._view_transformed_ys[0]; 7401 for ( stru_50B700._view_transformed_ys[depth_num_vertices] = stru_50B700._view_transformed_ys[0];
7392 v87 < v79; 7402 v87 < depth_num_vertices;
7393 stru_50B700._screen_space_y[v22 + 12] = pBLVRenderParams->uViewportCenterY - v35 ) 7403 stru_50B700._screen_space_y[v22 + 12] = pBLVRenderParams->uViewportCenterY - v35 )
7394 { 7404 {
7395 v22 = v87; 7405 v22 = v87;
7396 thisc = abs(stru_50B700._view_transformed_xs[v87]); 7406 thisc = abs(stru_50B700._view_transformed_xs[v87]);
7397 if ( abs(stru_50B700._view_transformed_zs[v87]) >> 13 <= thisc ) 7407 if ( abs(stru_50B700._view_transformed_zs[v87]) >> 13 <= thisc )
7406 { 7416 {
7407 v23 = 0; 7417 v23 = 0;
7408 v24 = 0; 7418 v24 = 0;
7409 if ( stru_50B700._view_transformed_zs[v22] >= 0 ) 7419 if ( stru_50B700._view_transformed_zs[v22] >= 0 )
7410 { 7420 {
7411 LOBYTE(v24) = stru_50B700._view_transformed_xs[v22] >= 0; 7421 //LOBYTE(v24) = stru_50B700._view_transformed_xs[v22] >= 0;
7412 v26 = ((v24 - 1) & 0xFF800000) + 4194304; 7422 //v26 = ((v24 - 1) & 0xFF800000) + 4194304;
7423 if (stru_50B700._view_transformed_xs[v22] >= 0)
7424 v26 = 0x400000; // 64.0
7425 else
7426 v26 = 0xFFC00000;
7413 } 7427 }
7414 else 7428 else
7415 { 7429 {
7416 LOBYTE(v24) = stru_50B700._view_transformed_xs[v22] >= 0; 7430 //LOBYTE(v24) = stru_50B700._view_transformed_xs[v22] >= 0;
7417 v25 = v24 - 1; 7431 //v25 = v24 - 1;
7418 v26 = (v25 & 0x800000) - 4194304; 7432 //v26 = (v25 & 0x800000) - 4194304;
7419 } 7433 if (stru_50B700._view_transformed_xs[v22] >= 0)
7420 } 7434 v26 = 0xFFC00000; // -63.0
7435 else
7436 v26 = 0x400000;
7437 }
7438 }
7439
7421 v29 = stru_50B700._view_transformed_ys[v22]; 7440 v29 = stru_50B700._view_transformed_ys[v22];
7422 stru_50B700._screen_space_x[v22 + 12] = v26; 7441 stru_50B700._screen_space_x[v22 + 12] = v26;
7423 if ( abs(v29) >> 13 <= thisc ) 7442 if ( abs(v29) >> 13 <= thisc )
7424 { 7443 {
7425 v33 = stru_50B700._view_transformed_ys[v22]; 7444 v33 = stru_50B700._view_transformed_ys[v22];
7430 else 7449 else
7431 { 7450 {
7432 v30 = 0; 7451 v30 = 0;
7433 if ( stru_50B700._view_transformed_ys[v22] >= v23 ) 7452 if ( stru_50B700._view_transformed_ys[v22] >= v23 )
7434 { 7453 {
7435 LOBYTE(v30) = stru_50B700._view_transformed_xs[v22] >= v23; 7454 //LOBYTE(v30) = stru_50B700._view_transformed_xs[v22] >= v23;
7436 v32 = ((v30 - 1) & 0xFF800000) + 4194304; 7455 //v32 = ((v30 - 1) & 0xFF800000) + 4194304;
7456 if (stru_50B700._view_transformed_xs[v22] >= v23)
7457 v32 = 0x400000; // 64.0
7458 else
7459 v32 = 0xFFC00000;
7437 } 7460 }
7438 else 7461 else
7439 { 7462 {
7440 LOBYTE(v30) = stru_50B700._view_transformed_xs[v22] >= v23; 7463 //LOBYTE(v30) = stru_50B700._view_transformed_xs[v22] >= v23;
7441 v31 = v30 - 1; 7464 //v31 = v30 - 1;
7442 v32 = (v31 & 0x800000) - 4194304; 7465 //v32 = (v31 & 0x800000) - 4194304;
7466 if (stru_50B700._view_transformed_xs[v22] >= v23)
7467 v32 = 0xFFC00000; // -63.0
7468 else
7469 v32 = 0x400000;
7443 } 7470 }
7444 } 7471 }
7445 stru_50B700._screen_space_y[v22 + 12] = v32; 7472 stru_50B700._screen_space_y[v22 + 12] = v32;
7446 stru_50B700._screen_space_x[v22 + 12] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) 7473 stru_50B700._screen_space_x[v22 + 12] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40)
7447 * (signed __int64)stru_50B700._screen_space_x[v22 + 12]) >> 16; 7474 * (signed __int64)stru_50B700._screen_space_x[v22 + 12]) >> 16;
7455 v37 = pBLVRenderParams->uViewportX; 7482 v37 = pBLVRenderParams->uViewportX;
7456 v38 = stru_50B700._screen_space_x[12] < (signed int)pBLVRenderParams->uViewportX; 7483 v38 = stru_50B700._screen_space_x[12] < (signed int)pBLVRenderParams->uViewportX;
7457 LOBYTE(v38) = stru_50B700._screen_space_x[12] >= (signed int)pBLVRenderParams->uViewportX; 7484 LOBYTE(v38) = stru_50B700._screen_space_x[12] >= (signed int)pBLVRenderParams->uViewportX;
7458 v39 = 1; 7485 v39 = 1;
7459 v88 = 1; 7486 v88 = 1;
7460 if ( v79 < 1 ) 7487 if ( depth_num_vertices < 1 )
7461 return 0; 7488 return 0;
7462 do 7489 do
7463 { 7490 {
7464 v40 = v39; 7491 v40 = v39;
7465 v41 = stru_50B700._screen_space_x[v40 + 12]; 7492 v41 = stru_50B700._screen_space_x[v40 + 12];
7491 stru_50B700._screen_space_x[v36 + 9] = stru_50B700._screen_space_x[v40 + 12]; 7518 stru_50B700._screen_space_x[v36 + 9] = stru_50B700._screen_space_x[v40 + 12];
7492 stru_50B700._screen_space_y[v36++ + 9] = stru_50B700._screen_space_y[v40 + 12]; 7519 stru_50B700._screen_space_y[v36++ + 9] = stru_50B700._screen_space_y[v40 + 12];
7493 } 7520 }
7494 v39 = v88++ + 1; 7521 v39 = v88++ + 1;
7495 } 7522 }
7496 while ( v88 <= v79 ); 7523 while ( v88 <= depth_num_vertices );
7497 if ( !v36 7524 if ( !v36
7498 || (v43 = 0, 7525 || (v43 = 0,
7499 stru_50B700._screen_space_x[v36 + 9] = stru_50B700._screen_space_x[9], 7526 stru_50B700._screen_space_x[v36 + 9] = stru_50B700._screen_space_x[9],
7500 stru_50B700._screen_space_y[v36 + 9] = stru_50B700._screen_space_y[9], 7527 stru_50B700._screen_space_y[v36 + 9] = stru_50B700._screen_space_y[9],
7501 v44 = pBLVRenderParams->uViewportZ, 7528 v44 = pBLVRenderParams->uViewportZ,