comparison Indoor.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 613c77e51e38
children 8ea496564034
comparison
equal deleted inserted replaced
1390:613c77e51e38 1391:cc9a3a24d61d
312 IndoorLocation::ExecDraw_d3d(pBspRenderer->faces[i].uFaceID, pBspRenderer->nodes[pBspRenderer->faces[i].uNodeID].std__vector_0007AC, 4, pBspRenderer->nodes[pBspRenderer->faces[i].uNodeID].pPortalBounding); 312 IndoorLocation::ExecDraw_d3d(pBspRenderer->faces[i].uFaceID, pBspRenderer->nodes[pBspRenderer->faces[i].uNodeID].std__vector_0007AC, 4, pBspRenderer->nodes[pBspRenderer->faces[i].uNodeID].pPortalBounding);
313 } 313 }
314 } 314 }
315 else for (uint j = 0; j < pBspRenderer->num_faces; ++j ) 315 else for (uint j = 0; j < pBspRenderer->num_faces; ++j )
316 { 316 {
317 pBLVRenderParams->field_7C = &pBspRenderer->nodes[pBspRenderer->faces[j].uNodeID].PortalScreenData; 317 __debugbreak(); // no SW
318 IndoorLocation::ExecDraw_sw(pBspRenderer->faces[j].uFaceID); 318 //pBLVRenderParams->field_7C = &pBspRenderer->nodes[pBspRenderer->faces[j].uNodeID].PortalScreenData;
319 //IndoorLocation::ExecDraw_sw(pBspRenderer->faces[j].uFaceID);
319 } 320 }
320 } 321 }
321 322
322 //----- (00440BED) -------------------------------------------------------- 323 //----- (00440BED) --------------------------------------------------------
323 void __fastcall sub_440BED(IndoorLocation_drawstru *_this) 324 void __fastcall sub_440BED(IndoorLocation_drawstru *_this)
596 } 597 }
597 } 598 }
598 } 599 }
599 } 600 }
600 601
601 //----- (004AFF79) --------------------------------------------------------
602 void IndoorLocation::ExecDraw_sw(unsigned int uFaceID)
603 {
604 unsigned int v1; // ebx@1
605 BLVFace *v2; // esi@3
606 unsigned int v3; // eax@3
607 Texture *v4; // eax@8
608 Texture *v5; // edi@8
609 int v6; // eax@9
610 int v7; // eax@9
611 int v8; // ecx@17
612 int v9; // ebx@17
613 int v10; // eax@17
614 int v11; // esi@17
615 unsigned int v12; // eax@17
616 int j; // ecx@19
617 int v14; // edx@20
618 int v15; // eax@20
619 int v16; // edx@20
620 int i; // ebx@22
621 int v18; // ecx@23
622 int v19; // eax@23
623 int v20; // eax@23
624 int v21; // eax@24
625 unsigned __int8 *v22; // ecx@24
626 int v23; // ebx@24
627 int v24; // esi@25
628 int v25; // eax@28
629 unsigned __int16 *v26; // eax@28
630 unsigned int v27; // eax@29
631 int v28; // eax@30
632 char *v29; // esi@31
633 int v30; // eax@33
634 int v31; // eax@33
635 int v32; // eax@35
636 int v33; // edx@35
637 signed int v34; // ebx@35
638 int v35; // eax@35
639 int v36; // ebx@35
640 signed int v37; // ebx@35
641 signed int v38; // edi@35
642 unsigned int v39; // edi@36
643 int v40; // edx@40
644 int v41; // ecx@40
645 signed int v42; // edx@40
646 int v43; // edx@42
647 int v44; // eax@42
648 unsigned __int16 *v45; // eax@43
649 int *v46; // esi@44
650 unsigned __int16 *v47; // edi@44
651 unsigned int v48; // edx@44
652 int v49; // ebx@44
653 char v50; // cl@44
654 char v51; // ch@44
655 unsigned int v52; // ebx@46
656 int v53; // edx@46
657 unsigned int v54; // ebx@46
658 int v55; // edx@46
659 unsigned int v56; // ebx@47
660 int v57; // edx@47
661 int v58; // ebx@47
662 int v59; // edx@47
663 unsigned __int16 *v60; // eax@50
664 int *v61; // esi@51
665 unsigned __int16 *v62; // edi@51
666 unsigned int v63; // edx@51
667 int v64; // ebx@51
668 char v65; // cl@51
669 char v66; // ch@51
670 unsigned int v67; // ebx@53
671 int v68; // edx@53
672 unsigned int v69; // ebx@53
673 int v70; // edx@53
674 unsigned int v71; // ebx@54
675 int v72; // edx@54
676 int v73; // ebx@54
677 int v74; // edx@54
678 unsigned __int16 *v75; // eax@58
679 int *v76; // esi@59
680 int v77; // edi@59
681 unsigned int v78; // edx@59
682 int v79; // ebx@59
683 char v80; // cl@59
684 char v81; // ch@59
685 int v82; // ebx@61
686 int v83; // edx@61
687 unsigned int v84; // ebx@62
688 int v85; // edx@62
689 unsigned __int16 *v86; // eax@65
690 int *v87; // esi@66
691 int v88; // edi@66
692 unsigned int v89; // edx@66
693 int v90; // ebx@66
694 char v91; // cl@66
695 char v92; // ch@66
696 int v93; // ebx@68
697 int v94; // edx@68
698 unsigned __int16 v95; // bx@69
699 int v96; // edx@69
700 unsigned __int8 *v97; // [sp+Ch] [bp-9Ch]@24
701 unsigned __int8 *v98; // [sp+10h] [bp-98h]@24
702 unsigned __int8 *v99; // [sp+14h] [bp-94h]@24
703 unsigned __int8 *v100; // [sp+18h] [bp-90h]@24
704 int v101; // [sp+1Ch] [bp-8Ch]@40
705 int v102; // [sp+20h] [bp-88h]@31
706 BLVFace *v103; // [sp+24h] [bp-84h]@3
707 unsigned __int16 *v104; // [sp+28h] [bp-80h]@24
708 int v105; // [sp+2Ch] [bp-7Ch]@30
709 int v106; // [sp+30h] [bp-78h]@24
710 int v107; // [sp+34h] [bp-74h]@9
711 Texture *v108; // [sp+38h] [bp-70h]@8
712 int v109; // [sp+3Ch] [bp-6Ch]@9
713 unsigned int v110; // [sp+40h] [bp-68h]@24
714 unsigned int v111; // [sp+44h] [bp-64h]@1
715 int *k; // [sp+48h] [bp-60h]@31
716 int v113; // [sp+4Ch] [bp-5Ch]@35
717 int v114; // [sp+50h] [bp-58h]@35
718 int v115; // [sp+54h] [bp-54h]@42
719 unsigned __int8 *v116; // [sp+58h] [bp-50h]@35
720 int v117; // [sp+5Ch] [bp-4Ch]@33
721 int a1; // [sp+60h] [bp-48h]@27
722 int v119; // [sp+64h] [bp-44h]@17
723 int v120; // [sp+68h] [bp-40h]@23
724 unsigned int v121; // [sp+6Ch] [bp-3Ch]@40
725 unsigned int v122; // [sp+70h] [bp-38h]@35
726 int v123; // [sp+74h] [bp-34h]@30
727 int v124; // [sp+78h] [bp-30h]@17
728 int v125; // [sp+7Ch] [bp-2Ch]@35
729 unsigned int v126; // [sp+80h] [bp-28h]@9
730 int v127; // [sp+84h] [bp-24h]@17
731 int v128; // [sp+88h] [bp-20h]@9
732 int *pZPixel; // [sp+8Ch] [bp-1Ch]@28
733 int a2; // [sp+90h] [bp-18h]@16
734 unsigned int v131; // [sp+94h] [bp-14h]@17
735 unsigned __int16 *pColorPixel; // [sp+98h] [bp-10h]@28
736 int v133; // [sp+9Ch] [bp-Ch]@17
737 int v134; // [sp+A0h] [bp-8h]@17
738 int v135; // [sp+A4h] [bp-4h]@24
739
740 v1 = uFaceID;
741 v111 = pRenderer->uTargetSurfacePitch;
742 if ( (uFaceID & 0x80000000u) == 0 )
743 {
744 if ( (signed int)uFaceID < (signed int)pIndoor->uNumFaces )
745 {
746 v2 = &pIndoor->pFaces[uFaceID];
747 v103 = v2;
748 v3 = v2->uAttributes;
749 if ( !(BYTE1(v3) & 0x20) )
750 {
751 if ( v3 & 0x400000 )
752 {
753 sub_4ADD1D(uFaceID);
754 return;
755 }
756 if ( !(v3 & 0x10) || (sub_4AD504(uFaceID), pRenderer->pRenderD3D) )
757 {
758 v4 = v2->GetTexture();
759 ++pBLVRenderParams->uNumFacesRenderedThisFrame;
760 v5 = v4;
761 v108 = v4;
762 if ( v4 )
763 {
764 v6 = v4->palette_id2;
765 LOBYTE(v2->uAttributes) |= 0x80u;
766 v109 = v6;
767 sub_4AE5F1(v1);
768 v126 = stru_F8AD28.pDeltaUV[0];
769 v128 = stru_F8AD28.pDeltaUV[1];
770 v107 = bUseLoResSprites;
771 v7 = GetPortalScreenCoord(v1);
772 if ( v7 )
773 {
774 if ( PortalFrustrum(v7, &stru_F8A590, pBLVRenderParams->field_7C, v1) )
775 {
776 if ( v2->uPolygonType == 1 )
777 {
778 for ( i = 0; i < stru_F8AD28.uNumLightsApplied; stru_F8AD28._blv_lights_ys[v18] = v20 )
779 {
780 v18 = i;
781 v120 = stru_F8AD28._blv_lights_xs[i];
782 v134 = (unsigned __int64)(v120 * (signed __int64)-stru_F8AD28.plane_4.vNormal.y) >> 16;
783 v133 = stru_F8AD28.plane_4.vNormal.x;
784 v120 = stru_F8AD28._blv_lights_ys[i];
785 v133 = (unsigned __int64)(v120 * (signed __int64)stru_F8AD28.plane_4.vNormal.x) >> 16;
786 v19 = v128;
787 stru_F8AD28._blv_lights_xs[i] = v126
788 + v134
789 + ((unsigned __int64)(v120
790 * (signed __int64)stru_F8AD28.plane_4.vNormal.x) >> 16);
791 v20 = v19 - stru_F8AD28._blv_lights_zs[i++];
792 }
793 }
794 else
795 {
796 if ( v2->uPolygonType != 3 )
797 {
798 if ( v2->uPolygonType == 4 )
799 {
800 LABEL_16:
801 a2 = 0;
802 if ( stru_F8AD28.uNumLightsApplied > 0 )
803 {
804 do
805 {
806 v8 = a2;
807 v9 = stru_F8AD28._blv_lights_xs[a2];
808 v131 = stru_F8AD28._blv_lights_ys[a2];
809 v10 = stru_F8AD28._blv_lights_zs[a2];
810 v11 = (signed int)(v10 * stru_F8AD28.plane_4.vNormal.z
811 + stru_F8AD28.plane_4.dist
812 + v9 * stru_F8AD28.plane_4.vNormal.x
813 + v131 * stru_F8AD28.plane_4.vNormal.y) >> 16;
814 v119 = v9
815 - ((unsigned __int64)(stru_F8AD28.plane_4.vNormal.x
816 * (signed __int64)((signed int)(v10 * stru_F8AD28.plane_4.vNormal.z
817 + stru_F8AD28.plane_4.dist
818 + v9 * stru_F8AD28.plane_4.vNormal.x
819 + v131 * stru_F8AD28.plane_4.vNormal.y) >> 16)) >> 16);
820 v131 -= (unsigned __int64)(stru_F8AD28.plane_4.vNormal.y * (signed __int64)v11) >> 16;
821 v127 = v10 - ((unsigned __int64)(stru_F8AD28.plane_4.vNormal.z * (signed __int64)v11) >> 16);
822 stru_F8AD28._blv_lights_xs[a2] = ((unsigned __int64)(v119
823 * (signed __int64)stru_F8AD28.vec_14.x) >> 16)
824 + ((unsigned __int64)((signed int)v131
825 * (signed __int64)stru_F8AD28.vec_14.y) >> 16);
826 v124 = (unsigned __int64)(v119 * (signed __int64)stru_F8AD28.vec_20.x) >> 16;
827 v134 = (unsigned __int64)((signed int)v131 * (signed __int64)stru_F8AD28.vec_20.y) >> 16;
828 v133 = (unsigned __int64)(v127 * (signed __int64)stru_F8AD28.vec_20.z) >> 16;
829 v12 = v126;
830 stru_F8AD28._blv_lights_ys[v8] = v124
831 + ((unsigned __int64)((signed int)v131
832 * (signed __int64)stru_F8AD28.vec_20.y) >> 16)
833 + ((unsigned __int64)(v127
834 * (signed __int64)stru_F8AD28.vec_20.z) >> 16);
835 stru_F8AD28._blv_lights_xs[v8] += v12;
836 stru_F8AD28._blv_lights_ys[v8] += v128;
837 ++a2;
838 }
839 while ( a2 < stru_F8AD28.uNumLightsApplied );
840 v2 = v103;
841 }
842 goto LABEL_24;
843 }
844 if ( v2->uPolygonType != 5 )
845 {
846 if ( v2->uPolygonType != 6 )
847 goto LABEL_24;
848 goto LABEL_16;
849 }
850 }
851 for ( j = 0; j < stru_F8AD28.uNumLightsApplied; *(int *)v15 = v16 )
852 {
853 v14 = v128;
854 stru_F8AD28._blv_lights_xs[j] += v126;
855 v15 = 4 * j + 16297672;
856 v16 = v14 - stru_F8AD28._blv_lights_ys[j++];
857 }
858 }
859 LABEL_24:
860 v135 = 1;
861 pGame->_44ED0A(v2, &v135, 31);
862 v104 = sr_sub_47C24C_get_palette(v2, v109, 0, 1);
863 v134 = stru_F8AD28.field_44;
864 v106 = stru_F8AD28.field_48;
865 v21 = stru_F8A590._viewport_space_y;
866 a2 = stru_F8A590._viewport_space_y;
867 v110 = v111 * stru_F8A590._viewport_space_y;
868 v97 = v5->pLevelOfDetail0_prolly_alpha_mask;
869 v98 = v5->pLevelOfDetail1;
870 v99 = v5->pLevelOfDetail2;
871 v22 = v5->pLevelOfDetail3;
872 v23 = 640 * stru_F8A590._viewport_space_y;
873 v119 = 640 * stru_F8A590._viewport_space_y;
874 v100 = v22;
875 if ( stru_F8A590._viewport_space_y <= stru_F8A590._viewport_space_w )
876 {
877 v24 = 2 * stru_F8A590._viewport_space_y;
878 v120 = 2 * stru_F8A590._viewport_space_y;
879 while ( 1 )
880 {
881 a1 = *(__int16 *)((char *)stru_F8A590.viewport_left_side + v24);
882 sub_4AE313(a1, v21, &stru_F81018.field_0);
883 if ( LOBYTE(viewparams->field_20) )
884 {
885 v27 = v111 * (v24 - pBLVRenderParams->uViewportY);
886 pZPixel = &pBLVRenderParams->pTargetZBuffer[2
887 * (*(__int16 *)((char *)stru_F8A590.viewport_left_side + v24)
888 + 320 * (v24 - pBLVRenderParams->uViewportY))
889 - pBLVRenderParams->uViewportX];
890 pColorPixel = &pBLVRenderParams->pRenderTarget[v27
891 + 2 * *(__int16 *)((char *)stru_F8A590.viewport_left_side + v24)
892 - pBLVRenderParams->uViewportX];
893 v26 = &pBLVRenderParams->pRenderTarget[v27
894 + 2 * *(__int16 *)((char *)stru_F8A590.viewport_right_side + v24)
895 - pBLVRenderParams->uViewportX];
896 v23 = v119;
897 }
898 else
899 {
900 v25 = *(__int16 *)((char *)stru_F8A590.viewport_left_side + v24);
901 pZPixel = &pBLVRenderParams->pTargetZBuffer[v25 + v23];
902 pColorPixel = &pBLVRenderParams->pRenderTarget[v25 + v110];
903 v26 = &pBLVRenderParams->pRenderTarget[v110 + *(__int16 *)((char *)stru_F8A590.viewport_right_side + v24)];
904 }
905 v131 = (unsigned int)v26;
906 HIWORD(v28) = HIWORD(stru_F81018.field_0.field_0);
907 LOWORD(v28) = 0;
908 v105 = stru_F8AD28.field_0 | v28;
909 v123 = sub_4AE491(SHIWORD(stru_F81018.field_0.field_4), SHIWORD(stru_F81018.field_0.field_8));
910 if ( (unsigned int)pColorPixel < v131 )
911 {
912 v102 = v107 + v106;
913 v29 = (char *)&stru_F81018.field_34.field_8;
914 a1 += v134;
915 for ( k = &stru_F81018.field_34.field_8; ; v29 = (char *)k )
916 {
917 sub_4AE313(a1, a2, (stru337_stru0 *)(v29 - 8));
918 v30 = *((int *)v29 - 2);
919 LOWORD(v30) = 0;
920 v117 = v105;
921 v31 = stru_F8AD28.field_0 | v30;
922 if ( v105 <= (unsigned int)v31 )
923 v117 = v31;
924 v105 = v31;
925 v32 = *((int *)v29 - 14);
926 v122 = *((int *)v29 - 14) >> v107;
927 v33 = *((int *)v29 - 13);
928 v125 = *((int *)v29 - 13) >> v107;
929 v34 = *((int *)v29 - 1) - v32;
930 v113 = (*(int *)v29 - v33) >> v102;
931 v35 = *((int *)v29 - 11);
932 v114 = v34 >> v102;
933 v116 = (&v97)[4 * v35];
934 v36 = v35 + 16 - v5->uWidthLn2;
935 v133 = v35 + 16;
936 v127 = v35 + v36;
937 v37 = v5->uWidthMinus1 >> v35;
938 v38 = v5->uHeightMinus1 >> v35 << (v35 + 16);
939 v128 = v37;
940 v126 = v38;
941 v39 = (unsigned int)(LOBYTE(viewparams->field_20) ? &pColorPixel[2 * v134] : &pColorPixel[v134]);
942 if ( v39 > v131 )
943 v39 = v131;
944 v40 = *((short *)v29 + 1);
945 v41 = *((short *)v29 - 1);
946 v121 = v39;
947 v42 = sub_4AE491(v41, v40);
948 v101 = v42;
949 v124 = (signed int)(v39 - (int)pColorPixel) >> 1;
950 if ( v123 >> 16 == v42 >> 16 || v135 & 2 )
951 {
952 v123 = (int)sr_sub_47C24C_get_palette(v103, v109, v123 >> 16, 1);
953 if ( LOBYTE(viewparams->field_20) )
954 {
955 v86 = pColorPixel;
956 if ( (unsigned int)pColorPixel < v121 )
957 {
958 v87 = pZPixel;
959 v88 = v123;
960 v89 = v122;
961 v90 = v125;
962 v91 = v133;
963 v92 = v127;
964 if ( v124 & 2 )
965 {
966 *pZPixel = v117;
967 v87 -= 2;
968 v86 = pColorPixel + 2;
969 goto LABEL_69;
970 }
971 do
972 {
973 v86 += 4;
974 v93 = *(&v116[v128 & (v89 >> v91)] + ((v126 & v90) >> v92));
975 v94 = v117;
976 LOWORD(v93) = *(short *)(v88 + 2 * v93);
977 *v87 = v117;
978 v87[1] = v94;
979 v87[640] = v94;
980 v87[641] = v94;
981 *(v86 - 4) = v93;
982 *(v86 - 3) = v93;
983 v86[636] = v93;
984 v86[637] = v93;
985 v87[2] = v94;
986 v87[3] = v94;
987 v87[642] = v94;
988 v87[643] = v94;
989 v122 += v114;
990 v125 += v113;
991 v89 = v122;
992 v90 = v125;
993 LABEL_69:
994 v87 += 4;
995 v95 = *(short *)(v88 + 2 * *(&v116[v128 & (v89 >> v91)] + ((v126 & v90) >> v92)));
996 v96 = v114;
997 *(v86 - 2) = v95;
998 *(v86 - 1) = v95;
999 v86[638] = v95;
1000 v86[639] = v95;
1001 v122 += v96;
1002 v125 += v113;
1003 v89 = v122;
1004 v90 = v125;
1005 }
1006 while ( (unsigned int)v86 < v121 );
1007 pColorPixel = v86;
1008 pZPixel = v87;
1009 }
1010 }
1011 else
1012 {
1013 v75 = pColorPixel;
1014 if ( (unsigned int)pColorPixel < v121 )
1015 {
1016 v76 = pZPixel;
1017 v77 = v123;
1018 v78 = v122;
1019 v79 = v125;
1020 v80 = v133;
1021 v81 = v127;
1022 if ( v124 & 1 )
1023 {
1024 *pZPixel = v117;
1025 --v76;
1026 v75 = pColorPixel + 1;
1027 goto LABEL_62;
1028 }
1029 do
1030 {
1031 v75 += 2;
1032 v82 = *(&v116[v128 & (v78 >> v80)] + ((v126 & v79) >> v81));
1033 v83 = v117;
1034 LOWORD(v82) = *(short *)(v77 + 2 * v82);
1035 *v76 = v117;
1036 *(v75 - 2) = v82;
1037 v76[1] = v83;
1038 v122 += v114;
1039 v125 += v113;
1040 v78 = v122;
1041 v79 = v125;
1042 LABEL_62:
1043 v84 = (unsigned int)(&v116[v128 & (v78 >> v80)] + ((v126 & v79) >> v81));
1044 v76 += 2;
1045 v85 = v114;
1046 *(v75 - 1) = *(short *)(v77 + 2 * *(char *)v84);
1047 v122 += v85;
1048 v125 += v113;
1049 v78 = v122;
1050 v79 = v125;
1051 }
1052 while ( (unsigned int)v75 < v121 );
1053 pColorPixel = v75;
1054 pZPixel = v76;
1055 }
1056 }
1057 }
1058 else
1059 {
1060 v43 = (v42 - v123) >> v106;
1061 v44 = v123 - v43;
1062 v123 = v43;
1063 v115 = v44;
1064 if ( LOBYTE(viewparams->field_20) )
1065 {
1066 v60 = pColorPixel;
1067 if ( (unsigned int)pColorPixel < v121 )
1068 {
1069 v61 = pZPixel;
1070 v62 = v104;
1071 v63 = v122;
1072 v64 = v125;
1073 v65 = v133;
1074 v66 = v127;
1075 if ( v124 & 2 )
1076 {
1077 *pZPixel = v117;
1078 v61 += 2;
1079 v60 = pColorPixel + 2;
1080 goto LABEL_54;
1081 }
1082 do
1083 {
1084 v67 = (v128 & (v63 >> v65)) + ((v126 & v64) >> v66);
1085 v68 = v123 + v115;
1086 v60 += 4;
1087 v115 = v68;
1088 v69 = ((v68 & 0xFFFF0000u) >> 8) + v116[v67];
1089 v70 = v117;
1090 LOWORD(v69) = v62[v69];
1091 *v61 = v117;
1092 v61[1] = v70;
1093 v61[640] = v70;
1094 v61[641] = v70;
1095 *(v60 - 4) = v69;
1096 *(v60 - 3) = v69;
1097 v60[636] = v69;
1098 v60[637] = v69;
1099 v61[2] = v70;
1100 v61[3] = v70;
1101 v61[642] = v70;
1102 v61[643] = v70;
1103 v122 += v114;
1104 v125 += v113;
1105 v63 = v122;
1106 v64 = v125;
1107 v61 += 4;
1108 LABEL_54:
1109 v71 = (v128 & (v63 >> v65)) + ((v126 & v64) >> v66);
1110 v72 = v123 + v115;
1111 v73 = v116[v71];
1112 v115 = v72;
1113 LOWORD(v73) = v62[((v72 & 0xFFFF0000u) >> 8) + v73];
1114 v74 = v114;
1115 *(v60 - 2) = v73;
1116 *(v60 - 1) = v73;
1117 v60[638] = v73;
1118 v60[639] = v73;
1119 v122 += v74;
1120 v125 += v113;
1121 v63 = v122;
1122 v64 = v125;
1123 }
1124 while ( (unsigned int)v60 < v121 );
1125 pColorPixel = v60;
1126 pZPixel = v61;
1127 }
1128 }
1129 else
1130 {
1131 v45 = pColorPixel;
1132 if ( (unsigned int)pColorPixel < v121 )
1133 {
1134 v46 = pZPixel;
1135 v47 = v104;
1136 v48 = v122;
1137 v49 = v125;
1138 v50 = v133;
1139 v51 = v127;
1140 if ( v124 & 1 )
1141 {
1142 *pZPixel = v117;
1143 ++v46;
1144 v45 = pColorPixel + 1;
1145 goto LABEL_47;
1146 }
1147 do
1148 {
1149 v52 = (v128 & (v48 >> v50)) + ((v126 & v49) >> v51);
1150 v53 = v123 + v115;
1151 v45 += 2;
1152 v115 = v53;
1153 v54 = ((v53 & 0xFFFF0000u) >> 8) + v116[v52];
1154 v55 = v117;
1155 LOWORD(v54) = v47[v54];
1156 *v46 = v117;
1157 *(v45 - 2) = v54;
1158 v46[1] = v55;
1159 v122 += v114;
1160 v125 += v113;
1161 v48 = v122;
1162 v49 = v125;
1163 v46 += 2;
1164 LABEL_47:
1165 v56 = (v128 & (v48 >> v50)) + ((v126 & v49) >> v51);
1166 v57 = v123 + v115;
1167 v58 = v116[v56];
1168 v115 = v57;
1169 LOWORD(v58) = v47[((v57 & 0xFFFF0000u) >> 8) + v58];
1170 v59 = v114;
1171 *(v45 - 1) = v58;
1172 v122 += v59;
1173 v125 += v113;
1174 v48 = v122;
1175 v49 = v125;
1176 }
1177 while ( (unsigned int)v45 < v121 );
1178 pColorPixel = v45;
1179 pZPixel = v46;
1180 }
1181 }
1182 }
1183 k += 13;
1184 v5 = v108;
1185 v123 = v101;
1186 a1 += v134;
1187 if ( (unsigned int)pColorPixel >= v131 )
1188 break;
1189 }
1190 v23 = v119;
1191 v24 = v120;
1192 }
1193 ++a2;
1194 v110 += v111;
1195 v23 += 640;
1196 v24 += 2;
1197 v120 = v24;
1198 v119 = v23;
1199 if ( a2 > stru_F8A590._viewport_space_w )
1200 break;
1201 v21 = a2;
1202 }
1203 }
1204 return;
1205 }
1206 }
1207 }
1208 }
1209 }
1210 }
1211 }
1212 }
1213 // 4AE491: using guessed type int __fastcall sub_4AE491(int, int);
1214 602
1215 603
1216 604
1217 //----- (004B0E07) -------------------------------------------------------- 605 //----- (004B0E07) --------------------------------------------------------
1218 unsigned int __fastcall sub_4B0E07(unsigned int uFaceID) 606 unsigned int __fastcall sub_4B0E07(unsigned int uFaceID)