Mercurial > mm7
comparison mm7_6.cpp @ 1391:cc9a3a24d61d
Moved stru11, stru12 and some SW Rendering stuff to the archives.
stru148 -> struct Polygon
author | Nomad |
---|---|
date | Thu, 18 Jul 2013 14:42:54 +0200 |
parents | b51332ab228f |
children | d071e0e9ba75 |
comparison
equal
deleted
inserted
replaced
1390:613c77e51e38 | 1391:cc9a3a24d61d |
---|---|
186 if ( v22 < 3 ) | 186 if ( v22 < 3 ) |
187 return 0; | 187 return 0; |
188 return result; | 188 return result; |
189 } | 189 } |
190 | 190 |
191 //----- (004250FE) -------------------------------------------------------- | |
192 signed int __fastcall sr_4250FE(unsigned int uVertexID) | |
193 { | |
194 unsigned int v1; // edx@1 | |
195 char *v2; // edi@5 | |
196 char *v3; // esi@5 | |
197 char *v4; // ecx@5 | |
198 int v5; // ebx@6 | |
199 double v6; // st6@11 | |
200 double v7; // st5@11 | |
201 double v8; // st6@12 | |
202 unsigned __int8 v9; // c2@16 | |
203 unsigned __int8 v10; // c3@16 | |
204 void *v11; // edi@23 | |
205 double v12; // st6@23 | |
206 char *v13; // ecx@23 | |
207 char v14; // zf@24 | |
208 signed int result; // eax@25 | |
209 unsigned int v16; // [sp+8h] [bp-28h]@5 | |
210 bool v17; // [sp+Ch] [bp-24h]@2 | |
211 bool v18; // [sp+10h] [bp-20h]@7 | |
212 char *v19; // [sp+14h] [bp-1Ch]@5 | |
213 char *v20; // [sp+18h] [bp-18h]@5 | |
214 signed int v21; // [sp+1Ch] [bp-14h]@1 | |
215 RenderVertexSoft *v22; // [sp+20h] [bp-10h]@5 | |
216 char *v23; // [sp+24h] [bp-Ch]@5 | |
217 char *v24; // [sp+28h] [bp-8h]@5 | |
218 char *v25; // [sp+2Ch] [bp-4h]@5 | |
219 | |
220 v1 = uVertexID; | |
221 memcpy(&array_50AC10[uVertexID], array_50AC10, sizeof(array_50AC10[uVertexID])); | |
222 v21 = 0; | |
223 v17 = array_50AC10[0].vWorldViewPosition.x >= 8.0; | |
224 if ( (signed int)(uVertexID + 1) <= 1 ) | |
225 return 0; | |
226 v2 = (char *)&array_507D30[0].vWorldViewPosition.z; | |
227 v3 = (char *)&array_507D30[0].vWorldViewPosition.y; | |
228 v24 = (char *)&array_507D30[0]._rhw; | |
229 v22 = array_507D30; | |
230 v19 = (char *)&array_507D30[0].vWorldViewPosition.z; | |
231 v20 = (char *)&array_507D30[0].vWorldViewPosition.y; | |
232 v23 = (char *)&array_507D30[0].vWorldViewPosition; | |
233 v25 = (char *)&array_507D30[0].flt_2C; | |
234 v4 = (char *)&array_50AC10[0].vWorldViewPosition; | |
235 v16 = v1; | |
236 do | |
237 { | |
238 v5 = (int)(v4 + 48); | |
239 v18 = *((float *)v4 + 12) >= 8.0; | |
240 if ( v17 != v18 ) | |
241 { | |
242 if ( v18 ) | |
243 { | |
244 v6 = (8.0 - *(float *)v4) / (*(float *)v5 - *(float *)v4); | |
245 *(float *)v3 = (*((float *)v4 + 13) - *((float *)v4 + 1)) * v6 + *((float *)v4 + 1); | |
246 *(float *)v2 = (*((float *)v4 + 14) - *((float *)v4 + 2)) * v6 + *((float *)v4 + 2); | |
247 v7 = (*((float *)v4 + 20) - *((float *)v4 + 8)) * v6 + *((float *)v4 + 8); | |
248 } | |
249 else | |
250 { | |
251 v8 = (8.0 - *(float *)v5) / (*(float *)v4 - *(float *)v5); | |
252 *(float *)v3 = (*((float *)v4 + 1) - *((float *)v4 + 13)) * v8 + *((float *)v4 + 13); | |
253 *(float *)v2 = (*((float *)v4 + 2) - *((float *)v4 + 14)) * v8 + *((float *)v4 + 14); | |
254 v7 = (*((float *)v4 + 8) - *((float *)v4 + 20)) * v8 + *((float *)v4 + 20); | |
255 } | |
256 *(float *)v25 = v7; | |
257 *(float *)v23 = 8.0; | |
258 *(int *)v24 = 0x3E000000u; | |
259 if ( v17 ) | |
260 { | |
261 if ( 8.0 == *(float *)v4 && *(float *)v3 == *((float *)v4 + 1) ) | |
262 { | |
263 v9 = 0; | |
264 v10 = *(float *)v2 == *((float *)v4 + 2); | |
265 goto LABEL_20; | |
266 } | |
267 } | |
268 else | |
269 { | |
270 if ( 8.0 == *(float *)v5 && *(float *)v3 == *((float *)v4 + 13) ) | |
271 { | |
272 v9 = 0; | |
273 v10 = *(float *)v2 == *((float *)v4 + 14); | |
274 LABEL_20: | |
275 if ( v10 | v9 ) | |
276 goto LABEL_22; | |
277 goto LABEL_21; | |
278 } | |
279 } | |
280 LABEL_21: | |
281 ++v22; | |
282 v23 += 48; | |
283 v25 += 48; | |
284 v3 += 48; | |
285 v2 += 48; | |
286 ++v21; | |
287 v24 += 48; | |
288 v20 = v3; | |
289 v19 = v2; | |
290 } | |
291 LABEL_22: | |
292 if ( v18 ) | |
293 { | |
294 v11 = v22; | |
295 v20 += 48; | |
296 v19 += 48; | |
297 v12 = 1.0 / (*(float *)v5 + 0.0000001); | |
298 ++v21; | |
299 v25 += 48; | |
300 v23 += 48; | |
301 ++v22; | |
302 memcpy(v11, v4 + 36, 0x30u); | |
303 v13 = v24; | |
304 v24 += 48; | |
305 v3 = v20; | |
306 v2 = v19; | |
307 *(float *)v13 = v12; | |
308 } | |
309 v14 = v16-- == 1; | |
310 v17 = v18; | |
311 v4 = (char *)v5; | |
312 } | |
313 while ( !v14 ); | |
314 result = v21; | |
315 if ( v21 < 3 ) | |
316 return 0; | |
317 return result; | |
318 } | |
319 | |
320 //----- (004252E8) -------------------------------------------------------- | |
321 signed int __fastcall sr_4252E8(unsigned int uVertexID) | |
322 { | |
323 unsigned int v1; // edx@1 | |
324 double v2; // st7@1 | |
325 char *v3; // edi@5 | |
326 char *v4; // esi@5 | |
327 char *v5; // ecx@5 | |
328 int v6; // ebx@6 | |
329 double v7; // st6@11 | |
330 double v8; // st5@11 | |
331 double v9; // st6@12 | |
332 unsigned __int8 v10; // c2@16 | |
333 unsigned __int8 v11; // c3@16 | |
334 void *v12; // edi@23 | |
335 double v13; // st6@23 | |
336 char *v14; // ecx@23 | |
337 char v15; // zf@24 | |
338 signed int result; // eax@25 | |
339 unsigned int v17; // [sp+8h] [bp-28h]@5 | |
340 bool v18; // [sp+Ch] [bp-24h]@2 | |
341 bool v19; // [sp+10h] [bp-20h]@7 | |
342 char *v20; // [sp+14h] [bp-1Ch]@5 | |
343 char *v21; // [sp+18h] [bp-18h]@5 | |
344 signed int v22; // [sp+1Ch] [bp-14h]@1 | |
345 RenderVertexSoft *v23; // [sp+20h] [bp-10h]@5 | |
346 char *v24; // [sp+24h] [bp-Ch]@5 | |
347 char *v25; // [sp+28h] [bp-8h]@5 | |
348 char *v26; // [sp+2Ch] [bp-4h]@5 | |
349 | |
350 v1 = uVertexID; | |
351 v2 = (double)pOutdoorCamera->shading_dist_mist; | |
352 memcpy(&array_50AC10[uVertexID], array_50AC10, sizeof(array_50AC10[uVertexID])); | |
353 v22 = 0; | |
354 v18 = array_50AC10[0].vWorldViewPosition.x <= v2; | |
355 if ( (signed int)(uVertexID + 1) <= 1 ) | |
356 return 0; | |
357 v3 = (char *)&array_507D30[0].vWorldViewPosition.z; | |
358 v4 = (char *)&array_507D30[0].vWorldViewPosition.y; | |
359 v25 = (char *)&array_507D30[0]._rhw; | |
360 v23 = array_507D30; | |
361 v20 = (char *)&array_507D30[0].vWorldViewPosition.z; | |
362 v21 = (char *)&array_507D30[0].vWorldViewPosition.y; | |
363 v24 = (char *)&array_507D30[0].vWorldViewPosition; | |
364 v26 = (char *)&array_507D30[0].flt_2C; | |
365 v5 = (char *)&array_50AC10[0].vWorldViewPosition; | |
366 v17 = v1; | |
367 do | |
368 { | |
369 v6 = (int)(v5 + 48); | |
370 v19 = v2 >= *((float *)v5 + 12); | |
371 if ( v18 != v19 ) | |
372 { | |
373 if ( v19 ) | |
374 { | |
375 v7 = (v2 - *(float *)v5) / (*(float *)v6 - *(float *)v5); | |
376 *(float *)v4 = (*((float *)v5 + 13) - *((float *)v5 + 1)) * v7 + *((float *)v5 + 1); | |
377 *(float *)v3 = (*((float *)v5 + 14) - *((float *)v5 + 2)) * v7 + *((float *)v5 + 2); | |
378 v8 = (*((float *)v5 + 20) - *((float *)v5 + 8)) * v7 + *((float *)v5 + 8); | |
379 } | |
380 else | |
381 { | |
382 v9 = (v2 - *(float *)v6) / (*(float *)v5 - *(float *)v6); | |
383 *(float *)v4 = (*((float *)v5 + 1) - *((float *)v5 + 13)) * v9 + *((float *)v5 + 13); | |
384 *(float *)v3 = (*((float *)v5 + 2) - *((float *)v5 + 14)) * v9 + *((float *)v5 + 14); | |
385 v8 = (*((float *)v5 + 8) - *((float *)v5 + 20)) * v9 + *((float *)v5 + 20); | |
386 } | |
387 *(float *)v26 = v8; | |
388 *(float *)v24 = v2; | |
389 *(float *)v25 = 1.0 / v2; | |
390 if ( v18 ) | |
391 { | |
392 if ( v2 == *(float *)v5 && *(float *)v4 == *((float *)v5 + 1) ) | |
393 { | |
394 v10 = 0; | |
395 v11 = *(float *)v3 == *((float *)v5 + 2); | |
396 goto LABEL_20; | |
397 } | |
398 } | |
399 else | |
400 { | |
401 if ( v2 == *(float *)v6 && *(float *)v4 == *((float *)v5 + 13) ) | |
402 { | |
403 v10 = 0; | |
404 v11 = *(float *)v3 == *((float *)v5 + 14); | |
405 LABEL_20: | |
406 if ( v11 | v10 ) | |
407 goto LABEL_22; | |
408 goto LABEL_21; | |
409 } | |
410 } | |
411 LABEL_21: | |
412 ++v23; | |
413 v24 += 48; | |
414 v26 += 48; | |
415 v4 += 48; | |
416 v3 += 48; | |
417 ++v22; | |
418 v25 += 48; | |
419 v21 = v4; | |
420 v20 = v3; | |
421 } | |
422 LABEL_22: | |
423 if ( v19 ) | |
424 { | |
425 v12 = v23; | |
426 v21 += 48; | |
427 v20 += 48; | |
428 v13 = 1.0 / (*(float *)v6 + 0.0000001); | |
429 ++v22; | |
430 v26 += 48; | |
431 v24 += 48; | |
432 ++v23; | |
433 memcpy(v12, v5 + 36, 0x30u); | |
434 v14 = v25; | |
435 v25 += 48; | |
436 v4 = v21; | |
437 v3 = v20; | |
438 *(float *)v14 = v13; | |
439 } | |
440 v15 = v17-- == 1; | |
441 v18 = v19; | |
442 v5 = (char *)v6; | |
443 } | |
444 while ( !v15 ); | |
445 result = v22; | |
446 if ( v22 < 3 ) | |
447 return 0; | |
448 return result; | |
449 } | |
450 | |
451 //----- (004254D2) -------------------------------------------------------- | |
452 int __fastcall sr_4254D2(signed int a1) | |
453 { | |
454 signed int v1; // ebx@2 | |
455 int v2; // ecx@2 | |
456 int result; // eax@11 | |
457 double v4; // ST74_8@12 | |
458 bool v5; // edi@12 | |
459 char *v6; // esi@13 | |
460 char *v7; // ebx@13 | |
461 double v8; // st7@15 | |
462 double v9; // st7@16 | |
463 double v10; // st6@16 | |
464 double v11; // st7@17 | |
465 float v12; // eax@18 | |
466 double v13; // ST4C_8@19 | |
467 double v14; // ST10_8@19 | |
468 double v15; // ST28_8@20 | |
469 double v16; // ST34_8@20 | |
470 char v17; // zf@20 | |
471 double v18; // ST18_8@21 | |
472 double v19; // ST3C_8@21 | |
473 double v20; // ST44_8@22 | |
474 double v21; // ST54_8@22 | |
475 void *v22; // edi@26 | |
476 double v23; // ST54_8@29 | |
477 bool v24; // esi@29 | |
478 char *v25; // edi@30 | |
479 char *v26; // ebx@30 | |
480 bool v27; // ecx@32 | |
481 double v28; // st7@33 | |
482 double v29; // st7@34 | |
483 double v30; // st6@34 | |
484 double v31; // st7@35 | |
485 double v32; // ST44_8@37 | |
486 double v33; // ST3C_8@37 | |
487 double v34; // ST18_8@38 | |
488 double v35; // ST34_8@38 | |
489 char v36; // zf@38 | |
490 double v37; // ST28_8@39 | |
491 double v38; // ST10_8@39 | |
492 double v39; // ST20_8@40 | |
493 double v40; // ST5C_8@40 | |
494 void *v41; // edi@44 | |
495 double v42; // ST5C_8@47 | |
496 bool v43; // edi@47 | |
497 char *v44; // esi@48 | |
498 char *v45; // ebx@48 | |
499 bool v46; // ecx@49 | |
500 double v47; // st6@50 | |
501 double v48; // st6@51 | |
502 double v49; // st5@51 | |
503 double v50; // st6@52 | |
504 double v51; // ST20_8@54 | |
505 double v52; // ST54_8@54 | |
506 double v53; // ST44_8@55 | |
507 double v54; // ST3C_8@55 | |
508 char v55; // zf@55 | |
509 double v56; // ST18_8@56 | |
510 double v57; // ST34_8@56 | |
511 double v58; // ST28_8@57 | |
512 double v59; // ST10_8@57 | |
513 void *v60; // edi@61 | |
514 double v61; // ST5C_8@64 | |
515 bool v62; // edi@64 | |
516 char *v63; // esi@65 | |
517 char *v64; // ebx@65 | |
518 bool v65; // ecx@66 | |
519 double v66; // st6@67 | |
520 double v67; // st6@68 | |
521 double v68; // st5@68 | |
522 double v69; // st6@69 | |
523 double v70; // ST20_8@71 | |
524 double v71; // ST54_8@71 | |
525 double v72; // ST44_8@72 | |
526 double v73; // ST3C_8@72 | |
527 char v74; // zf@72 | |
528 double v75; // ST18_8@73 | |
529 double v76; // ST34_8@73 | |
530 double v77; // ST28_8@74 | |
531 double v78; // ST10_8@74 | |
532 void *v79; // edi@78 | |
533 int v80; // ebx@81 | |
534 char *v81; // ecx@82 | |
535 signed int v82; // esi@82 | |
536 float v83; // ST78_4@83 | |
537 double v84; // ST5C_8@83 | |
538 float v85; // eax@84 | |
539 double v86; // ST20_8@85 | |
540 double v87; // ST54_8@88 | |
541 float v88; // eax@89 | |
542 double v89; // ST44_8@90 | |
543 unsigned __int8 v90; // sf@94 | |
544 unsigned __int8 v91; // of@94 | |
545 int v92; // edx@97 | |
546 int v93; // esi@97 | |
547 int v94; // edi@97 | |
548 int v95; // eax@97 | |
549 int v96; // eax@104 | |
550 double v97; // [sp+4Ch] [bp-8Ch]@32 | |
551 double v98; // [sp+54h] [bp-84h]@49 | |
552 double v99; // [sp+54h] [bp-84h]@66 | |
553 float v100; // [sp+5Ch] [bp-7Ch]@1 | |
554 float v101; // [sp+60h] [bp-78h]@1 | |
555 float v102; // [sp+64h] [bp-74h]@1 | |
556 double v103; // [sp+6Ch] [bp-6Ch]@14 | |
557 float v104; // [sp+A8h] [bp-30h]@1 | |
558 signed int v105; // [sp+A8h] [bp-30h]@96 | |
559 bool v106; // [sp+ACh] [bp-2Ch]@14 | |
560 bool v107; // [sp+ACh] [bp-2Ch]@32 | |
561 bool v108; // [sp+ACh] [bp-2Ch]@49 | |
562 bool v109; // [sp+ACh] [bp-2Ch]@66 | |
563 signed int v110; // [sp+B0h] [bp-28h]@12 | |
564 char *v111; // [sp+B8h] [bp-20h]@30 | |
565 signed int v112; // [sp+B8h] [bp-20h]@48 | |
566 signed int v113; // [sp+B8h] [bp-20h]@65 | |
567 char *v114; // [sp+BCh] [bp-1Ch]@13 | |
568 signed int v115; // [sp+BCh] [bp-1Ch]@29 | |
569 signed int v116; // [sp+BCh] [bp-1Ch]@64 | |
570 signed int v117; // [sp+C0h] [bp-18h]@1 | |
571 char *v118; // [sp+C0h] [bp-18h]@30 | |
572 char *v119; // [sp+C0h] [bp-18h]@48 | |
573 char *v120; // [sp+C0h] [bp-18h]@65 | |
574 char *v121; // [sp+C4h] [bp-14h]@13 | |
575 char *v122; // [sp+C4h] [bp-14h]@30 | |
576 signed int v123; // [sp+C4h] [bp-14h]@47 | |
577 char *v124; // [sp+C8h] [bp-10h]@30 | |
578 char *v125; // [sp+C8h] [bp-10h]@48 | |
579 char *v126; // [sp+C8h] [bp-10h]@65 | |
580 signed int v127; // [sp+CCh] [bp-Ch]@2 | |
581 char *v128; // [sp+CCh] [bp-Ch]@13 | |
582 char *v129; // [sp+CCh] [bp-Ch]@30 | |
583 RenderVertexSoft *v130; // [sp+CCh] [bp-Ch]@48 | |
584 RenderVertexSoft *v131; // [sp+CCh] [bp-Ch]@65 | |
585 RenderVertexSoft *v132; // [sp+D0h] [bp-8h]@13 | |
586 char *v133; // [sp+D0h] [bp-8h]@30 | |
587 char *v134; // [sp+D0h] [bp-8h]@48 | |
588 char *v135; // [sp+D0h] [bp-8h]@65 | |
589 signed int v136; // [sp+D4h] [bp-4h]@1 | |
590 char *v137; // [sp+D4h] [bp-4h]@13 | |
591 RenderVertexSoft *v138; // [sp+D4h] [bp-4h]@30 | |
592 char *v139; // [sp+D4h] [bp-4h]@48 | |
593 char *v140; // [sp+D4h] [bp-4h]@65 | |
594 | |
595 v101 = (double)(signed int)pViewport->uViewportTL_X; | |
596 v100 = (double)(signed int)pViewport->uViewportBR_X; | |
597 v117 = a1; | |
598 v136 = 1; | |
599 v104 = (double)(signed int)pViewport->uViewportTL_Y; | |
600 v102 = (double)(pViewport->uViewportBR_Y + 1); | |
601 if ( a1 <= 0 ) | |
602 return v117; | |
603 v127 = a1; | |
604 v1 = a1; | |
605 memcpy(array_508690, array_50AC10, 4 * ((unsigned int)(48 * a1) >> 2)); | |
606 v2 = 0; | |
607 do | |
608 { | |
609 if ( array_50AC10[v2].vWorldViewProjX < (double)v101 || array_50AC10[v2].vWorldViewProjX > (double)v100 ) | |
610 v136 = 0; | |
611 if ( *(float *)(v2 * 48 + 5286956) < (double)v104 || *(float *)(v2 * 48 + 5286956) > (double)v102 ) | |
612 v136 = 0; | |
613 ++v2; | |
614 --v127; | |
615 } | |
616 while ( v127 ); | |
617 if ( v136 ) | |
618 return v117; | |
619 v110 = 0; | |
620 memcpy(&array_50AC10[v1], array_50AC10, sizeof(array_50AC10[v1])); | |
621 v4 = array_50AC10[0].vWorldViewProjX + 6.7553994e15; | |
622 v5 = SLODWORD(v4) >= (signed int)pViewport->uViewportTL_X; | |
623 if ( v117 < 1 ) | |
624 goto LABEL_112; | |
625 v6 = (char *)&array_50A2B0[0].vWorldViewProjY; | |
626 v132 = array_50A2B0; | |
627 v137 = (char *)&array_50A2B0[0].vWorldViewProjX; | |
628 v128 = (char *)&array_50A2B0[0].vWorldViewProjY; | |
629 v121 = (char *)&array_50A2B0[0].flt_2C; | |
630 v114 = (char *)&array_50A2B0[0]._rhw; | |
631 v7 = (char *)&array_50AC10[0].flt_2C; | |
632 do | |
633 { | |
634 v103 = *((float *)v7 + 7) + 6.7553994e15; | |
635 v106 = SLODWORD(v103) >= (signed int)pViewport->uViewportTL_X; | |
636 if ( !(v5 ^ v106) ) | |
637 goto LABEL_25; | |
638 v8 = v101; | |
639 if ( SLODWORD(v103) >= (signed int)pViewport->uViewportTL_X ) | |
640 { | |
641 v9 = (v8 - *((float *)v7 - 5)) / (*((float *)v7 + 7) - *((float *)v7 - 5)); | |
642 *(float *)v6 = (*((float *)v7 + 8) - *((float *)v7 - 4)) * v9 + *((float *)v7 - 4); | |
643 *(float *)v114 = (*((float *)v7 + 9) - *((float *)v7 - 3)) * v9 + *((float *)v7 - 3); | |
644 v10 = (*((float *)v7 + 12) - *(float *)v7) * v9 + *(float *)v7; | |
645 } | |
646 else | |
647 { | |
648 v11 = (v8 - *((float *)v7 + 7)) / (*((float *)v7 - 5) - *((float *)v7 + 7)); | |
649 *(float *)v6 = (*((float *)v7 - 4) - *((float *)v7 + 8)) * v11 + *((float *)v7 + 8); | |
650 *(float *)v114 = (*((float *)v7 - 3) - *((float *)v7 + 9)) * v11 + *((float *)v7 + 9); | |
651 v10 = (*(float *)v7 - *((float *)v7 + 12)) * v11 + *((float *)v7 + 12); | |
652 } | |
653 *(float *)v121 = v10; | |
654 *(int *)v137 = LODWORD(v101); | |
655 LODWORD(v12) = *(int *)v6; | |
656 if ( v5 ) | |
657 { | |
658 v13 = v12 + 6.7553994e15; | |
659 v14 = *((float *)v7 - 4) + 6.7553994e15; | |
660 if ( LODWORD(v13) == LODWORD(v14) ) | |
661 { | |
662 v15 = *(float *)v137 + 6.7553994e15; | |
663 v16 = *((float *)v7 - 5) + 6.7553994e15; | |
664 v17 = LODWORD(v15) == LODWORD(v16); | |
665 goto LABEL_23; | |
666 } | |
667 } | |
668 else | |
669 { | |
670 v18 = v12 + 6.7553994e15; | |
671 v19 = *((float *)v7 + 8) + 6.7553994e15; | |
672 if ( LODWORD(v18) == LODWORD(v19) ) | |
673 { | |
674 v20 = *(float *)v137 + 6.7553994e15; | |
675 v21 = *((float *)v7 + 7) + 6.7553994e15; | |
676 v17 = LODWORD(v20) == LODWORD(v21); | |
677 LABEL_23: | |
678 if ( v17 ) | |
679 goto LABEL_25; | |
680 goto LABEL_24; | |
681 } | |
682 } | |
683 LABEL_24: | |
684 v121 += 48; | |
685 v114 += 48; | |
686 v6 += 48; | |
687 ++v110; | |
688 ++v132; | |
689 v128 = v6; | |
690 v137 += 48; | |
691 LABEL_25: | |
692 if ( v106 ) | |
693 { | |
694 v22 = v132; | |
695 v128 += 48; | |
696 ++v110; | |
697 v114 += 48; | |
698 v121 += 48; | |
699 v137 += 48; | |
700 ++v132; | |
701 memcpy(v22, v7 + 4, 0x30u); | |
702 v6 = v128; | |
703 } | |
704 v5 = v106; | |
705 v7 += 48; | |
706 --v117; | |
707 } | |
708 while ( v117 ); | |
709 if ( v110 < 3 | |
710 || (v115 = 0, | |
711 memcpy(&array_50A2B0[v110], array_50A2B0, sizeof(array_50A2B0[v110])), | |
712 v23 = array_50A2B0[0].vWorldViewProjX + 6.7553994e15, | |
713 v24 = SLODWORD(v23) <= (signed int)pViewport->uViewportBR_X, | |
714 v110 < 1) ) | |
715 goto LABEL_112; | |
716 v25 = (char *)&array_509950[0]._rhw; | |
717 v138 = array_509950; | |
718 v129 = (char *)&array_50A2B0[0].vWorldViewProjX; | |
719 v118 = (char *)&array_50A2B0[0].vWorldViewProjY; | |
720 v133 = (char *)&array_509950[0].vWorldViewProjX; | |
721 v122 = (char *)&array_509950[0].vWorldViewProjY; | |
722 v124 = (char *)&array_509950[0].flt_2C; | |
723 v111 = (char *)&array_509950[0]._rhw; | |
724 v26 = (char *)&array_50A2B0[0].flt_2C; | |
725 while ( 2 ) | |
726 { | |
727 v97 = *((float *)v26 + 7) + 6.7553994e15; | |
728 v27 = SLODWORD(v97) <= (signed int)pViewport->uViewportBR_X; | |
729 v107 = SLODWORD(v97) <= (signed int)pViewport->uViewportBR_X; | |
730 if ( v24 != v27 ) | |
731 { | |
732 v28 = v100; | |
733 if ( SLODWORD(v97) <= (signed int)pViewport->uViewportBR_X ) | |
734 { | |
735 v29 = (v28 - *((float *)v26 - 5)) / (*((float *)v26 + 7) - *((float *)v26 - 5)); | |
736 *(float *)v122 = (*((float *)v26 + 8) - *((float *)v26 - 4)) * v29 + *((float *)v26 - 4); | |
737 *(float *)v25 = (*((float *)v26 + 9) - *((float *)v26 - 3)) * v29 + *((float *)v26 - 3); | |
738 v30 = (*((float *)v26 + 12) - *(float *)v26) * v29 + *(float *)v26; | |
739 } | |
740 else | |
741 { | |
742 v31 = (v28 - *((float *)v26 + 7)) / (*((float *)v26 - 5) - *((float *)v26 + 7)); | |
743 *(float *)v122 = (*((float *)v26 - 4) - *((float *)v26 + 8)) * v31 + *((float *)v26 + 8); | |
744 *(float *)v25 = (*((float *)v26 - 3) - *((float *)v26 + 9)) * v31 + *((float *)v26 + 9); | |
745 v30 = (*(float *)v26 - *((float *)v26 + 12)) * v31 + *((float *)v26 + 12); | |
746 } | |
747 *(float *)v124 = v30; | |
748 *(int *)v133 = LODWORD(v100); | |
749 if ( v24 ) | |
750 { | |
751 v32 = *(float *)v122 + 6.7553994e15; | |
752 v33 = *((float *)v26 - 4) + 6.7553994e15; | |
753 if ( LODWORD(v32) == LODWORD(v33) ) | |
754 { | |
755 v34 = *(float *)v133 + 6.7553994e15; | |
756 v35 = *((float *)v26 - 5) + 6.7553994e15; | |
757 v36 = LODWORD(v34) == LODWORD(v35); | |
758 goto LABEL_41; | |
759 } | |
760 goto LABEL_42; | |
761 } | |
762 v37 = *(float *)v118 + 6.7553994e15; | |
763 v38 = *((float *)v26 + 8) + 6.7553994e15; | |
764 if ( LODWORD(v37) != LODWORD(v38) ) | |
765 goto LABEL_42; | |
766 v39 = *(float *)v129 + 6.7553994e15; | |
767 v40 = *((float *)v26 + 7) + 6.7553994e15; | |
768 v36 = LODWORD(v39) == LODWORD(v40); | |
769 LABEL_41: | |
770 if ( !v36 ) | |
771 { | |
772 LABEL_42: | |
773 v129 += 48; | |
774 v118 += 48; | |
775 v133 += 48; | |
776 v122 += 48; | |
777 v124 += 48; | |
778 v111 += 48; | |
779 ++v115; | |
780 ++v138; | |
781 } | |
782 } | |
783 if ( v27 ) | |
784 { | |
785 v41 = v138; | |
786 ++v115; | |
787 v111 += 48; | |
788 v124 += 48; | |
789 v122 += 48; | |
790 v133 += 48; | |
791 v118 += 48; | |
792 v129 += 48; | |
793 ++v138; | |
794 memcpy(v41, v26 + 4, 0x30u); | |
795 } | |
796 v24 = v107; | |
797 v26 += 48; | |
798 --v110; | |
799 if ( v110 ) | |
800 { | |
801 v25 = v111; | |
802 continue; | |
803 } | |
804 break; | |
805 } | |
806 if ( v115 < 3 | |
807 || (v123 = 0, | |
808 memcpy(&array_509950[v115], array_509950, sizeof(array_509950[v115])), | |
809 v42 = array_509950[0].vWorldViewProjY + 6.7553994e15, | |
810 v43 = SLODWORD(v42) >= (signed int)pViewport->uViewportTL_Y, | |
811 v115 < 1) ) | |
812 goto LABEL_112; | |
813 v44 = (char *)&array_508FF0[0].vWorldViewProjX; | |
814 v130 = array_508FF0; | |
815 v119 = (char *)&array_508FF0[0].vWorldViewProjX; | |
816 v139 = (char *)&array_508FF0[0].vWorldViewProjY; | |
817 v125 = (char *)&array_508FF0[0].flt_2C; | |
818 v134 = (char *)&array_508FF0[0]._rhw; | |
819 v45 = (char *)&array_509950[0].flt_2C; | |
820 v112 = v115; | |
821 while ( 2 ) | |
822 { | |
823 v98 = *((float *)v45 + 8) + 6.7553994e15; | |
824 v46 = SLODWORD(v98) >= (signed int)pViewport->uViewportTL_Y; | |
825 v108 = SLODWORD(v98) >= (signed int)pViewport->uViewportTL_Y; | |
826 if ( v43 != v46 ) | |
827 { | |
828 v47 = v104; | |
829 if ( SLODWORD(v98) >= (signed int)pViewport->uViewportTL_Y ) | |
830 { | |
831 v48 = (v47 - *((float *)v45 - 4)) / (*((float *)v45 + 8) - *((float *)v45 - 4)); | |
832 *(float *)v44 = (*((float *)v45 + 7) - *((float *)v45 - 5)) * v48 + *((float *)v45 - 5); | |
833 *(float *)v134 = (*((float *)v45 + 9) - *((float *)v45 - 3)) * v48 + *((float *)v45 - 3); | |
834 v49 = (*((float *)v45 + 12) - *(float *)v45) * v48 + *(float *)v45; | |
835 } | |
836 else | |
837 { | |
838 v50 = (v47 - *((float *)v45 + 8)) / (*((float *)v45 - 4) - *((float *)v45 + 8)); | |
839 *(float *)v44 = (*((float *)v45 - 5) - *((float *)v45 + 7)) * v50 + *((float *)v45 + 7); | |
840 *(float *)v134 = (*((float *)v45 - 3) - *((float *)v45 + 9)) * v50 + *((float *)v45 + 9); | |
841 v49 = (*(float *)v45 - *((float *)v45 + 12)) * v50 + *((float *)v45 + 12); | |
842 } | |
843 *(float *)v125 = v49; | |
844 *(float *)v139 = v104; | |
845 if ( v43 ) | |
846 { | |
847 v51 = v104 + 6.7553994e15; | |
848 v52 = *((float *)v45 - 4) + 6.7553994e15; | |
849 if ( LODWORD(v51) == LODWORD(v52) ) | |
850 { | |
851 v53 = *(float *)v44 + 6.7553994e15; | |
852 v54 = *((float *)v45 - 5) + 6.7553994e15; | |
853 v55 = LODWORD(v53) == LODWORD(v54); | |
854 goto LABEL_58; | |
855 } | |
856 goto LABEL_59; | |
857 } | |
858 v56 = v104 + 6.7553994e15; | |
859 v57 = *((float *)v45 + 8) + 6.7553994e15; | |
860 if ( LODWORD(v56) != LODWORD(v57) ) | |
861 goto LABEL_59; | |
862 v58 = *(float *)v44 + 6.7553994e15; | |
863 v59 = *((float *)v45 + 7) + 6.7553994e15; | |
864 v55 = LODWORD(v58) == LODWORD(v59); | |
865 LABEL_58: | |
866 if ( !v55 ) | |
867 { | |
868 LABEL_59: | |
869 v139 += 48; | |
870 v125 += 48; | |
871 v134 += 48; | |
872 v44 += 48; | |
873 ++v123; | |
874 ++v130; | |
875 v119 = v44; | |
876 } | |
877 } | |
878 if ( v46 ) | |
879 { | |
880 v60 = v130; | |
881 v119 += 48; | |
882 ++v123; | |
883 v134 += 48; | |
884 v125 += 48; | |
885 v139 += 48; | |
886 ++v130; | |
887 memcpy(v60, v45 + 4, 0x30u); | |
888 v44 = v119; | |
889 } | |
890 v43 = v108; | |
891 v45 += 48; | |
892 --v112; | |
893 if ( v112 ) | |
894 continue; | |
895 break; | |
896 } | |
897 if ( v123 < 3 | |
898 || (v116 = 0, | |
899 memcpy(&array_508FF0[v123], array_508FF0, sizeof(array_508FF0[v123])), | |
900 v61 = array_508FF0[0].vWorldViewProjY + 6.7553994e15, | |
901 v62 = SLODWORD(v61) <= (signed int)pViewport->uViewportBR_Y, | |
902 v123 < 1) ) | |
903 goto LABEL_112; | |
904 v63 = (char *)&array_508690[0].vWorldViewProjX; | |
905 v131 = array_508690; | |
906 v120 = (char *)&array_508690[0].vWorldViewProjX; | |
907 v140 = (char *)&array_508690[0].vWorldViewProjY; | |
908 v126 = (char *)&array_508690[0].flt_2C; | |
909 v135 = (char *)&array_508690[0]._rhw; | |
910 v64 = (char *)&array_508FF0[0].flt_2C; | |
911 v113 = v123; | |
912 while ( 2 ) | |
913 { | |
914 v99 = *((float *)v64 + 8) + 6.7553994e15; | |
915 v65 = SLODWORD(v99) <= (signed int)pViewport->uViewportBR_Y; | |
916 v109 = SLODWORD(v99) <= (signed int)pViewport->uViewportBR_Y; | |
917 if ( v62 != v65 ) | |
918 { | |
919 v66 = v102; | |
920 if ( SLODWORD(v99) <= (signed int)pViewport->uViewportBR_Y ) | |
921 { | |
922 v67 = (v66 - *((float *)v64 - 4)) / (*((float *)v64 + 8) - *((float *)v64 - 4)); | |
923 *(float *)v63 = (*((float *)v64 + 7) - *((float *)v64 - 5)) * v67 + *((float *)v64 - 5); | |
924 *(float *)v135 = (*((float *)v64 + 9) - *((float *)v64 - 3)) * v67 + *((float *)v64 - 3); | |
925 v68 = (*((float *)v64 + 12) - *(float *)v64) * v67 + *(float *)v64; | |
926 } | |
927 else | |
928 { | |
929 v69 = (v66 - *((float *)v64 + 8)) / (*((float *)v64 - 4) - *((float *)v64 + 8)); | |
930 *(float *)v63 = (*((float *)v64 - 5) - *((float *)v64 + 7)) * v69 + *((float *)v64 + 7); | |
931 *(float *)v135 = (*((float *)v64 - 3) - *((float *)v64 + 9)) * v69 + *((float *)v64 + 9); | |
932 v68 = (*(float *)v64 - *((float *)v64 + 12)) * v69 + *((float *)v64 + 12); | |
933 } | |
934 *(float *)v126 = v68; | |
935 *(float *)v140 = v102; | |
936 if ( v62 ) | |
937 { | |
938 v70 = v102 + 6.7553994e15; | |
939 v71 = *((float *)v64 - 4) + 6.7553994e15; | |
940 if ( LODWORD(v70) == LODWORD(v71) ) | |
941 { | |
942 v72 = *(float *)v63 + 6.7553994e15; | |
943 v73 = *((float *)v64 - 5) + 6.7553994e15; | |
944 v74 = LODWORD(v72) == LODWORD(v73); | |
945 goto LABEL_75; | |
946 } | |
947 goto LABEL_76; | |
948 } | |
949 v75 = v102 + 6.7553994e15; | |
950 v76 = *((float *)v64 + 8) + 6.7553994e15; | |
951 if ( LODWORD(v75) != LODWORD(v76) ) | |
952 goto LABEL_76; | |
953 v77 = *(float *)v63 + 6.7553994e15; | |
954 v78 = *((float *)v64 + 7) + 6.7553994e15; | |
955 v74 = LODWORD(v77) == LODWORD(v78); | |
956 LABEL_75: | |
957 if ( !v74 ) | |
958 { | |
959 LABEL_76: | |
960 v140 += 48; | |
961 v126 += 48; | |
962 v135 += 48; | |
963 v63 += 48; | |
964 ++v116; | |
965 ++v131; | |
966 v120 = v63; | |
967 } | |
968 } | |
969 if ( v65 ) | |
970 { | |
971 v79 = v131; | |
972 v120 += 48; | |
973 ++v116; | |
974 v135 += 48; | |
975 v126 += 48; | |
976 v140 += 48; | |
977 ++v131; | |
978 memcpy(v79, v64 + 4, 0x30u); | |
979 v63 = v120; | |
980 } | |
981 v62 = v109; | |
982 v64 += 48; | |
983 --v113; | |
984 if ( v113 ) | |
985 continue; | |
986 break; | |
987 } | |
988 if ( v116 < 3 ) | |
989 goto LABEL_112; | |
990 v80 = v116; | |
991 memcpy(&array_508690[v116], array_508690, sizeof(array_508690[v116])); | |
992 if ( v116 > 0 ) | |
993 { | |
994 v81 = (char *)&array_508690[0].vWorldViewProjX; | |
995 v82 = v116; | |
996 do | |
997 { | |
998 LODWORD(v83) = *(int *)v81; | |
999 *((float *)v81 - 3) = 1.0 / *((float *)v81 + 2); | |
1000 v84 = v83 + 6.7553994e15; | |
1001 if ( SLODWORD(v84) <= (signed int)pViewport->uViewportBR_X ) | |
1002 { | |
1003 v86 = *(float *)v81 + 6.7553994e15; | |
1004 if ( SLODWORD(v86) >= (signed int)pViewport->uViewportTL_X ) | |
1005 goto LABEL_88; | |
1006 v85 = v101; | |
1007 } | |
1008 else | |
1009 { | |
1010 v85 = v100; | |
1011 } | |
1012 *(int *)v81 = LODWORD(v85); | |
1013 LABEL_88: | |
1014 v87 = *((float *)v81 + 1) + 6.7553994e15; | |
1015 if ( SLODWORD(v87) > (signed int)pViewport->uViewportBR_Y ) | |
1016 { | |
1017 v88 = v102; | |
1018 LABEL_92: | |
1019 *((int *)v81 + 1) = LODWORD(v88); | |
1020 goto LABEL_93; | |
1021 } | |
1022 v89 = *((float *)v81 + 1) + 6.7553994e15; | |
1023 if ( SLODWORD(v89) < (signed int)pViewport->uViewportTL_Y ) | |
1024 { | |
1025 v88 = v104; | |
1026 goto LABEL_92; | |
1027 } | |
1028 LABEL_93: | |
1029 v81 += 48; | |
1030 --v82; | |
1031 } | |
1032 while ( v82 ); | |
1033 } | |
1034 v91 = __OFSUB__(v116, 3); | |
1035 v90 = v116 - 3 < 0; | |
1036 if ( v116 > 3 ) | |
1037 { | |
1038 memcpy(&array_508690[v116 + 1], &array_508690[1], sizeof(array_508690[v116 + 1])); | |
1039 if ( v116 > 0 ) | |
1040 { | |
1041 v105 = 1; | |
1042 do | |
1043 { | |
1044 v92 = v105; | |
1045 v93 = v105 - 1; | |
1046 v94 = v105 + 1; | |
1047 v95 = v105 + 1; | |
1048 if ( v105 - 1 >= v80 ) | |
1049 v93 -= v80; | |
1050 if ( v105 >= v80 ) | |
1051 v92 = v105 - v80; | |
1052 if ( v94 >= v80 ) | |
1053 v95 = v94 - v80; | |
1054 if ( (array_508690[v92].vWorldViewProjX - array_508690[v93].vWorldViewProjX) | |
1055 * (array_508690[v95].vWorldViewProjY - array_508690[v93].vWorldViewProjY) | |
1056 - (array_508690[v95].vWorldViewProjX - array_508690[v93].vWorldViewProjX) | |
1057 * (array_508690[v92].vWorldViewProjY - array_508690[v93].vWorldViewProjY) < 0.0 ) | |
1058 { | |
1059 ++v105; | |
1060 } | |
1061 else | |
1062 { | |
1063 v96 = v105; | |
1064 if ( v105 < v80 || (v96 = v105 - v80, v105 - v80 < v80) ) | |
1065 memcpy(&array_508690[v96], &array_508690[v96 + 1], 4 * ((unsigned int)(48 * v80 - 48 * v96) >> 2)); | |
1066 --v80; | |
1067 } | |
1068 } | |
1069 while ( v105 - 1 < v80 ); | |
1070 } | |
1071 v91 = __OFSUB__(v80, 3); | |
1072 v90 = v80 - 3 < 0; | |
1073 } | |
1074 if ( v90 ^ v91 ) | |
1075 LABEL_112: | |
1076 result = 0; | |
1077 else | |
1078 result = v80; | |
1079 return result; | |
1080 } | |
1081 | |
1082 //----- (0042620A) -------------------------------------------------------- | 191 //----- (0042620A) -------------------------------------------------------- |
1083 bool __thiscall sr_42620A(RenderVertexSoft *p) | 192 bool sr_42620A(RenderVertexSoft *p) |
1084 { | 193 { |
1085 __int16 v1; // fps@1 | 194 __int16 v1; // fps@1 |
1086 unsigned __int8 v2; // c0@2 | 195 unsigned __int8 v2; // c0@2 |
1087 char v3; // c2@2 | 196 char v3; // c2@2 |
1088 unsigned __int8 v4; // c3@2 | 197 unsigned __int8 v4; // c3@2 |