Mercurial > mm7
diff mm7_2.cpp @ 1128:cf37177c0786
sub_451007_scale_image_bicubic cleanup - removing commented out sections for readability2
author | Grumpy7 |
---|---|
date | Fri, 31 May 2013 05:44:34 +0200 |
parents | 1c65d99d224d |
children | 9362028fccd1 |
line wrap: on
line diff
--- a/mm7_2.cpp Fri May 31 05:39:43 2013 +0200 +++ b/mm7_2.cpp Fri May 31 05:44:34 2013 +0200 @@ -2167,60 +2167,36 @@ unsigned short *pDst, int dstWidth, int dstHeight, int dstPitch, int a10, int a11) { - //int v11; // esi@1 int result; // eax@1 - //int v13; // edi@8 int v14; // ecx@10 - //double v15; // st7@11 - //double v16; // st6@11 float v17; // ST3C_4@12 float v18; // ST38_4@12 unsigned int v19; // esi@12 - //int v20; // eax@16 int v21; // eax@18 unsigned int v22; // ecx@25 unsigned int v23; // eax@29 - //unsigned __int16 *v24; // ecx@29 - //int v25; // edi@33 int v26; // ecx@35 - //double v27; // st7@36 - //double v28; // st6@36 float v29; // ST34_4@37 float v30; // ST30_4@37 unsigned int v31; // esi@37 - //int v32; // eax@41 int v33; // eax@43 unsigned int v34; // ecx@50 unsigned __int16 v35; // ax@54 - //unsigned __int16 *v36; // ecx@54 - //int v37; // edi@58 int v38; // ecx@60 - //double v39; // st7@61 - //double v40; // st6@61 float v41; // ST34_4@62 float v42; // ST30_4@62 unsigned int v43; // esi@62 - //int v44; // eax@66 int v45; // eax@68 unsigned int v46; // ecx@75 char v47; // al@79 - //unsigned __int16 *v48; // ecx@79 - //int v49; // edi@86 int v50; // ecx@88 - //double v51; // st7@89 - //double v52; // st6@89 float v53; // ST34_4@90 float v54; // ST30_4@90 unsigned int v55; // esi@90 - //int v56; // eax@94 int v57; // eax@96 unsigned int v58; // ecx@103 unsigned int v59; // eax@107 - //unsigned __int16 *v60; // ecx@107 - //int v61; // edi@111 int v62; // ecx@113 -// double v63; // st7@114 -// double v64; // st6@114 float v65; // ST34_4@115 float v66; // ST30_4@115 unsigned int v67; // esi@115 @@ -2228,49 +2204,14 @@ int v69; // eax@121 unsigned int v70; // ecx@128 unsigned __int16 v71; // ax@132 - //unsigned __int16 *v72; // ecx@132 - //int v73; // edi@136 int v74; // ecx@138 - //double v75; // st7@139 - //double v76; // st6@139 float v77; // ST34_4@140 float v78; // ST30_4@140 unsigned int v79; // esi@140 - //int v80; // eax@144 int v81; // eax@146 unsigned int v82; // ecx@153 char v83; // al@157 - //unsigned __int16 *v84; // ecx@157 - //int v85; // edi@164 - //int v86; // ecx@166 - //double v87; // st7@167 - //double v88; // st6@167 - //float v89; // ST34_4@168 - //float v90; // ST30_4@168 - //unsigned int v91; // esi@168 - //signed int v92; // eax@170 - //int v93; // eax@171 - //int v94; // eax@173 - //unsigned int v95; // ecx@181 - //unsigned int v96; // eax@185 - //unsigned __int16 *v97; // ecx@185 - //int v98; // edi@189 - //int v99; // ecx@191 - //double v100; // st7@192 - //double v101; // st6@192 - //float v102; // ST34_4@193 - //float v103; // ST30_4@193 - //unsigned int v104; // esi@193 - //signed int v105; // eax@195 - //int v106; // eax@196 - //int v107; // eax@198 - //unsigned int v108; // ecx@206 - //unsigned __int16 v109; // ax@210 - //unsigned __int16 *v110; // ecx@210 - //int v111; // edi@214 int v112; // ecx@216 - //double v113; // st7@217 - //double v114; // st6@217 float v115; // ST34_4@218 float v116; // ST30_4@218 unsigned int v117; // esi@218 @@ -2279,46 +2220,33 @@ int v120; // eax@223 unsigned int v121; // ecx@231 char v122; // al@235 - //unsigned __int16 *v123; // ecx@235 double v124; // [sp+Ch] [bp-7Ch]@12 double v125; // [sp+Ch] [bp-7Ch]@37 double v126; // [sp+Ch] [bp-7Ch]@62 double v127; // [sp+Ch] [bp-7Ch]@90 - //double v128; // [sp+Ch] [bp-7Ch]@115 uint _v128; double v129; // [sp+Ch] [bp-7Ch]@140 - //double v130; // [sp+Ch] [bp-7Ch]@168 - //double v131; // [sp+Ch] [bp-7Ch]@193 double v132; // [sp+Ch] [bp-7Ch]@218 double v133; // [sp+14h] [bp-74h]@12 double v134; // [sp+14h] [bp-74h]@37 double v135; // [sp+14h] [bp-74h]@62 double v136; // [sp+14h] [bp-74h]@90 - //double v137; // [sp+14h] [bp-74h]@115 uint _v137; double v138; // [sp+14h] [bp-74h]@140 - //double v139; // [sp+14h] [bp-74h]@168 - //double v140; // [sp+14h] [bp-74h]@193 double v141; // [sp+14h] [bp-74h]@218 double v142; // [sp+1Ch] [bp-6Ch]@12 double v143; // [sp+1Ch] [bp-6Ch]@37 double v144; // [sp+1Ch] [bp-6Ch]@62 double v145; // [sp+1Ch] [bp-6Ch]@90 - //double v146; // [sp+1Ch] [bp-6Ch]@115 uint _v146; double v147; // [sp+1Ch] [bp-6Ch]@140 - //double v148; // [sp+1Ch] [bp-6Ch]@168 - //double v149; // [sp+1Ch] [bp-6Ch]@193 double v150; // [sp+1Ch] [bp-6Ch]@218 double v151; // [sp+24h] [bp-64h]@12 double v152; // [sp+24h] [bp-64h]@37 double v153; // [sp+24h] [bp-64h]@62 double v154; // [sp+24h] [bp-64h]@90 - //double v155; // [sp+24h] [bp-64h]@115 uint _v155; double v156; // [sp+24h] [bp-64h]@140 - //double v157; // [sp+24h] [bp-64h]@168 - //double v158; // [sp+24h] [bp-64h]@193 double v159; // [sp+24h] [bp-64h]@218 int v160; // [sp+3Ch] [bp-4Ch]@13 int v161; // [sp+40h] [bp-48h]@15 @@ -2327,8 +2255,6 @@ int v164; // [sp+44h] [bp-44h]@93 int v165; // [sp+44h] [bp-44h]@118 int v166; // [sp+44h] [bp-44h]@143 - //int v167; // [sp+44h] [bp-44h]@169 -// int v168; // [sp+44h] [bp-44h]@194 int v169; // [sp+44h] [bp-44h]@219 int v170; // [sp+48h] [bp-40h]@38 int v171; // [sp+48h] [bp-40h]@63 @@ -2342,63 +2268,25 @@ int *v179; // [sp+50h] [bp-38h]@93 int *v180; // [sp+50h] [bp-38h]@118 int *v181; // [sp+50h] [bp-38h]@143 - //char *v182; // [sp+50h] [bp-38h]@169 - //char *v183; // [sp+50h] [bp-38h]@194 char *v184; // [sp+50h] [bp-38h]@219 unsigned __int16 *v185; // [sp+54h] [bp-34h]@38 unsigned __int16 *v186; // [sp+54h] [bp-34h]@63 unsigned __int16 *v187; // [sp+54h] [bp-34h]@91 unsigned __int16 *v188; // [sp+54h] [bp-34h]@116 unsigned __int16 *v189; // [sp+54h] [bp-34h]@141 - //signed int v190; // [sp+54h] [bp-34h]@170 - //signed int v191; // [sp+54h] [bp-34h]@195 - //signed int v192; // [sp+54h] [bp-34h]@220 unsigned __int16 *v193; // [sp+5Ch] [bp-2Ch]@7 unsigned __int16 *v194; // [sp+5Ch] [bp-2Ch]@32 unsigned __int16 *v195; // [sp+5Ch] [bp-2Ch]@57 unsigned __int16 *v196; // [sp+5Ch] [bp-2Ch]@85 unsigned __int16 *v197; // [sp+5Ch] [bp-2Ch]@110 unsigned __int16 *v198; // [sp+5Ch] [bp-2Ch]@135 - //unsigned __int16 *v199; // [sp+5Ch] [bp-2Ch]@163 - //unsigned __int16 *v200; // [sp+5Ch] [bp-2Ch]@188 unsigned __int16 *v201; // [sp+5Ch] [bp-2Ch]@213 - //stru350 *v202; // [sp+60h] [bp-28h]@1 - //int v203; // [sp+64h] [bp-24h]@12 - //int v204; // [sp+64h] [bp-24h]@37 - //int v205; // [sp+64h] [bp-24h]@62 - //int v206; // [sp+64h] [bp-24h]@90 - //int v207; // [sp+64h] [bp-24h]@115 - //int v208; // [sp+64h] [bp-24h]@140 - //int v209; // [sp+64h] [bp-24h]@168 - //int v210; // [sp+64h] [bp-24h]@193 - //int v211; // [sp+64h] [bp-24h]@218 - /*float v212; // [sp+6Ch] [bp-1Ch]@11 - float v213; // [sp+6Ch] [bp-1Ch]@36 - float v214; // [sp+6Ch] [bp-1Ch]@61 - float v215; // [sp+6Ch] [bp-1Ch]@89 - float v216; // [sp+6Ch] [bp-1Ch]@114 - float v217; // [sp+6Ch] [bp-1Ch]@139*/ - //float v218; // [sp+6Ch] [bp-1Ch]@167 - //float v219; // [sp+6Ch] [bp-1Ch]@192 - /*float v220; // [sp+6Ch] [bp-1Ch]@217 - float v221; // [sp+70h] [bp-18h]@11 - float v222; // [sp+70h] [bp-18h]@36 - float v223; // [sp+70h] [bp-18h]@61 - float v224; // [sp+70h] [bp-18h]@89 - float v225; // [sp+70h] [bp-18h]@114 - float v226; // [sp+70h] [bp-18h]@139*/ - //float v227; // [sp+70h] [bp-18h]@167 - //float v228; // [sp+70h] [bp-18h]@192 - //float v229; // [sp+70h] [bp-18h]@217 - //signed int v230; // [sp+74h] [bp-14h]@1 signed int v231; // [sp+78h] [bp-10h]@7 signed int v232; // [sp+78h] [bp-10h]@32 signed int v233; // [sp+78h] [bp-10h]@57 signed int v234; // [sp+78h] [bp-10h]@85 signed int v235; // [sp+78h] [bp-10h]@110 signed int v236; // [sp+78h] [bp-10h]@135 - //signed int v237; // [sp+78h] [bp-10h]@163 - //signed int v238; // [sp+78h] [bp-10h]@188 signed int v239; // [sp+78h] [bp-10h]@213 __int64 v240; // [sp+7Ch] [bp-Ch]@12 __int64 v241; // [sp+7Ch] [bp-Ch]@37 @@ -2406,11 +2294,7 @@ __int64 v243; // [sp+7Ch] [bp-Ch]@90 __int64 v244; // [sp+7Ch] [bp-Ch]@115 __int64 v245; // [sp+7Ch] [bp-Ch]@140 - //unsigned int v246; // [sp+7Ch] [bp-Ch]@168 - //unsigned int v247; // [sp+7Ch] [bp-Ch]@193 unsigned int v248; // [sp+7Ch] [bp-Ch]@218 - //unsigned int v249; // [sp+80h] [bp-8h]@168 - //unsigned int v250; // [sp+80h] [bp-8h]@193 unsigned int v251; // [sp+80h] [bp-8h]@218 unsigned int v252; // [sp+84h] [bp-4h]@12 unsigned int v253; // [sp+84h] [bp-4h]@37 @@ -2418,42 +2302,25 @@ unsigned int v255; // [sp+84h] [bp-4h]@90 unsigned int v256; // [sp+84h] [bp-4h]@115 unsigned int v257; // [sp+84h] [bp-4h]@140 - //unsigned int v258; // [sp+84h] [bp-4h]@168 - //unsigned int v259; // [sp+84h] [bp-4h]@193 unsigned int v260; // [sp+84h] [bp-4h]@218 - //signed int a6a; // [sp+A0h] [bp+18h]@10 float a6s; // [sp+A0h] [bp+18h]@12 float a6t; // [sp+A0h] [bp+18h]@12 unsigned int a6b; // [sp+A0h] [bp+18h]@12 - //signed int a6c; // [sp+A0h] [bp+18h]@35 float a6u; // [sp+A0h] [bp+18h]@37 float a6v; // [sp+A0h] [bp+18h]@37 unsigned int a6d; // [sp+A0h] [bp+18h]@37 - //signed int a6e; // [sp+A0h] [bp+18h]@60 float a6w; // [sp+A0h] [bp+18h]@62 float a6x; // [sp+A0h] [bp+18h]@62 unsigned int a6f; // [sp+A0h] [bp+18h]@62 - //signed int a6g; // [sp+A0h] [bp+18h]@88 float a6y; // [sp+A0h] [bp+18h]@90 float a6z; // [sp+A0h] [bp+18h]@90 unsigned int a6h; // [sp+A0h] [bp+18h]@90 - //signed int a6i; // [sp+A0h] [bp+18h]@113 float a6ba; // [sp+A0h] [bp+18h]@115 float a6bb; // [sp+A0h] [bp+18h]@115 unsigned int a6j; // [sp+A0h] [bp+18h]@115 - //signed int a6k; // [sp+A0h] [bp+18h]@138 float a6bc; // [sp+A0h] [bp+18h]@140 float a6bd; // [sp+A0h] [bp+18h]@140 unsigned int a6l; // [sp+A0h] [bp+18h]@140 - //signed int a6m; // [sp+A0h] [bp+18h]@166 - //float a6be; // [sp+A0h] [bp+18h]@168 - //float a6bf; // [sp+A0h] [bp+18h]@168 - //unsigned int a6n; // [sp+A0h] [bp+18h]@168 - //signed int a6o; // [sp+A0h] [bp+18h]@191 - //float a6bg; // [sp+A0h] [bp+18h]@193 - //float a6bh; // [sp+A0h] [bp+18h]@193 - //unsigned int a6p; // [sp+A0h] [bp+18h]@193 - //signed int a6q; // [sp+A0h] [bp+18h]@216 float a6bi; // [sp+A0h] [bp+18h]@218 float a6bj; // [sp+A0h] [bp+18h]@218 unsigned int a6r; // [sp+A0h] [bp+18h]@218 @@ -2461,14 +2328,9 @@ int a9b; // [sp+ACh] [bp+24h]@33 int a9c; // [sp+ACh] [bp+24h]@86 int a9d; // [sp+ACh] [bp+24h]@111 - //int a9e; // [sp+ACh] [bp+24h]@164 - //int a9f; // [sp+ACh] [bp+24h]@189 int vxx; - //v11 = 0; result = this->field_0.field_C; - //v202 = this; - /*v230 = 0;*/ if ( result != 8 ) { if ( result != 16 ) @@ -2487,12 +2349,10 @@ v231 = 0; if ( dstHeight <= 0 ) return result; - //v13 = dstWidth; a9a = 4 * (dstPitch - dstWidth); while ( 1 ) { v14 = 0; - //a6a = 0; if ( dstWidth > 0 ) break; LABEL_30: @@ -2501,13 +2361,11 @@ result = v231; if ( v231 >= dstHeight ) return result; - //v11 = 0; } while ( 1 ) { a6s = (double)v14 / (double)dstWidth * (double)srcWidth; v151 = floorf(a6s + 0.5f);//a6s + 6.7553994e15; - //v203 = v14 + 1; a6t = (double)(v14 + 1) / (double)dstWidth * (double)srcWidth; v142 = floorf(a6t + 0.5f);//a6t + 6.7553994e15; v17 = (double)v231 / (double)dstHeight * (double)srcHeight; @@ -2533,9 +2391,7 @@ v23 = _450F55(HIDWORD(v240) | ((v252 | ((a6b | (v22 << 8)) << 8)) << 8)); *(_DWORD *)v193 = v23; v193 += 2; - //*(_DWORD *)v24 = v23; ++v14; - //a6a = v203; if ( v14 >= dstWidth ) goto LABEL_30; } @@ -2553,20 +2409,8 @@ v161 = LODWORD(v142) - LODWORD(v151); while ( 1 ) { - //v20 = *v176; - /*if ( a10 ) - { - v230 = 1; - v13 = v20 != a11 ? 0xFF : 0; - }*/ v21 = _450FB1(*v176); - /*if ( !v230 )*/ break; - /*LODWORD(v240) = dstWidth + v240; - /*v230 = 0; - if ( dstWidth ) - goto LABEL_22; - --v19;*/ LABEL_23: ++v176; --v161; @@ -2585,12 +2429,10 @@ v232 = 0; if ( dstHeight <= 0 ) return result; - //v25 = dstWidth; a9b = 2 * (dstPitch - dstWidth); while ( 1 ) { v26 = 0; - //a6c = 0; if ( dstWidth > 0 ) break; LABEL_55: @@ -2599,13 +2441,11 @@ result = v232; if ( v232 >= dstHeight ) return result; - //v11 = 0; } while ( 1 ) { a6u = (double)v26 / (double)dstWidth * (double)srcWidth; v125 = a6u + 6.7553994e15; - //v204 = v26 + 1; a6v = (double)(v26 + 1) / (double)dstWidth * (double)srcWidth; v134 = a6v + 6.7553994e15; v29 = (double)v232 / (double)dstHeight * (double)srcHeight; @@ -2632,7 +2472,6 @@ *v194 = v35; ++v194; ++v26; - //a6c = v204; if ( v26 >= dstWidth ) goto LABEL_55; } @@ -2650,20 +2489,8 @@ v162 = LODWORD(v134) - LODWORD(v125); while ( 1 ) { - //v32 = *v177; - /*if ( a10 ) - { - v230 = 1; - v25 = v32 != a11 ? 0xFF : 0; - }*/ v33 = _450FB1(*v177); - /*if ( !v230 )*/ break; - /*LODWORD(v241) = v25 + v241; - / *v230 = 0;* / - if ( dstWidth ) - goto LABEL_47; - --v31;*/ LABEL_48: ++v177; --v162; @@ -2671,7 +2498,6 @@ goto LABEL_49; } LODWORD(v241) = ((unsigned int)v33 >> 24) + v241; -//LABEL_47: a6d += BYTE2(v33); v253 += BYTE1(v33); HIDWORD(v241) += (unsigned __int8)v33; @@ -2682,11 +2508,9 @@ v233 = 0; if ( dstHeight <= 0 ) return result; - //v37 = dstWidth; while ( 1 ) { v38 = 0; - //a6e = 0; if ( dstWidth > 0 ) break; LABEL_80: @@ -2695,13 +2519,11 @@ result = v233; if ( v233 >= dstHeight ) return result; - //v11 = 0; } while ( 1 ) { a6w = (double)v38 / (double)dstWidth * (double)srcWidth; v126 = a6w + 6.7553994e15; - //v205 = v38 + 1; a6x = (double)(v38 + 1) / (double)dstWidth * (double)srcWidth; v135 = a6x + 6.7553994e15; v41 = (double)v233 / (double)dstHeight * (double)srcHeight; @@ -2728,7 +2550,6 @@ *v195 = v47; v195 = (unsigned __int16 *)((char *)v195 + 1); ++v38; - //a6e = v205; if ( v38 >= dstWidth ) goto LABEL_80; } @@ -2746,20 +2567,8 @@ v163 = LODWORD(v135) - LODWORD(v126); while ( 1 ) { - //v44 = *v178; - /*if ( a10 ) - { - v230 = 1; - v37 = v44 != a11 ? 0xFF : 0; - }*/ v45 = _450FB1(*v178); - /*if ( !v230 )*/ break; - /*LODWORD(v242) = v37 + v242; - / *v230 = 0;* / - if ( dstWidth ) - goto LABEL_72; - --v43;*/ LABEL_73: ++v178; --v163; @@ -2767,7 +2576,6 @@ goto LABEL_74; } LODWORD(v242) = ((unsigned int)v45 >> 24) + v242; -//LABEL_72: a6f += BYTE2(v45); v254 += BYTE1(v45); HIDWORD(v242) += (unsigned __int8)v45; @@ -2785,12 +2593,10 @@ v234 = 0; if ( dstHeight <= 0 ) return result; - //v49 = dstWidth; a9c = 4 * (dstPitch - dstWidth); while ( 1 ) { v50 = 0; - //a6g = 0; if ( dstWidth > 0 ) break; LABEL_108: @@ -2799,13 +2605,11 @@ result = v234; if ( v234 >= dstHeight ) return result; - //v11 = 0; } while ( 1 ) { a6y = (double)v50 / (double)dstWidth * (double)srcWidth; v127 = a6y + 6.7553994e15; - //v206 = v50 + 1; a6z = (double)(v50 + 1) / (double)dstWidth * (double)srcWidth; v136 = a6z + 6.7553994e15; v53 = (double)v234 / (double)dstHeight * (double)srcHeight; @@ -2831,9 +2635,7 @@ v59 = _450F55(HIDWORD(v243) | ((v255 | ((a6h | (v58 << 8)) << 8)) << 8)); *(_DWORD *)v196 = v59; v196 += 2; - //*(_DWORD *)v60 = v59; ++v50; - //a6g = v206; if ( v50 >= dstWidth ) goto LABEL_108; } @@ -2851,20 +2653,8 @@ v164 = LODWORD(v136) - LODWORD(v127); while ( 1 ) { - //v56 = *(_WORD *)v179; - /*if ( a10 ) - { - v230 = 1; - v49 = v56 != a11 ? 0xFF : 0; - }*/ v57 = _450FB1(*(_WORD *)v179); - /* if ( !v230 )*/ break; - /*LODWORD(v243) = v49 + v243; - / *v230 = 0;* / - if ( dstWidth ) - goto LABEL_100; - --v55;*/ LABEL_101: v179 = (int *)((char *)v179 + 2); --v164; @@ -2882,12 +2672,10 @@ v235 = 0; if ( dstHeight <= 0 ) return result; - //v61 = dstWidth; a9d = 2 * (dstPitch - dstWidth); while ( 1 ) { v62 = 0; - //a6i = 0; if ( dstWidth > 0 ) break; LABEL_133: @@ -2896,32 +2684,24 @@ result = v235; if ( v235 >= dstHeight ) return result; - //v11 = 0; } while ( 1 ) { a6ba = (double)v62 / (double)dstWidth * (double)srcWidth; _v128 = ceilf(a6ba - 0.5f); - //v128 = a6ba + 6.7553994e15; - //v207 = v62 + 1; a6bb = (double)(v62 + 1) / (double)dstWidth * (double)srcWidth; - //v137 = a6bb + 6.7553994e15; _v137 = ceilf(a6bb - 0.5f); v65 = (double)v235 / (double)dstHeight * (double)srcHeight; - //v146 = v65 + 6.7553994e15; _v146 = ceilf(v65 - 0.5f); v66 = (double)(v235 + 1) / (double)dstHeight * (double)srcHeight; - //v155 = v66 + 6.7553994e15; _v155 = ceilf(v66 - 0.5f); v67 = (_v155 - _v146) * (_v137 - _v128); v256 = 0; a6j = 0; v244 = 0i64; - //if ( SLODWORD(v146) < SLODWORD(v155) ) if (_v146 < _v155) break; LABEL_128: - //v70 = (unsigned int)v244 / ((LODWORD(v155) - LODWORD(v146)) * (LODWORD(v137) - LODWORD(v128))); v70 = (unsigned int)v244 / ((_v155 - _v146) * (_v137 - _v128)); if ( v67 ) { @@ -2935,15 +2715,11 @@ *v197 = v71; ++v197; ++v62; - //a6i = v207; if ( v62 >= dstWidth ) goto LABEL_133; } - //v173 = LODWORD(v155) - LODWORD(v146); v173 = _v155 - _v146; - //v188 = &pSrc[LODWORD(v128) + srcPitch * LODWORD(v146)]; v188 = &pSrc[_v128 + srcPitch * _v146]; - //while ( SLODWORD(v128) >= SLODWORD(v137) ) while (_v128 >= _v137) { LABEL_127: @@ -2953,24 +2729,11 @@ goto LABEL_128; } v180 = (int *)v188; - //v165 = LODWORD(v137) - LODWORD(v128); v165 = _v137 - _v128; while ( 1 ) { - v68 = *(_WORD *)v180; - /*if ( a10 ) - { - v230 = 1; - v61 = v68 != a11 ? 0xFF : 0; - }*/ - v69 = _450FB1(v68); - //if ( !v230 ) + v69 = _450FB1(*(_WORD *)v180); break; -// LODWORD(v244) = v61 + v244; -// /*v230 = 0;*/ -// if ( dstWidth ) -// goto LABEL_125; -// --v67; LABEL_126: v180 = (int *)((char *)v180 + 2); --v165; @@ -2988,11 +2751,9 @@ v236 = 0; if ( dstHeight <= 0 ) return result; - //v73 = dstWidth; while ( 1 ) { v74 = 0; - //a6k = 0; if ( dstWidth > 0 ) break; LABEL_158: @@ -3001,13 +2762,11 @@ result = v236; if ( v236 >= dstHeight ) return result; - //v11 = 0; } while ( 1 ) { a6bc = (double)v74 / (double)dstWidth * (double)srcWidth; v129 = a6bc + 6.7553994e15; - //v208 = v74 + 1; a6bd = (double)(v74 + 1) / (double)dstWidth * (double)srcWidth; v138 = a6bd + 6.7553994e15; v77 = (double)v236 / (double)dstHeight * (double)srcHeight; @@ -3034,7 +2793,6 @@ *v198 = v83; v198 = (unsigned __int16 *)((char *)v198 + 1); ++v74; - //a6k = v208; if ( v74 >= dstWidth ) goto LABEL_158; } @@ -3052,20 +2810,8 @@ v181 = (int *)v189; while ( 1 ) { - //v80 = *(_WORD *)v181; - /*if ( a10 ) - { - v230 = 1; - v73 = v80 != a11 ? 0xFF : 0; - }*/ v81 = _450FB1(*(_WORD *)v181); - //if ( !v230 ) break; - /*LODWORD(v245) = v73 + v245; - v230 = 0; - if ( dstWidth ) - goto LABEL_150; - --v79;*/ LABEL_151: v181 = (int *)((char *)v181 + 2); --v166; @@ -3080,6 +2826,7 @@ } result = this->field_20.field_C; + int probablyBitDepth = this->field_20.field_C; switch(result) { case 8: vxx = dstPitch - dstWidth; @@ -3098,18 +2845,15 @@ v239 = 0; if ( dstHeight <= 0 ) return result; - //v111 = dstWidth; while ( 1 ) { v112 = 0; - //a6q = 0; if ( dstWidth <= 0 ) goto LABEL_236; do { a6bi = (double)v112 / (double)dstWidth * (double)srcWidth; v132 = a6bi + 6.7553994e15; - //v211 = v112 + 1; a6bj = (double)(v112 + 1) / (double)dstWidth * (double)srcWidth; v141 = a6bj + 6.7553994e15; v115 = (double)v239 / (double)dstHeight * (double)srcHeight; @@ -3131,27 +2875,8 @@ while ( v118 < SLODWORD(v141) ) { v119 = (unsigned __int8)v184[v118]; - /*if ( a10 ) - { - v230 = 1; - v111 = v119 != a11 ? 0xFF : 0; - }*/ v120 = _450FB1(v119); -/* - if ( v230 ) - { - v248 += v111; - / *v230 = 0;* / - if ( !v111 ) - { - --v117; - goto LABEL_228; - } - } - else - {*/ - v248 += (unsigned int)v120 >> 24; - /*}*/ + v248 += (unsigned int)v120 >> 24; a6r += BYTE2(v120); v260 += BYTE1(v120); v251 += (unsigned __int8)v120; @@ -3173,9 +2898,19 @@ v121 &= 0x7FFFFFFFu; v122 = _450F55(v251 | ((v260 | ((a6r | (v121 << 8)) << 8)) << 8)); *v201 = v122; - v201 = (unsigned __int16 *)((char *)v201 + 1); + switch(probablyBitDepth) + { + case 8: v201 = (unsigned __int16 *)((char *)v201 + 1); + break; + case 16: ++v201; + break; + case 32: v201 += 2; + break; + default: + assert(false); + return result; + } ++v112; - //a6q = v211; } while ( v112 < dstWidth ); LABEL_236: @@ -3184,7 +2919,6 @@ result = v239; if ( v239 >= dstHeight ) return result; - //v11 = 0; } } }