Mercurial > mm7
comparison mm7_6.cpp @ 693:e0a1fccc89b1
map render fixes
author | Gloval |
---|---|
date | Sun, 17 Mar 2013 01:50:34 +0400 |
parents | 066e2b29b30f |
children | 735dab8d3c9a f39d5902c85a |
comparison
equal
deleted
inserted
replaced
692:066e2b29b30f | 693:e0a1fccc89b1 |
---|---|
682 char *v137; // [sp+D4h] [bp-4h]@13 | 682 char *v137; // [sp+D4h] [bp-4h]@13 |
683 RenderVertexSoft *v138; // [sp+D4h] [bp-4h]@30 | 683 RenderVertexSoft *v138; // [sp+D4h] [bp-4h]@30 |
684 char *v139; // [sp+D4h] [bp-4h]@48 | 684 char *v139; // [sp+D4h] [bp-4h]@48 |
685 char *v140; // [sp+D4h] [bp-4h]@65 | 685 char *v140; // [sp+D4h] [bp-4h]@65 |
686 | 686 |
687 v101 = (double)(signed int)pViewport->uViewportX; | 687 v101 = (double)(signed int)pViewport->uViewportTL_X; |
688 v100 = (double)(signed int)pViewport->uViewportZ; | 688 v100 = (double)(signed int)pViewport->uViewportBR_X; |
689 v117 = a1; | 689 v117 = a1; |
690 v136 = 1; | 690 v136 = 1; |
691 v104 = (double)(signed int)pViewport->uViewportY; | 691 v104 = (double)(signed int)pViewport->uViewportTL_Y; |
692 v102 = (double)(pViewport->uViewportW + 1); | 692 v102 = (double)(pViewport->uViewportBR_Y + 1); |
693 if ( a1 <= 0 ) | 693 if ( a1 <= 0 ) |
694 return v117; | 694 return v117; |
695 v127 = a1; | 695 v127 = a1; |
696 v1 = a1; | 696 v1 = a1; |
697 memcpy(array_508690, array_50AC10, 4 * ((unsigned int)(48 * a1) >> 2)); | 697 memcpy(array_508690, array_50AC10, 4 * ((unsigned int)(48 * a1) >> 2)); |
709 if ( v136 ) | 709 if ( v136 ) |
710 return v117; | 710 return v117; |
711 v110 = 0; | 711 v110 = 0; |
712 memcpy(&array_50AC10[v1], array_50AC10, sizeof(array_50AC10[v1])); | 712 memcpy(&array_50AC10[v1], array_50AC10, sizeof(array_50AC10[v1])); |
713 v4 = array_50AC10[0].vWorldViewProjX + 6.7553994e15; | 713 v4 = array_50AC10[0].vWorldViewProjX + 6.7553994e15; |
714 v5 = SLODWORD(v4) >= (signed int)pViewport->uViewportX; | 714 v5 = SLODWORD(v4) >= (signed int)pViewport->uViewportTL_X; |
715 if ( v117 < 1 ) | 715 if ( v117 < 1 ) |
716 goto LABEL_112; | 716 goto LABEL_112; |
717 v6 = (char *)&array_50A2B0[0].vWorldViewProjY; | 717 v6 = (char *)&array_50A2B0[0].vWorldViewProjY; |
718 v132 = array_50A2B0; | 718 v132 = array_50A2B0; |
719 v137 = (char *)&array_50A2B0[0].vWorldViewProjX; | 719 v137 = (char *)&array_50A2B0[0].vWorldViewProjX; |
722 v114 = (char *)&array_50A2B0[0]._rhw; | 722 v114 = (char *)&array_50A2B0[0]._rhw; |
723 v7 = (char *)&array_50AC10[0].flt_2C; | 723 v7 = (char *)&array_50AC10[0].flt_2C; |
724 do | 724 do |
725 { | 725 { |
726 v103 = *((float *)v7 + 7) + 6.7553994e15; | 726 v103 = *((float *)v7 + 7) + 6.7553994e15; |
727 v106 = SLODWORD(v103) >= (signed int)pViewport->uViewportX; | 727 v106 = SLODWORD(v103) >= (signed int)pViewport->uViewportTL_X; |
728 if ( !(v5 ^ v106) ) | 728 if ( !(v5 ^ v106) ) |
729 goto LABEL_25; | 729 goto LABEL_25; |
730 v8 = v101; | 730 v8 = v101; |
731 if ( SLODWORD(v103) >= (signed int)pViewport->uViewportX ) | 731 if ( SLODWORD(v103) >= (signed int)pViewport->uViewportTL_X ) |
732 { | 732 { |
733 v9 = (v8 - *((float *)v7 - 5)) / (*((float *)v7 + 7) - *((float *)v7 - 5)); | 733 v9 = (v8 - *((float *)v7 - 5)) / (*((float *)v7 + 7) - *((float *)v7 - 5)); |
734 *(float *)v6 = (*((float *)v7 + 8) - *((float *)v7 - 4)) * v9 + *((float *)v7 - 4); | 734 *(float *)v6 = (*((float *)v7 + 8) - *((float *)v7 - 4)) * v9 + *((float *)v7 - 4); |
735 *(float *)v114 = (*((float *)v7 + 9) - *((float *)v7 - 3)) * v9 + *((float *)v7 - 3); | 735 *(float *)v114 = (*((float *)v7 + 9) - *((float *)v7 - 3)) * v9 + *((float *)v7 - 3); |
736 v10 = (*((float *)v7 + 12) - *(float *)v7) * v9 + *(float *)v7; | 736 v10 = (*((float *)v7 + 12) - *(float *)v7) * v9 + *(float *)v7; |
800 while ( v117 ); | 800 while ( v117 ); |
801 if ( v110 < 3 | 801 if ( v110 < 3 |
802 || (v115 = 0, | 802 || (v115 = 0, |
803 memcpy(&array_50A2B0[v110], array_50A2B0, sizeof(array_50A2B0[v110])), | 803 memcpy(&array_50A2B0[v110], array_50A2B0, sizeof(array_50A2B0[v110])), |
804 v23 = array_50A2B0[0].vWorldViewProjX + 6.7553994e15, | 804 v23 = array_50A2B0[0].vWorldViewProjX + 6.7553994e15, |
805 v24 = SLODWORD(v23) <= (signed int)pViewport->uViewportZ, | 805 v24 = SLODWORD(v23) <= (signed int)pViewport->uViewportBR_X, |
806 v110 < 1) ) | 806 v110 < 1) ) |
807 goto LABEL_112; | 807 goto LABEL_112; |
808 v25 = (char *)&array_509950[0]._rhw; | 808 v25 = (char *)&array_509950[0]._rhw; |
809 v138 = array_509950; | 809 v138 = array_509950; |
810 v129 = (char *)&array_50A2B0[0].vWorldViewProjX; | 810 v129 = (char *)&array_50A2B0[0].vWorldViewProjX; |
815 v111 = (char *)&array_509950[0]._rhw; | 815 v111 = (char *)&array_509950[0]._rhw; |
816 v26 = (char *)&array_50A2B0[0].flt_2C; | 816 v26 = (char *)&array_50A2B0[0].flt_2C; |
817 while ( 2 ) | 817 while ( 2 ) |
818 { | 818 { |
819 v97 = *((float *)v26 + 7) + 6.7553994e15; | 819 v97 = *((float *)v26 + 7) + 6.7553994e15; |
820 v27 = SLODWORD(v97) <= (signed int)pViewport->uViewportZ; | 820 v27 = SLODWORD(v97) <= (signed int)pViewport->uViewportBR_X; |
821 v107 = SLODWORD(v97) <= (signed int)pViewport->uViewportZ; | 821 v107 = SLODWORD(v97) <= (signed int)pViewport->uViewportBR_X; |
822 if ( v24 != v27 ) | 822 if ( v24 != v27 ) |
823 { | 823 { |
824 v28 = v100; | 824 v28 = v100; |
825 if ( SLODWORD(v97) <= (signed int)pViewport->uViewportZ ) | 825 if ( SLODWORD(v97) <= (signed int)pViewport->uViewportBR_X ) |
826 { | 826 { |
827 v29 = (v28 - *((float *)v26 - 5)) / (*((float *)v26 + 7) - *((float *)v26 - 5)); | 827 v29 = (v28 - *((float *)v26 - 5)) / (*((float *)v26 + 7) - *((float *)v26 - 5)); |
828 *(float *)v122 = (*((float *)v26 + 8) - *((float *)v26 - 4)) * v29 + *((float *)v26 - 4); | 828 *(float *)v122 = (*((float *)v26 + 8) - *((float *)v26 - 4)) * v29 + *((float *)v26 - 4); |
829 *(float *)v25 = (*((float *)v26 + 9) - *((float *)v26 - 3)) * v29 + *((float *)v26 - 3); | 829 *(float *)v25 = (*((float *)v26 + 9) - *((float *)v26 - 3)) * v29 + *((float *)v26 - 3); |
830 v30 = (*((float *)v26 + 12) - *(float *)v26) * v29 + *(float *)v26; | 830 v30 = (*((float *)v26 + 12) - *(float *)v26) * v29 + *(float *)v26; |
897 } | 897 } |
898 if ( v115 < 3 | 898 if ( v115 < 3 |
899 || (v123 = 0, | 899 || (v123 = 0, |
900 memcpy(&array_509950[v115], array_509950, sizeof(array_509950[v115])), | 900 memcpy(&array_509950[v115], array_509950, sizeof(array_509950[v115])), |
901 v42 = array_509950[0].vWorldViewProjY + 6.7553994e15, | 901 v42 = array_509950[0].vWorldViewProjY + 6.7553994e15, |
902 v43 = SLODWORD(v42) >= (signed int)pViewport->uViewportY, | 902 v43 = SLODWORD(v42) >= (signed int)pViewport->uViewportTL_Y, |
903 v115 < 1) ) | 903 v115 < 1) ) |
904 goto LABEL_112; | 904 goto LABEL_112; |
905 v44 = (char *)&array_508FF0[0].vWorldViewProjX; | 905 v44 = (char *)&array_508FF0[0].vWorldViewProjX; |
906 v130 = array_508FF0; | 906 v130 = array_508FF0; |
907 v119 = (char *)&array_508FF0[0].vWorldViewProjX; | 907 v119 = (char *)&array_508FF0[0].vWorldViewProjX; |
911 v45 = (char *)&array_509950[0].flt_2C; | 911 v45 = (char *)&array_509950[0].flt_2C; |
912 v112 = v115; | 912 v112 = v115; |
913 while ( 2 ) | 913 while ( 2 ) |
914 { | 914 { |
915 v98 = *((float *)v45 + 8) + 6.7553994e15; | 915 v98 = *((float *)v45 + 8) + 6.7553994e15; |
916 v46 = SLODWORD(v98) >= (signed int)pViewport->uViewportY; | 916 v46 = SLODWORD(v98) >= (signed int)pViewport->uViewportTL_Y; |
917 v108 = SLODWORD(v98) >= (signed int)pViewport->uViewportY; | 917 v108 = SLODWORD(v98) >= (signed int)pViewport->uViewportTL_Y; |
918 if ( v43 != v46 ) | 918 if ( v43 != v46 ) |
919 { | 919 { |
920 v47 = v104; | 920 v47 = v104; |
921 if ( SLODWORD(v98) >= (signed int)pViewport->uViewportY ) | 921 if ( SLODWORD(v98) >= (signed int)pViewport->uViewportTL_Y ) |
922 { | 922 { |
923 v48 = (v47 - *((float *)v45 - 4)) / (*((float *)v45 + 8) - *((float *)v45 - 4)); | 923 v48 = (v47 - *((float *)v45 - 4)) / (*((float *)v45 + 8) - *((float *)v45 - 4)); |
924 *(float *)v44 = (*((float *)v45 + 7) - *((float *)v45 - 5)) * v48 + *((float *)v45 - 5); | 924 *(float *)v44 = (*((float *)v45 + 7) - *((float *)v45 - 5)) * v48 + *((float *)v45 - 5); |
925 *(float *)v134 = (*((float *)v45 + 9) - *((float *)v45 - 3)) * v48 + *((float *)v45 - 3); | 925 *(float *)v134 = (*((float *)v45 + 9) - *((float *)v45 - 3)) * v48 + *((float *)v45 - 3); |
926 v49 = (*((float *)v45 + 12) - *(float *)v45) * v48 + *(float *)v45; | 926 v49 = (*((float *)v45 + 12) - *(float *)v45) * v48 + *(float *)v45; |
988 } | 988 } |
989 if ( v123 < 3 | 989 if ( v123 < 3 |
990 || (v116 = 0, | 990 || (v116 = 0, |
991 memcpy(&array_508FF0[v123], array_508FF0, sizeof(array_508FF0[v123])), | 991 memcpy(&array_508FF0[v123], array_508FF0, sizeof(array_508FF0[v123])), |
992 v61 = array_508FF0[0].vWorldViewProjY + 6.7553994e15, | 992 v61 = array_508FF0[0].vWorldViewProjY + 6.7553994e15, |
993 v62 = SLODWORD(v61) <= (signed int)pViewport->uViewportW, | 993 v62 = SLODWORD(v61) <= (signed int)pViewport->uViewportBR_Y, |
994 v123 < 1) ) | 994 v123 < 1) ) |
995 goto LABEL_112; | 995 goto LABEL_112; |
996 v63 = (char *)&array_508690[0].vWorldViewProjX; | 996 v63 = (char *)&array_508690[0].vWorldViewProjX; |
997 v131 = array_508690; | 997 v131 = array_508690; |
998 v120 = (char *)&array_508690[0].vWorldViewProjX; | 998 v120 = (char *)&array_508690[0].vWorldViewProjX; |
1002 v64 = (char *)&array_508FF0[0].flt_2C; | 1002 v64 = (char *)&array_508FF0[0].flt_2C; |
1003 v113 = v123; | 1003 v113 = v123; |
1004 while ( 2 ) | 1004 while ( 2 ) |
1005 { | 1005 { |
1006 v99 = *((float *)v64 + 8) + 6.7553994e15; | 1006 v99 = *((float *)v64 + 8) + 6.7553994e15; |
1007 v65 = SLODWORD(v99) <= (signed int)pViewport->uViewportW; | 1007 v65 = SLODWORD(v99) <= (signed int)pViewport->uViewportBR_Y; |
1008 v109 = SLODWORD(v99) <= (signed int)pViewport->uViewportW; | 1008 v109 = SLODWORD(v99) <= (signed int)pViewport->uViewportBR_Y; |
1009 if ( v62 != v65 ) | 1009 if ( v62 != v65 ) |
1010 { | 1010 { |
1011 v66 = v102; | 1011 v66 = v102; |
1012 if ( SLODWORD(v99) <= (signed int)pViewport->uViewportW ) | 1012 if ( SLODWORD(v99) <= (signed int)pViewport->uViewportBR_Y ) |
1013 { | 1013 { |
1014 v67 = (v66 - *((float *)v64 - 4)) / (*((float *)v64 + 8) - *((float *)v64 - 4)); | 1014 v67 = (v66 - *((float *)v64 - 4)) / (*((float *)v64 + 8) - *((float *)v64 - 4)); |
1015 *(float *)v63 = (*((float *)v64 + 7) - *((float *)v64 - 5)) * v67 + *((float *)v64 - 5); | 1015 *(float *)v63 = (*((float *)v64 + 7) - *((float *)v64 - 5)) * v67 + *((float *)v64 - 5); |
1016 *(float *)v135 = (*((float *)v64 + 9) - *((float *)v64 - 3)) * v67 + *((float *)v64 - 3); | 1016 *(float *)v135 = (*((float *)v64 + 9) - *((float *)v64 - 3)) * v67 + *((float *)v64 - 3); |
1017 v68 = (*((float *)v64 + 12) - *(float *)v64) * v67 + *(float *)v64; | 1017 v68 = (*((float *)v64 + 12) - *(float *)v64) * v67 + *(float *)v64; |
1088 do | 1088 do |
1089 { | 1089 { |
1090 LODWORD(v83) = *(int *)v81; | 1090 LODWORD(v83) = *(int *)v81; |
1091 *((float *)v81 - 3) = 1.0 / *((float *)v81 + 2); | 1091 *((float *)v81 - 3) = 1.0 / *((float *)v81 + 2); |
1092 v84 = v83 + 6.7553994e15; | 1092 v84 = v83 + 6.7553994e15; |
1093 if ( SLODWORD(v84) <= (signed int)pViewport->uViewportZ ) | 1093 if ( SLODWORD(v84) <= (signed int)pViewport->uViewportBR_X ) |
1094 { | 1094 { |
1095 v86 = *(float *)v81 + 6.7553994e15; | 1095 v86 = *(float *)v81 + 6.7553994e15; |
1096 if ( SLODWORD(v86) >= (signed int)pViewport->uViewportX ) | 1096 if ( SLODWORD(v86) >= (signed int)pViewport->uViewportTL_X ) |
1097 goto LABEL_88; | 1097 goto LABEL_88; |
1098 v85 = v101; | 1098 v85 = v101; |
1099 } | 1099 } |
1100 else | 1100 else |
1101 { | 1101 { |
1102 v85 = v100; | 1102 v85 = v100; |
1103 } | 1103 } |
1104 *(int *)v81 = LODWORD(v85); | 1104 *(int *)v81 = LODWORD(v85); |
1105 LABEL_88: | 1105 LABEL_88: |
1106 v87 = *((float *)v81 + 1) + 6.7553994e15; | 1106 v87 = *((float *)v81 + 1) + 6.7553994e15; |
1107 if ( SLODWORD(v87) > (signed int)pViewport->uViewportW ) | 1107 if ( SLODWORD(v87) > (signed int)pViewport->uViewportBR_Y ) |
1108 { | 1108 { |
1109 v88 = v102; | 1109 v88 = v102; |
1110 LABEL_92: | 1110 LABEL_92: |
1111 *((int *)v81 + 1) = LODWORD(v88); | 1111 *((int *)v81 + 1) = LODWORD(v88); |
1112 goto LABEL_93; | 1112 goto LABEL_93; |
1113 } | 1113 } |
1114 v89 = *((float *)v81 + 1) + 6.7553994e15; | 1114 v89 = *((float *)v81 + 1) + 6.7553994e15; |
1115 if ( SLODWORD(v89) < (signed int)pViewport->uViewportY ) | 1115 if ( SLODWORD(v89) < (signed int)pViewport->uViewportTL_Y ) |
1116 { | 1116 { |
1117 v88 = v104; | 1117 v88 = v104; |
1118 goto LABEL_92; | 1118 goto LABEL_92; |
1119 } | 1119 } |
1120 LABEL_93: | 1120 LABEL_93: |