Mercurial > mm7
changeset 1126:5f59f1cba5f5
sub_451007_scale_image_bicubic cleanup - dozens of duplicate/unused variables
author | Grumpy7 |
---|---|
date | Fri, 31 May 2013 05:25:38 +0200 |
parents | f87e7d1aa9ec |
children | 1c65d99d224d |
files | mm7_2.cpp |
diffstat | 1 files changed, 285 insertions(+), 304 deletions(-) [+] |
line wrap: on
line diff
--- a/mm7_2.cpp Fri May 31 00:49:13 2013 +0200 +++ b/mm7_2.cpp Fri May 31 05:25:38 2013 +0200 @@ -2167,60 +2167,60 @@ unsigned short *pDst, int dstWidth, int dstHeight, int dstPitch, int a10, int a11) { - int v11; // esi@1 + //int v11; // esi@1 int result; // eax@1 - int v13; // edi@8 + //int v13; // edi@8 int v14; // ecx@10 double v15; // st7@11 - double v16; // st6@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 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 + //unsigned __int16 *v24; // ecx@29 + //int v25; // edi@33 int v26; // ecx@35 - double v27; // st7@36 - double v28; // st6@36 + //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 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 + //unsigned __int16 *v36; // ecx@54 + //int v37; // edi@58 int v38; // ecx@60 - double v39; // st7@61 - double v40; // st6@61 + //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 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 + //unsigned __int16 *v48; // ecx@79 + //int v49; // edi@86 int v50; // ecx@88 - double v51; // st7@89 - double v52; // st6@89 + //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 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 + //unsigned __int16 *v60; // ecx@107 + //int v61; // edi@111 int v62; // ecx@113 - double v63; // st7@114 - double v64; // st6@114 +// 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 +2228,49 @@ int v69; // eax@121 unsigned int v70; // ecx@128 unsigned __int16 v71; // ax@132 - unsigned __int16 *v72; // ecx@132 - int v73; // edi@136 + //unsigned __int16 *v72; // ecx@132 + //int v73; // edi@136 int v74; // ecx@138 - double v75; // st7@139 - double v76; // st6@139 + //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 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 + //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 + //double v113; // st7@217 + //double v114; // st6@217 float v115; // ST34_4@218 float v116; // ST30_4@218 unsigned int v117; // esi@218 @@ -2279,7 +2279,7 @@ int v120; // eax@223 unsigned int v121; // ecx@231 char v122; // al@235 - unsigned __int16 *v123; // ecx@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 @@ -2287,8 +2287,8 @@ //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 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 @@ -2297,8 +2297,8 @@ //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 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 @@ -2307,8 +2307,8 @@ //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 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 @@ -2317,8 +2317,8 @@ //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 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 @@ -2328,7 +2328,7 @@ 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 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 +2342,63 @@ 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 *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 + //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 *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 + //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 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 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 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 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 +2406,11 @@ __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 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 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 +2418,42 @@ 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 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 + //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 + //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 + //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 + //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 + //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 + //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 + //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 @@ -2465,10 +2465,10 @@ int a9f; // [sp+ACh] [bp+24h]@189 int vxx; - v11 = 0; + //v11 = 0; result = this->field_0.field_C; //v202 = this; - v230 = 0; + /*v230 = 0;*/ if ( result != 8 ) { if ( result != 16 ) @@ -2480,15 +2480,20 @@ { if ( result != 16 ) { - if ( result != 32 || (result = (int)pDst, v193 = pDst, v231 = 0, dstHeight <= 0) ) + if ( result != 32) return result; - v13 = dstWidth; + result = (int)pDst; + v193 = pDst; + v231 = 0; + if ( dstHeight <= 0 ) + return result; + //v13 = dstWidth; a9a = 4 * (dstPitch - dstWidth); while ( 1 ) { v14 = 0; - a6a = 0; - if ( dstWidth > v11 ) + //a6a = 0; + if ( dstWidth > 0 ) break; LABEL_30: v193 = (unsigned __int16 *)((char *)v193 + a9a); @@ -2496,22 +2501,18 @@ result = v231; if ( v231 >= dstHeight ) return result; - v11 = 0; - } - v221 = (double)dstWidth; - v212 = (double)srcWidth; - v15 = (double)dstHeight; - v16 = (double)srcHeight; + //v11 = 0; + } while ( 1 ) { - a6s = (double)a6a / v221 * v212; + a6s = (double)v14 / (double)dstWidth * (double)srcWidth; v151 = floorf(a6s + 0.5f);//a6s + 6.7553994e15; - v203 = v14 + 1; - a6t = (double)(v14 + 1) / v221 * v212; + //v203 = v14 + 1; + a6t = (double)(v14 + 1) / (double)dstWidth * (double)srcWidth; v142 = floorf(a6t + 0.5f);//a6t + 6.7553994e15; - v17 = (double)v231 / v15 * v16; + v17 = (double)v231 / (double)dstHeight * (double)srcHeight; v133 = floorf(v17 + 0.5f);//v17 + 6.7553994e15; - v18 = (double)(v231 + 1) / v15 * v16; + v18 = (double)(v231 + 1) / (double)dstHeight * (double)srcHeight; v124 = floorf(v18 + 0.5f);//v18 + 6.7553994e15; v19 = (LODWORD(v124) - LODWORD(v133)) * (LODWORD(v142) - LODWORD(v151)); v252 = 0; @@ -2530,12 +2531,12 @@ if ( v22 != 255 ) v22 &= 0x7FFFFFFFu; v23 = _450F55(HIDWORD(v240) | ((v252 | ((a6b | (v22 << 8)) << 8)) << 8)); - v24 = v193; + *(_DWORD *)v193 = v23; v193 += 2; - *(_DWORD *)v24 = v23; - v14 = v203; - a6a = v203; - if ( v203 >= dstWidth ) + //*(_DWORD *)v24 = v23; + ++v14; + //a6a = v203; + if ( v14 >= dstWidth ) goto LABEL_30; } v160 = LODWORD(v124) - LODWORD(v133); @@ -2552,20 +2553,20 @@ v161 = LODWORD(v142) - LODWORD(v151); while ( 1 ) { - v20 = *v176; - if ( a10 ) + //v20 = *v176; + /*if ( a10 ) { v230 = 1; v13 = v20 != a11 ? 0xFF : 0; - } - v21 = _450FB1(v20); - if ( !v230 ) + }*/ + v21 = _450FB1(*v176); + /*if ( !v230 )*/ break; - LODWORD(v240) = v13 + v240; - v230 = 0; - if ( v13 ) + /*LODWORD(v240) = dstWidth + v240; + /*v230 = 0; + if ( dstWidth ) goto LABEL_22; - --v19; + --v19;*/ LABEL_23: ++v176; --v161; @@ -2584,13 +2585,13 @@ v232 = 0; if ( dstHeight <= 0 ) return result; - v25 = dstWidth; + //v25 = dstWidth; a9b = 2 * (dstPitch - dstWidth); while ( 1 ) { v26 = 0; - a6c = 0; - if ( dstWidth > v11 ) + //a6c = 0; + if ( dstWidth > 0 ) break; LABEL_55: v194 = (unsigned __int16 *)((char *)v194 + a9b); @@ -2598,22 +2599,18 @@ result = v232; if ( v232 >= dstHeight ) return result; - v11 = 0; - } - v222 = (double)dstWidth; - v213 = (double)srcWidth; - v27 = (double)dstHeight; - v28 = (double)srcHeight; + //v11 = 0; + } while ( 1 ) { - a6u = (double)a6c / v222 * v213; + a6u = (double)v26 / (double)dstWidth * (double)srcWidth; v125 = a6u + 6.7553994e15; - v204 = v26 + 1; - a6v = (double)(v26 + 1) / v222 * v213; + //v204 = v26 + 1; + a6v = (double)(v26 + 1) / (double)dstWidth * (double)srcWidth; v134 = a6v + 6.7553994e15; - v29 = (double)v232 / v27 * v28; + v29 = (double)v232 / (double)dstHeight * (double)srcHeight; v143 = v29 + 6.7553994e15; - v30 = (double)(v232 + 1) / v27 * v28; + v30 = (double)(v232 + 1) / (double)dstHeight * (double)srcHeight; v152 = v30 + 6.7553994e15; v31 = (LODWORD(v152) - LODWORD(v143)) * (LODWORD(v134) - LODWORD(v125)); v253 = 0; @@ -2632,12 +2629,11 @@ if ( v34 != 255 ) v34 &= 0x7FFFFFFFu; v35 = _450F55(HIDWORD(v241) | ((v253 | ((a6d | (v34 << 8)) << 8)) << 8)); - v36 = v194; + *v194 = v35; ++v194; - *v36 = v35; - v26 = v204; - a6c = v204; - if ( v204 >= dstWidth ) + ++v26; + //a6c = v204; + if ( v26 >= dstWidth ) goto LABEL_55; } v170 = LODWORD(v152) - LODWORD(v143); @@ -2654,20 +2650,20 @@ v162 = LODWORD(v134) - LODWORD(v125); while ( 1 ) { - v32 = *v177; - if ( a10 ) + //v32 = *v177; + /*if ( a10 ) { v230 = 1; v25 = v32 != a11 ? 0xFF : 0; - } - v33 = _450FB1(v32); - if ( !v230 ) + }*/ + v33 = _450FB1(*v177); + /*if ( !v230 )*/ break; - LODWORD(v241) = v25 + v241; - v230 = 0; - if ( v25 ) + /*LODWORD(v241) = v25 + v241; + / *v230 = 0;* / + if ( dstWidth ) goto LABEL_47; - --v31; + --v31;*/ LABEL_48: ++v177; --v162; @@ -2686,12 +2682,12 @@ v233 = 0; if ( dstHeight <= 0 ) return result; - v37 = dstWidth; + //v37 = dstWidth; while ( 1 ) { v38 = 0; - a6e = 0; - if ( dstWidth > v11 ) + //a6e = 0; + if ( dstWidth > 0 ) break; LABEL_80: v195 = (unsigned __int16 *)((char *)v195 + dstPitch - dstWidth); @@ -2699,22 +2695,18 @@ result = v233; if ( v233 >= dstHeight ) return result; - v11 = 0; - } - v223 = (double)dstWidth; - v214 = (double)srcWidth; - v39 = (double)dstHeight; - v40 = (double)srcHeight; + //v11 = 0; + } while ( 1 ) { - a6w = (double)a6e / v223 * v214; + a6w = (double)v38 / (double)dstWidth * (double)srcWidth; v126 = a6w + 6.7553994e15; - v205 = v38 + 1; - a6x = (double)(v38 + 1) / v223 * v214; + //v205 = v38 + 1; + a6x = (double)(v38 + 1) / (double)dstWidth * (double)srcWidth; v135 = a6x + 6.7553994e15; - v41 = (double)v233 / v39 * v40; + v41 = (double)v233 / (double)dstHeight * (double)srcHeight; v144 = v41 + 6.7553994e15; - v42 = (double)(v233 + 1) / v39 * v40; + v42 = (double)(v233 + 1) / (double)dstHeight * (double)srcHeight; v153 = v42 + 6.7553994e15; v43 = (LODWORD(v153) - LODWORD(v144)) * (LODWORD(v135) - LODWORD(v126)); v254 = 0; @@ -2733,12 +2725,11 @@ if ( v46 != 255 ) v46 &= 0x7FFFFFFFu; v47 = _450F55(HIDWORD(v242) | ((v254 | ((a6f | (v46 << 8)) << 8)) << 8)); - v48 = v195; + *v195 = v47; v195 = (unsigned __int16 *)((char *)v195 + 1); - *(_BYTE *)v48 = v47; - v38 = v205; - a6e = v205; - if ( v205 >= dstWidth ) + ++v38; + //a6e = v205; + if ( v38 >= dstWidth ) goto LABEL_80; } v171 = LODWORD(v153) - LODWORD(v144); @@ -2755,20 +2746,20 @@ v163 = LODWORD(v135) - LODWORD(v126); while ( 1 ) { - v44 = *v178; - if ( a10 ) + //v44 = *v178; + /*if ( a10 ) { v230 = 1; v37 = v44 != a11 ? 0xFF : 0; - } - v45 = _450FB1(v44); - if ( !v230 ) + }*/ + v45 = _450FB1(*v178); + /*if ( !v230 )*/ break; - LODWORD(v242) = v37 + v242; - v230 = 0; - if ( v37 ) + /*LODWORD(v242) = v37 + v242; + / *v230 = 0;* / + if ( dstWidth ) goto LABEL_72; - --v43; + --v43;*/ LABEL_73: ++v178; --v163; @@ -2787,15 +2778,20 @@ { if ( result != 16 ) { - if ( result != 32 || (result = (int)pDst, v196 = pDst, v234 = 0, dstHeight <= 0) ) + if ( result != 32) return result; - v49 = dstWidth; + result = (int)pDst; + v196 = pDst; + v234 = 0; + if ( dstHeight <= 0 ) + return result; + //v49 = dstWidth; a9c = 4 * (dstPitch - dstWidth); while ( 1 ) { v50 = 0; - a6g = 0; - if ( dstWidth > v11 ) + //a6g = 0; + if ( dstWidth > 0 ) break; LABEL_108: v196 = (unsigned __int16 *)((char *)v196 + a9c); @@ -2803,22 +2799,18 @@ result = v234; if ( v234 >= dstHeight ) return result; - v11 = 0; - } - v224 = (double)dstWidth; - v215 = (double)srcWidth; - v51 = (double)dstHeight; - v52 = (double)srcHeight; + //v11 = 0; + } while ( 1 ) { - a6y = (double)a6g / v224 * v215; + a6y = (double)v50 / (double)dstWidth * (double)srcWidth; v127 = a6y + 6.7553994e15; - v206 = v50 + 1; - a6z = (double)(v50 + 1) / v224 * v215; + //v206 = v50 + 1; + a6z = (double)(v50 + 1) / (double)dstWidth * (double)srcWidth; v136 = a6z + 6.7553994e15; - v53 = (double)v234 / v51 * v52; + v53 = (double)v234 / (double)dstHeight * (double)srcHeight; v145 = v53 + 6.7553994e15; - v54 = (double)(v234 + 1) / v51 * v52; + v54 = (double)(v234 + 1) / (double)dstHeight * (double)srcHeight; v154 = v54 + 6.7553994e15; v55 = (LODWORD(v154) - LODWORD(v145)) * (LODWORD(v136) - LODWORD(v127)); v255 = 0; @@ -2837,12 +2829,12 @@ if ( v58 != 255 ) v58 &= 0x7FFFFFFFu; v59 = _450F55(HIDWORD(v243) | ((v255 | ((a6h | (v58 << 8)) << 8)) << 8)); - v60 = v196; + *(_DWORD *)v196 = v59; v196 += 2; - *(_DWORD *)v60 = v59; - v50 = v206; - a6g = v206; - if ( v206 >= dstWidth ) + //*(_DWORD *)v60 = v59; + ++v50; + //a6g = v206; + if ( v50 >= dstWidth ) goto LABEL_108; } v172 = LODWORD(v154) - LODWORD(v145); @@ -2859,20 +2851,20 @@ v164 = LODWORD(v136) - LODWORD(v127); while ( 1 ) { - v56 = *(_WORD *)v179; - if ( a10 ) + //v56 = *(_WORD *)v179; + /*if ( a10 ) { v230 = 1; v49 = v56 != a11 ? 0xFF : 0; - } - v57 = _450FB1(v56); - if ( !v230 ) + }*/ + v57 = _450FB1(*(_WORD *)v179); + /* if ( !v230 )*/ break; - LODWORD(v243) = v49 + v243; - v230 = 0; - if ( v49 ) + /*LODWORD(v243) = v49 + v243; + / *v230 = 0;* / + if ( dstWidth ) goto LABEL_100; - --v55; + --v55;*/ LABEL_101: v179 = (int *)((char *)v179 + 2); --v164; @@ -2891,13 +2883,13 @@ v235 = 0; if ( dstHeight <= 0 ) return result; - v61 = dstWidth; + //v61 = dstWidth; a9d = 2 * (dstPitch - dstWidth); while ( 1 ) { v62 = 0; - a6i = 0; - if ( dstWidth > v11 ) + //a6i = 0; + if ( dstWidth > 0 ) break; LABEL_133: v197 = (unsigned __int16 *)((char *)v197 + a9d); @@ -2905,25 +2897,21 @@ result = v235; if ( v235 >= dstHeight ) return result; - v11 = 0; - } - v225 = (double)dstWidth; - v216 = (double)srcWidth; - v63 = (double)dstHeight; - v64 = (double)srcHeight; + //v11 = 0; + } while ( 1 ) { - a6ba = (double)a6i / v225 * v216; + a6ba = (double)v62 / (double)dstWidth * (double)srcWidth; _v128 = ceilf(a6ba - 0.5f); //v128 = a6ba + 6.7553994e15; - v207 = v62 + 1; - a6bb = (double)(v62 + 1) / v225 * v216; + //v207 = v62 + 1; + a6bb = (double)(v62 + 1) / (double)dstWidth * (double)srcWidth; //v137 = a6bb + 6.7553994e15; _v137 = ceilf(a6bb - 0.5f); - v65 = (double)v235 / v63 * v64; + v65 = (double)v235 / (double)dstHeight * (double)srcHeight; //v146 = v65 + 6.7553994e15; _v146 = ceilf(v65 - 0.5f); - v66 = (double)(v235 + 1) / v63 * v64; + v66 = (double)(v235 + 1) / (double)dstHeight * (double)srcHeight; //v155 = v66 + 6.7553994e15; _v155 = ceilf(v66 - 0.5f); v67 = (_v155 - _v146) * (_v137 - _v128); @@ -2947,9 +2935,9 @@ v71 = _450F55(HIDWORD(v244) | ((v256 | ((a6j | (v70 << 8)) << 8)) << 8)); *v197 = v71; ++v197; - v62 = v207; - a6i = v207; - if ( v207 >= dstWidth ) + ++v62; + //a6i = v207; + if ( v62 >= dstWidth ) goto LABEL_133; } //v173 = LODWORD(v155) - LODWORD(v146); @@ -2971,19 +2959,19 @@ while ( 1 ) { v68 = *(_WORD *)v180; - if ( a10 ) + /*if ( a10 ) { v230 = 1; v61 = v68 != a11 ? 0xFF : 0; - } + }*/ v69 = _450FB1(v68); - if ( !v230 ) + //if ( !v230 ) break; - LODWORD(v244) = v61 + v244; - v230 = 0; - if ( v61 ) - goto LABEL_125; - --v67; +// LODWORD(v244) = v61 + v244; +// /*v230 = 0;*/ +// if ( dstWidth ) +// goto LABEL_125; +// --v67; LABEL_126: v180 = (int *)((char *)v180 + 2); --v165; @@ -3002,12 +2990,12 @@ v236 = 0; if ( dstHeight <= 0 ) return result; - v73 = dstWidth; + //v73 = dstWidth; while ( 1 ) { v74 = 0; - a6k = 0; - if ( dstWidth > v11 ) + //a6k = 0; + if ( dstWidth > 0 ) break; LABEL_158: v198 = (unsigned __int16 *)((char *)v198 + dstPitch - dstWidth); @@ -3015,22 +3003,18 @@ result = v236; if ( v236 >= dstHeight ) return result; - v11 = 0; - } - v226 = (double)dstWidth; - v217 = (double)srcWidth; - v75 = (double)dstHeight; - v76 = (double)srcHeight; + //v11 = 0; + } while ( 1 ) { - a6bc = (double)a6k / v226 * v217; + a6bc = (double)v74 / (double)dstWidth * (double)srcWidth; v129 = a6bc + 6.7553994e15; - v208 = v74 + 1; - a6bd = (double)(v74 + 1) / v226 * v217; + //v208 = v74 + 1; + a6bd = (double)(v74 + 1) / (double)dstWidth * (double)srcWidth; v138 = a6bd + 6.7553994e15; - v77 = (double)v236 / v75 * v76; + v77 = (double)v236 / (double)dstHeight * (double)srcHeight; v147 = v77 + 6.7553994e15; - v78 = (double)(v236 + 1) / v75 * v76; + v78 = (double)(v236 + 1) / (double)dstHeight * (double)srcHeight; v156 = v78 + 6.7553994e15; v257 = 0; v79 = (LODWORD(v156) - LODWORD(v147)) * (LODWORD(v138) - LODWORD(v129)); @@ -3051,9 +3035,9 @@ v83 = _450F55(HIDWORD(v245) | ((v257 | ((a6l | (v82 << 8)) << 8)) << 8)); *v198 = v83; v198 = (unsigned __int16 *)((char *)v198 + 1); - v74 = v208; - a6k = v208; - if ( v208 >= dstWidth ) + ++v74; + //a6k = v208; + if ( v74 >= dstWidth ) goto LABEL_158; } v174 = LODWORD(v156) - LODWORD(v147); @@ -3070,20 +3054,20 @@ v181 = (int *)v189; while ( 1 ) { - v80 = *(_WORD *)v181; - if ( a10 ) + //v80 = *(_WORD *)v181; + /*if ( a10 ) { v230 = 1; v73 = v80 != a11 ? 0xFF : 0; - } - v81 = _450FB1(v80); - if ( !v230 ) + }*/ + v81 = _450FB1(*(_WORD *)v181); + //if ( !v230 ) break; - LODWORD(v245) = v73 + v245; + /*LODWORD(v245) = v73 + v245; v230 = 0; - if ( v73 ) + if ( dstWidth ) goto LABEL_150; - --v79; + --v79;*/ LABEL_151: v181 = (int *)((char *)v181 + 2); --v166; @@ -3117,27 +3101,23 @@ v239 = 0; if ( dstHeight <= 0 ) return result; - v111 = dstWidth; + //v111 = dstWidth; while ( 1 ) { v112 = 0; - a6q = 0; - if ( dstWidth <= v11 ) + //a6q = 0; + if ( dstWidth <= 0 ) goto LABEL_236; - v229 = (double)dstWidth; - v220 = (double)srcWidth; - v113 = (double)dstHeight; - v114 = (double)srcHeight; do { - a6bi = (double)a6q / v229 * v220; + a6bi = (double)v112 / (double)dstWidth * (double)srcWidth; v132 = a6bi + 6.7553994e15; - v211 = v112 + 1; - a6bj = (double)(v112 + 1) / v229 * v220; + //v211 = v112 + 1; + a6bj = (double)(v112 + 1) / (double)dstWidth * (double)srcWidth; v141 = a6bj + 6.7553994e15; - v115 = (double)v239 / v113 * v114; + v115 = (double)v239 / (double)dstHeight * (double)srcHeight; v150 = v115 + 6.7553994e15; - v116 = (double)(v239 + 1) / v113 * v114; + v116 = (double)(v239 + 1) / (double)dstHeight * (double)srcHeight; v159 = v116 + 6.7553994e15; v251 = 0; v117 = (LODWORD(v159) - LODWORD(v150)) * (LODWORD(v141) - LODWORD(v132)); @@ -3154,16 +3134,17 @@ while ( v118 < SLODWORD(v141) ) { v119 = (unsigned __int8)v184[v118]; - if ( a10 ) + /*if ( a10 ) { v230 = 1; v111 = v119 != a11 ? 0xFF : 0; - } + }*/ v120 = _450FB1(v119); +/* if ( v230 ) { v248 += v111; - v230 = 0; + / *v230 = 0;* / if ( !v111 ) { --v117; @@ -3171,9 +3152,9 @@ } } else - { + {*/ v248 += (unsigned int)v120 >> 24; - } + /*}*/ a6r += BYTE2(v120); v260 += BYTE1(v120); v251 += (unsigned __int8)v120; @@ -3197,17 +3178,17 @@ v122 = _450F55(v251 | ((v260 | ((a6r | (v121 << 8)) << 8)) << 8)); *v201 = v122; v201 = (unsigned __int16 *)((char *)v201 + 1); - v112 = v211; - a6q = v211; - } - while ( v211 < dstWidth ); + ++v112; + //a6q = v211; + } + while ( v112 < dstWidth ); LABEL_236: v201 = (unsigned __int16 *)((char *)v201 + vxx); ++v239; result = v239; if ( v239 >= dstHeight ) return result; - v11 = 0; + //v11 = 0; } } }