Mercurial > mm7
comparison mm7_2.cpp @ 1129:9362028fccd1
sub_451007_scale_image_bicubic cleanup - extracting common bodies from conditions
author | Grumpy7 |
---|---|
date | Fri, 31 May 2013 06:36:34 +0200 |
parents | cf37177c0786 |
children | d98415be04ca |
comparison
equal
deleted
inserted
replaced
1128:cf37177c0786 | 1129:9362028fccd1 |
---|---|
2173 float v18; // ST38_4@12 | 2173 float v18; // ST38_4@12 |
2174 unsigned int v19; // esi@12 | 2174 unsigned int v19; // esi@12 |
2175 int v21; // eax@18 | 2175 int v21; // eax@18 |
2176 unsigned int v22; // ecx@25 | 2176 unsigned int v22; // ecx@25 |
2177 unsigned int v23; // eax@29 | 2177 unsigned int v23; // eax@29 |
2178 int v26; // ecx@35 | |
2179 float v29; // ST34_4@37 | |
2180 float v30; // ST30_4@37 | |
2181 unsigned int v31; // esi@37 | |
2182 int v33; // eax@43 | |
2183 unsigned int v34; // ecx@50 | |
2184 unsigned __int16 v35; // ax@54 | |
2185 int v38; // ecx@60 | |
2186 float v41; // ST34_4@62 | |
2187 float v42; // ST30_4@62 | |
2188 unsigned int v43; // esi@62 | |
2189 int v45; // eax@68 | |
2190 unsigned int v46; // ecx@75 | |
2191 char v47; // al@79 | |
2192 int v50; // ecx@88 | 2178 int v50; // ecx@88 |
2193 float v53; // ST34_4@90 | 2179 float v53; // ST34_4@90 |
2194 float v54; // ST30_4@90 | 2180 float v54; // ST30_4@90 |
2195 unsigned int v55; // esi@90 | 2181 unsigned int v55; // esi@90 |
2196 int v57; // eax@96 | 2182 int v57; // eax@96 |
2197 unsigned int v58; // ecx@103 | 2183 unsigned int v58; // ecx@103 |
2198 unsigned int v59; // eax@107 | 2184 unsigned int v59; // eax@107 |
2199 int v62; // ecx@113 | |
2200 float v65; // ST34_4@115 | |
2201 float v66; // ST30_4@115 | |
2202 unsigned int v67; // esi@115 | |
2203 int v68; // eax@119 | |
2204 int v69; // eax@121 | |
2205 unsigned int v70; // ecx@128 | |
2206 unsigned __int16 v71; // ax@132 | |
2207 int v74; // ecx@138 | |
2208 float v77; // ST34_4@140 | |
2209 float v78; // ST30_4@140 | |
2210 unsigned int v79; // esi@140 | |
2211 int v81; // eax@146 | |
2212 unsigned int v82; // ecx@153 | |
2213 char v83; // al@157 | |
2214 int v112; // ecx@216 | 2185 int v112; // ecx@216 |
2215 float v115; // ST34_4@218 | 2186 float v115; // ST34_4@218 |
2216 float v116; // ST30_4@218 | 2187 float v116; // ST30_4@218 |
2217 unsigned int v117; // esi@218 | 2188 unsigned int v117; // esi@218 |
2218 signed int v118; // eax@220 | 2189 signed int v118; // eax@220 |
2219 int v119; // eax@221 | 2190 int v119; // eax@221 |
2220 int v120; // eax@223 | 2191 int v120; // eax@223 |
2221 unsigned int v121; // ecx@231 | 2192 unsigned int v121; // ecx@231 |
2222 char v122; // al@235 | 2193 char v122; // al@235 |
2223 double v124; // [sp+Ch] [bp-7Ch]@12 | 2194 double v124; // [sp+Ch] [bp-7Ch]@12 |
2224 double v125; // [sp+Ch] [bp-7Ch]@37 | 2195 unsigned int v127; // [sp+Ch] [bp-7Ch]@90 |
2225 double v126; // [sp+Ch] [bp-7Ch]@62 | |
2226 double v127; // [sp+Ch] [bp-7Ch]@90 | |
2227 uint _v128; | |
2228 double v129; // [sp+Ch] [bp-7Ch]@140 | |
2229 double v132; // [sp+Ch] [bp-7Ch]@218 | 2196 double v132; // [sp+Ch] [bp-7Ch]@218 |
2230 double v133; // [sp+14h] [bp-74h]@12 | 2197 double v133; // [sp+14h] [bp-74h]@12 |
2231 double v134; // [sp+14h] [bp-74h]@37 | 2198 unsigned int v136; // [sp+14h] [bp-74h]@90 |
2232 double v135; // [sp+14h] [bp-74h]@62 | |
2233 double v136; // [sp+14h] [bp-74h]@90 | |
2234 uint _v137; | |
2235 double v138; // [sp+14h] [bp-74h]@140 | |
2236 double v141; // [sp+14h] [bp-74h]@218 | 2199 double v141; // [sp+14h] [bp-74h]@218 |
2237 double v142; // [sp+1Ch] [bp-6Ch]@12 | 2200 double v142; // [sp+1Ch] [bp-6Ch]@12 |
2238 double v143; // [sp+1Ch] [bp-6Ch]@37 | 2201 unsigned int v145; // [sp+1Ch] [bp-6Ch]@90 |
2239 double v144; // [sp+1Ch] [bp-6Ch]@62 | |
2240 double v145; // [sp+1Ch] [bp-6Ch]@90 | |
2241 uint _v146; | |
2242 double v147; // [sp+1Ch] [bp-6Ch]@140 | |
2243 double v150; // [sp+1Ch] [bp-6Ch]@218 | 2202 double v150; // [sp+1Ch] [bp-6Ch]@218 |
2244 double v151; // [sp+24h] [bp-64h]@12 | 2203 double v151; // [sp+24h] [bp-64h]@12 |
2245 double v152; // [sp+24h] [bp-64h]@37 | 2204 unsigned int v154; // [sp+24h] [bp-64h]@90 |
2246 double v153; // [sp+24h] [bp-64h]@62 | |
2247 double v154; // [sp+24h] [bp-64h]@90 | |
2248 uint _v155; | |
2249 double v156; // [sp+24h] [bp-64h]@140 | |
2250 double v159; // [sp+24h] [bp-64h]@218 | 2205 double v159; // [sp+24h] [bp-64h]@218 |
2251 int v160; // [sp+3Ch] [bp-4Ch]@13 | 2206 int v160; // [sp+3Ch] [bp-4Ch]@13 |
2252 int v161; // [sp+40h] [bp-48h]@15 | 2207 int v161; // [sp+40h] [bp-48h]@15 |
2253 int v162; // [sp+44h] [bp-44h]@40 | |
2254 int v163; // [sp+44h] [bp-44h]@65 | |
2255 int v164; // [sp+44h] [bp-44h]@93 | 2208 int v164; // [sp+44h] [bp-44h]@93 |
2256 int v165; // [sp+44h] [bp-44h]@118 | |
2257 int v166; // [sp+44h] [bp-44h]@143 | |
2258 int v169; // [sp+44h] [bp-44h]@219 | 2209 int v169; // [sp+44h] [bp-44h]@219 |
2259 int v170; // [sp+48h] [bp-40h]@38 | |
2260 int v171; // [sp+48h] [bp-40h]@63 | |
2261 int v172; // [sp+48h] [bp-40h]@91 | 2210 int v172; // [sp+48h] [bp-40h]@91 |
2262 int v173; // [sp+48h] [bp-40h]@116 | |
2263 int v174; // [sp+48h] [bp-40h]@141 | |
2264 unsigned __int16 *v175; // [sp+4Ch] [bp-3Ch]@13 | 2211 unsigned __int16 *v175; // [sp+4Ch] [bp-3Ch]@13 |
2265 int *v176; // [sp+50h] [bp-38h]@15 | 2212 int *v176; // [sp+50h] [bp-38h]@15 |
2266 int *v177; // [sp+50h] [bp-38h]@40 | |
2267 int *v178; // [sp+50h] [bp-38h]@65 | |
2268 int *v179; // [sp+50h] [bp-38h]@93 | 2213 int *v179; // [sp+50h] [bp-38h]@93 |
2269 int *v180; // [sp+50h] [bp-38h]@118 | |
2270 int *v181; // [sp+50h] [bp-38h]@143 | |
2271 char *v184; // [sp+50h] [bp-38h]@219 | 2214 char *v184; // [sp+50h] [bp-38h]@219 |
2272 unsigned __int16 *v185; // [sp+54h] [bp-34h]@38 | |
2273 unsigned __int16 *v186; // [sp+54h] [bp-34h]@63 | |
2274 unsigned __int16 *v187; // [sp+54h] [bp-34h]@91 | 2215 unsigned __int16 *v187; // [sp+54h] [bp-34h]@91 |
2275 unsigned __int16 *v188; // [sp+54h] [bp-34h]@116 | |
2276 unsigned __int16 *v189; // [sp+54h] [bp-34h]@141 | |
2277 unsigned __int16 *v193; // [sp+5Ch] [bp-2Ch]@7 | 2216 unsigned __int16 *v193; // [sp+5Ch] [bp-2Ch]@7 |
2278 unsigned __int16 *v194; // [sp+5Ch] [bp-2Ch]@32 | |
2279 unsigned __int16 *v195; // [sp+5Ch] [bp-2Ch]@57 | |
2280 unsigned __int16 *v196; // [sp+5Ch] [bp-2Ch]@85 | 2217 unsigned __int16 *v196; // [sp+5Ch] [bp-2Ch]@85 |
2281 unsigned __int16 *v197; // [sp+5Ch] [bp-2Ch]@110 | |
2282 unsigned __int16 *v198; // [sp+5Ch] [bp-2Ch]@135 | |
2283 unsigned __int16 *v201; // [sp+5Ch] [bp-2Ch]@213 | 2218 unsigned __int16 *v201; // [sp+5Ch] [bp-2Ch]@213 |
2284 signed int v231; // [sp+78h] [bp-10h]@7 | 2219 signed int v231; // [sp+78h] [bp-10h]@7 |
2285 signed int v232; // [sp+78h] [bp-10h]@32 | |
2286 signed int v233; // [sp+78h] [bp-10h]@57 | |
2287 signed int v234; // [sp+78h] [bp-10h]@85 | 2220 signed int v234; // [sp+78h] [bp-10h]@85 |
2288 signed int v235; // [sp+78h] [bp-10h]@110 | |
2289 signed int v236; // [sp+78h] [bp-10h]@135 | |
2290 signed int v239; // [sp+78h] [bp-10h]@213 | 2221 signed int v239; // [sp+78h] [bp-10h]@213 |
2291 __int64 v240; // [sp+7Ch] [bp-Ch]@12 | 2222 __int64 v240; // [sp+7Ch] [bp-Ch]@12 |
2292 __int64 v241; // [sp+7Ch] [bp-Ch]@37 | |
2293 __int64 v242; // [sp+7Ch] [bp-Ch]@62 | |
2294 __int64 v243; // [sp+7Ch] [bp-Ch]@90 | 2223 __int64 v243; // [sp+7Ch] [bp-Ch]@90 |
2295 __int64 v244; // [sp+7Ch] [bp-Ch]@115 | |
2296 __int64 v245; // [sp+7Ch] [bp-Ch]@140 | |
2297 unsigned int v248; // [sp+7Ch] [bp-Ch]@218 | 2224 unsigned int v248; // [sp+7Ch] [bp-Ch]@218 |
2298 unsigned int v251; // [sp+80h] [bp-8h]@218 | 2225 unsigned int v251; // [sp+80h] [bp-8h]@218 |
2299 unsigned int v252; // [sp+84h] [bp-4h]@12 | 2226 unsigned int v252; // [sp+84h] [bp-4h]@12 |
2300 unsigned int v253; // [sp+84h] [bp-4h]@37 | |
2301 unsigned int v254; // [sp+84h] [bp-4h]@62 | |
2302 unsigned int v255; // [sp+84h] [bp-4h]@90 | 2227 unsigned int v255; // [sp+84h] [bp-4h]@90 |
2303 unsigned int v256; // [sp+84h] [bp-4h]@115 | |
2304 unsigned int v257; // [sp+84h] [bp-4h]@140 | |
2305 unsigned int v260; // [sp+84h] [bp-4h]@218 | 2228 unsigned int v260; // [sp+84h] [bp-4h]@218 |
2306 float a6s; // [sp+A0h] [bp+18h]@12 | 2229 float a6s; // [sp+A0h] [bp+18h]@12 |
2307 float a6t; // [sp+A0h] [bp+18h]@12 | 2230 float a6t; // [sp+A0h] [bp+18h]@12 |
2308 unsigned int a6b; // [sp+A0h] [bp+18h]@12 | 2231 unsigned int a6b; // [sp+A0h] [bp+18h]@12 |
2309 float a6u; // [sp+A0h] [bp+18h]@37 | |
2310 float a6v; // [sp+A0h] [bp+18h]@37 | |
2311 unsigned int a6d; // [sp+A0h] [bp+18h]@37 | |
2312 float a6w; // [sp+A0h] [bp+18h]@62 | |
2313 float a6x; // [sp+A0h] [bp+18h]@62 | |
2314 unsigned int a6f; // [sp+A0h] [bp+18h]@62 | |
2315 float a6y; // [sp+A0h] [bp+18h]@90 | 2232 float a6y; // [sp+A0h] [bp+18h]@90 |
2316 float a6z; // [sp+A0h] [bp+18h]@90 | 2233 float a6z; // [sp+A0h] [bp+18h]@90 |
2317 unsigned int a6h; // [sp+A0h] [bp+18h]@90 | 2234 unsigned int a6h; // [sp+A0h] [bp+18h]@90 |
2318 float a6ba; // [sp+A0h] [bp+18h]@115 | |
2319 float a6bb; // [sp+A0h] [bp+18h]@115 | |
2320 unsigned int a6j; // [sp+A0h] [bp+18h]@115 | |
2321 float a6bc; // [sp+A0h] [bp+18h]@140 | |
2322 float a6bd; // [sp+A0h] [bp+18h]@140 | |
2323 unsigned int a6l; // [sp+A0h] [bp+18h]@140 | |
2324 float a6bi; // [sp+A0h] [bp+18h]@218 | 2235 float a6bi; // [sp+A0h] [bp+18h]@218 |
2325 float a6bj; // [sp+A0h] [bp+18h]@218 | 2236 float a6bj; // [sp+A0h] [bp+18h]@218 |
2326 unsigned int a6r; // [sp+A0h] [bp+18h]@218 | 2237 unsigned int a6r; // [sp+A0h] [bp+18h]@218 |
2327 int a9a; // [sp+ACh] [bp+24h]@8 | 2238 int dstdiffmult; |
2328 int a9b; // [sp+ACh] [bp+24h]@33 | 2239 |
2329 int a9c; // [sp+ACh] [bp+24h]@86 | 2240 |
2330 int a9d; // [sp+ACh] [bp+24h]@111 | 2241 int probablyBitDepth = this->field_20.field_C; |
2331 int vxx; | 2242 switch(probablyBitDepth) |
2243 { | |
2244 case 8: dstdiffmult = dstPitch - dstWidth; | |
2245 break; | |
2246 case 16: dstdiffmult = 2 * (dstPitch - dstWidth); | |
2247 break; | |
2248 case 32: dstdiffmult = 4 * (dstPitch - dstWidth); | |
2249 break; | |
2250 default: | |
2251 return probablyBitDepth; | |
2252 } | |
2253 | |
2254 | |
2332 | 2255 |
2333 result = this->field_0.field_C; | 2256 result = this->field_0.field_C; |
2334 if ( result != 8 ) | 2257 if ( result == 32 ) |
2335 { | 2258 { |
2336 if ( result != 16 ) | |
2337 { | |
2338 if ( result != 32 ) | |
2339 return result; | |
2340 result = this->field_20.field_C; | |
2341 if ( result != 8 ) | |
2342 { | |
2343 if ( result != 16 ) | |
2344 { | |
2345 if ( result != 32) | |
2346 return result; | |
2347 result = (int)pDst; | |
2348 v193 = pDst; | |
2349 v231 = 0; | |
2350 if ( dstHeight <= 0 ) | |
2351 return result; | |
2352 a9a = 4 * (dstPitch - dstWidth); | |
2353 while ( 1 ) | |
2354 { | |
2355 v14 = 0; | |
2356 if ( dstWidth > 0 ) | |
2357 break; | |
2358 LABEL_30: | |
2359 v193 = (unsigned __int16 *)((char *)v193 + a9a); | |
2360 ++v231; | |
2361 result = v231; | |
2362 if ( v231 >= dstHeight ) | |
2363 return result; | |
2364 } | |
2365 while ( 1 ) | |
2366 { | |
2367 a6s = (double)v14 / (double)dstWidth * (double)srcWidth; | |
2368 v151 = floorf(a6s + 0.5f);//a6s + 6.7553994e15; | |
2369 a6t = (double)(v14 + 1) / (double)dstWidth * (double)srcWidth; | |
2370 v142 = floorf(a6t + 0.5f);//a6t + 6.7553994e15; | |
2371 v17 = (double)v231 / (double)dstHeight * (double)srcHeight; | |
2372 v133 = floorf(v17 + 0.5f);//v17 + 6.7553994e15; | |
2373 v18 = (double)(v231 + 1) / (double)dstHeight * (double)srcHeight; | |
2374 v124 = floorf(v18 + 0.5f);//v18 + 6.7553994e15; | |
2375 v19 = (LODWORD(v124) - LODWORD(v133)) * (LODWORD(v142) - LODWORD(v151)); | |
2376 v252 = 0; | |
2377 a6b = 0; | |
2378 v240 = 0i64; | |
2379 if ( SLODWORD(v133) < SLODWORD(v124) ) | |
2380 break; | |
2381 LABEL_25: | |
2382 v22 = (unsigned int)v240 / ((LODWORD(v124) - LODWORD(v133)) * (LODWORD(v142) - LODWORD(v151))); | |
2383 if ( v19 ) | |
2384 { | |
2385 a6b /= v19; | |
2386 v252 /= v19; | |
2387 HIDWORD(v240) /= v19; | |
2388 } | |
2389 if ( v22 != 255 ) | |
2390 v22 &= 0x7FFFFFFFu; | |
2391 v23 = _450F55(HIDWORD(v240) | ((v252 | ((a6b | (v22 << 8)) << 8)) << 8)); | |
2392 *(_DWORD *)v193 = v23; | |
2393 v193 += 2; | |
2394 ++v14; | |
2395 if ( v14 >= dstWidth ) | |
2396 goto LABEL_30; | |
2397 } | |
2398 v160 = LODWORD(v124) - LODWORD(v133); | |
2399 v175 = &pSrc[2 * (LODWORD(v151) + srcPitch * LODWORD(v133))]; | |
2400 while ( SLODWORD(v151) >= SLODWORD(v142) ) | |
2401 { | |
2402 LABEL_24: | |
2403 v175 += 2 * srcPitch; | |
2404 --v160; | |
2405 if ( !v160 ) | |
2406 goto LABEL_25; | |
2407 } | |
2408 v176 = (int *)v175; | |
2409 v161 = LODWORD(v142) - LODWORD(v151); | |
2410 while ( 1 ) | |
2411 { | |
2412 v21 = _450FB1(*v176); | |
2413 break; | |
2414 LABEL_23: | |
2415 ++v176; | |
2416 --v161; | |
2417 if ( !v161 ) | |
2418 goto LABEL_24; | |
2419 } | |
2420 LODWORD(v240) = ((unsigned int)v21 >> 24) + v240; | |
2421 //LABEL_22: | |
2422 a6b += BYTE2(v21); | |
2423 v252 += BYTE1(v21); | |
2424 HIDWORD(v240) += (unsigned __int8)v21; | |
2425 goto LABEL_23; | |
2426 } | |
2427 result = (int)pDst; | |
2428 v194 = pDst; | |
2429 v232 = 0; | |
2430 if ( dstHeight <= 0 ) | |
2431 return result; | |
2432 a9b = 2 * (dstPitch - dstWidth); | |
2433 while ( 1 ) | |
2434 { | |
2435 v26 = 0; | |
2436 if ( dstWidth > 0 ) | |
2437 break; | |
2438 LABEL_55: | |
2439 v194 = (unsigned __int16 *)((char *)v194 + a9b); | |
2440 ++v232; | |
2441 result = v232; | |
2442 if ( v232 >= dstHeight ) | |
2443 return result; | |
2444 } | |
2445 while ( 1 ) | |
2446 { | |
2447 a6u = (double)v26 / (double)dstWidth * (double)srcWidth; | |
2448 v125 = a6u + 6.7553994e15; | |
2449 a6v = (double)(v26 + 1) / (double)dstWidth * (double)srcWidth; | |
2450 v134 = a6v + 6.7553994e15; | |
2451 v29 = (double)v232 / (double)dstHeight * (double)srcHeight; | |
2452 v143 = v29 + 6.7553994e15; | |
2453 v30 = (double)(v232 + 1) / (double)dstHeight * (double)srcHeight; | |
2454 v152 = v30 + 6.7553994e15; | |
2455 v31 = (LODWORD(v152) - LODWORD(v143)) * (LODWORD(v134) - LODWORD(v125)); | |
2456 v253 = 0; | |
2457 a6d = 0; | |
2458 v241 = 0i64; | |
2459 if ( SLODWORD(v143) < SLODWORD(v152) ) | |
2460 break; | |
2461 LABEL_50: | |
2462 v34 = (unsigned int)v241 / ((LODWORD(v152) - LODWORD(v143)) * (LODWORD(v134) - LODWORD(v125))); | |
2463 if ( v31 ) | |
2464 { | |
2465 a6d /= v31; | |
2466 v253 /= v31; | |
2467 HIDWORD(v241) /= v31; | |
2468 } | |
2469 if ( v34 != 255 ) | |
2470 v34 &= 0x7FFFFFFFu; | |
2471 v35 = _450F55(HIDWORD(v241) | ((v253 | ((a6d | (v34 << 8)) << 8)) << 8)); | |
2472 *v194 = v35; | |
2473 ++v194; | |
2474 ++v26; | |
2475 if ( v26 >= dstWidth ) | |
2476 goto LABEL_55; | |
2477 } | |
2478 v170 = LODWORD(v152) - LODWORD(v143); | |
2479 v185 = &pSrc[2 * (LODWORD(v125) + srcPitch * LODWORD(v143))]; | |
2480 while ( SLODWORD(v125) >= SLODWORD(v134) ) | |
2481 { | |
2482 LABEL_49: | |
2483 v185 += 2 * srcPitch; | |
2484 --v170; | |
2485 if ( !v170 ) | |
2486 goto LABEL_50; | |
2487 } | |
2488 v177 = (int *)v185; | |
2489 v162 = LODWORD(v134) - LODWORD(v125); | |
2490 while ( 1 ) | |
2491 { | |
2492 v33 = _450FB1(*v177); | |
2493 break; | |
2494 LABEL_48: | |
2495 ++v177; | |
2496 --v162; | |
2497 if ( !v162 ) | |
2498 goto LABEL_49; | |
2499 } | |
2500 LODWORD(v241) = ((unsigned int)v33 >> 24) + v241; | |
2501 a6d += BYTE2(v33); | |
2502 v253 += BYTE1(v33); | |
2503 HIDWORD(v241) += (unsigned __int8)v33; | |
2504 goto LABEL_48; | |
2505 } | |
2506 result = (int)pDst; | |
2507 v195 = pDst; | |
2508 v233 = 0; | |
2509 if ( dstHeight <= 0 ) | |
2510 return result; | |
2511 while ( 1 ) | |
2512 { | |
2513 v38 = 0; | |
2514 if ( dstWidth > 0 ) | |
2515 break; | |
2516 LABEL_80: | |
2517 v195 = (unsigned __int16 *)((char *)v195 + dstPitch - dstWidth); | |
2518 ++v233; | |
2519 result = v233; | |
2520 if ( v233 >= dstHeight ) | |
2521 return result; | |
2522 } | |
2523 while ( 1 ) | |
2524 { | |
2525 a6w = (double)v38 / (double)dstWidth * (double)srcWidth; | |
2526 v126 = a6w + 6.7553994e15; | |
2527 a6x = (double)(v38 + 1) / (double)dstWidth * (double)srcWidth; | |
2528 v135 = a6x + 6.7553994e15; | |
2529 v41 = (double)v233 / (double)dstHeight * (double)srcHeight; | |
2530 v144 = v41 + 6.7553994e15; | |
2531 v42 = (double)(v233 + 1) / (double)dstHeight * (double)srcHeight; | |
2532 v153 = v42 + 6.7553994e15; | |
2533 v43 = (LODWORD(v153) - LODWORD(v144)) * (LODWORD(v135) - LODWORD(v126)); | |
2534 v254 = 0; | |
2535 a6f = 0; | |
2536 v242 = 0i64; | |
2537 if ( SLODWORD(v144) < SLODWORD(v153) ) | |
2538 break; | |
2539 LABEL_75: | |
2540 v46 = (unsigned int)v242 / ((LODWORD(v153) - LODWORD(v144)) * (LODWORD(v135) - LODWORD(v126))); | |
2541 if ( v43 ) | |
2542 { | |
2543 a6f /= v43; | |
2544 v254 /= v43; | |
2545 HIDWORD(v242) /= v43; | |
2546 } | |
2547 if ( v46 != 255 ) | |
2548 v46 &= 0x7FFFFFFFu; | |
2549 v47 = _450F55(HIDWORD(v242) | ((v254 | ((a6f | (v46 << 8)) << 8)) << 8)); | |
2550 *v195 = v47; | |
2551 v195 = (unsigned __int16 *)((char *)v195 + 1); | |
2552 ++v38; | |
2553 if ( v38 >= dstWidth ) | |
2554 goto LABEL_80; | |
2555 } | |
2556 v171 = LODWORD(v153) - LODWORD(v144); | |
2557 v186 = &pSrc[2 * (LODWORD(v126) + srcPitch * LODWORD(v144))]; | |
2558 while ( SLODWORD(v126) >= SLODWORD(v135) ) | |
2559 { | |
2560 LABEL_74: | |
2561 v186 += 2 * srcPitch; | |
2562 --v171; | |
2563 if ( !v171 ) | |
2564 goto LABEL_75; | |
2565 } | |
2566 v178 = (int *)v186; | |
2567 v163 = LODWORD(v135) - LODWORD(v126); | |
2568 while ( 1 ) | |
2569 { | |
2570 v45 = _450FB1(*v178); | |
2571 break; | |
2572 LABEL_73: | |
2573 ++v178; | |
2574 --v163; | |
2575 if ( !v163 ) | |
2576 goto LABEL_74; | |
2577 } | |
2578 LODWORD(v242) = ((unsigned int)v45 >> 24) + v242; | |
2579 a6f += BYTE2(v45); | |
2580 v254 += BYTE1(v45); | |
2581 HIDWORD(v242) += (unsigned __int8)v45; | |
2582 goto LABEL_73; | |
2583 } | |
2584 result = this->field_20.field_C; | |
2585 if ( result != 8 ) | |
2586 { | |
2587 if ( result != 16 ) | |
2588 { | |
2589 if ( result != 32) | |
2590 return result; | |
2591 result = (int)pDst; | |
2592 v196 = pDst; | |
2593 v234 = 0; | |
2594 if ( dstHeight <= 0 ) | |
2595 return result; | |
2596 a9c = 4 * (dstPitch - dstWidth); | |
2597 while ( 1 ) | |
2598 { | |
2599 v50 = 0; | |
2600 if ( dstWidth > 0 ) | |
2601 break; | |
2602 LABEL_108: | |
2603 v196 = (unsigned __int16 *)((char *)v196 + a9c); | |
2604 ++v234; | |
2605 result = v234; | |
2606 if ( v234 >= dstHeight ) | |
2607 return result; | |
2608 } | |
2609 while ( 1 ) | |
2610 { | |
2611 a6y = (double)v50 / (double)dstWidth * (double)srcWidth; | |
2612 v127 = a6y + 6.7553994e15; | |
2613 a6z = (double)(v50 + 1) / (double)dstWidth * (double)srcWidth; | |
2614 v136 = a6z + 6.7553994e15; | |
2615 v53 = (double)v234 / (double)dstHeight * (double)srcHeight; | |
2616 v145 = v53 + 6.7553994e15; | |
2617 v54 = (double)(v234 + 1) / (double)dstHeight * (double)srcHeight; | |
2618 v154 = v54 + 6.7553994e15; | |
2619 v55 = (LODWORD(v154) - LODWORD(v145)) * (LODWORD(v136) - LODWORD(v127)); | |
2620 v255 = 0; | |
2621 a6h = 0; | |
2622 v243 = 0i64; | |
2623 if ( SLODWORD(v145) < SLODWORD(v154) ) | |
2624 break; | |
2625 LABEL_103: | |
2626 v58 = (unsigned int)v243 / ((LODWORD(v154) - LODWORD(v145)) * (LODWORD(v136) - LODWORD(v127))); | |
2627 if ( v55 ) | |
2628 { | |
2629 a6h /= v55; | |
2630 v255 /= v55; | |
2631 HIDWORD(v243) /= v55; | |
2632 } | |
2633 if ( v58 != 255 ) | |
2634 v58 &= 0x7FFFFFFFu; | |
2635 v59 = _450F55(HIDWORD(v243) | ((v255 | ((a6h | (v58 << 8)) << 8)) << 8)); | |
2636 *(_DWORD *)v196 = v59; | |
2637 v196 += 2; | |
2638 ++v50; | |
2639 if ( v50 >= dstWidth ) | |
2640 goto LABEL_108; | |
2641 } | |
2642 v172 = LODWORD(v154) - LODWORD(v145); | |
2643 v187 = &pSrc[LODWORD(v127) + srcPitch * LODWORD(v145)]; | |
2644 while ( SLODWORD(v127) >= SLODWORD(v136) ) | |
2645 { | |
2646 LABEL_102: | |
2647 v187 += srcPitch; | |
2648 --v172; | |
2649 if ( !v172 ) | |
2650 goto LABEL_103; | |
2651 } | |
2652 v179 = (int *)v187; | |
2653 v164 = LODWORD(v136) - LODWORD(v127); | |
2654 while ( 1 ) | |
2655 { | |
2656 v57 = _450FB1(*(_WORD *)v179); | |
2657 break; | |
2658 LABEL_101: | |
2659 v179 = (int *)((char *)v179 + 2); | |
2660 --v164; | |
2661 if ( !v164 ) | |
2662 goto LABEL_102; | |
2663 } | |
2664 LODWORD(v243) = ((unsigned int)v57 >> 24) + v243; | |
2665 a6h += BYTE2(v57); | |
2666 v255 += BYTE1(v57); | |
2667 HIDWORD(v243) += (unsigned __int8)v57; | |
2668 goto LABEL_101; | |
2669 } | |
2670 result = (int)pDst; | |
2671 v197 = pDst; | |
2672 v235 = 0; | |
2673 if ( dstHeight <= 0 ) | |
2674 return result; | |
2675 a9d = 2 * (dstPitch - dstWidth); | |
2676 while ( 1 ) | |
2677 { | |
2678 v62 = 0; | |
2679 if ( dstWidth > 0 ) | |
2680 break; | |
2681 LABEL_133: | |
2682 v197 = (unsigned __int16 *)((char *)v197 + a9d); | |
2683 ++v235; | |
2684 result = v235; | |
2685 if ( v235 >= dstHeight ) | |
2686 return result; | |
2687 } | |
2688 while ( 1 ) | |
2689 { | |
2690 a6ba = (double)v62 / (double)dstWidth * (double)srcWidth; | |
2691 _v128 = ceilf(a6ba - 0.5f); | |
2692 a6bb = (double)(v62 + 1) / (double)dstWidth * (double)srcWidth; | |
2693 _v137 = ceilf(a6bb - 0.5f); | |
2694 v65 = (double)v235 / (double)dstHeight * (double)srcHeight; | |
2695 _v146 = ceilf(v65 - 0.5f); | |
2696 v66 = (double)(v235 + 1) / (double)dstHeight * (double)srcHeight; | |
2697 _v155 = ceilf(v66 - 0.5f); | |
2698 v67 = (_v155 - _v146) * (_v137 - _v128); | |
2699 v256 = 0; | |
2700 a6j = 0; | |
2701 v244 = 0i64; | |
2702 if (_v146 < _v155) | |
2703 break; | |
2704 LABEL_128: | |
2705 v70 = (unsigned int)v244 / ((_v155 - _v146) * (_v137 - _v128)); | |
2706 if ( v67 ) | |
2707 { | |
2708 a6j /= v67; | |
2709 v256 /= v67; | |
2710 HIDWORD(v244) /= v67; | |
2711 } | |
2712 if ( v70 != 255 ) | |
2713 v70 &= 0x7FFFFFFFu; | |
2714 v71 = _450F55(HIDWORD(v244) | ((v256 | ((a6j | (v70 << 8)) << 8)) << 8)); | |
2715 *v197 = v71; | |
2716 ++v197; | |
2717 ++v62; | |
2718 if ( v62 >= dstWidth ) | |
2719 goto LABEL_133; | |
2720 } | |
2721 v173 = _v155 - _v146; | |
2722 v188 = &pSrc[_v128 + srcPitch * _v146]; | |
2723 while (_v128 >= _v137) | |
2724 { | |
2725 LABEL_127: | |
2726 v188 += srcPitch; | |
2727 --v173; | |
2728 if ( !v173 ) | |
2729 goto LABEL_128; | |
2730 } | |
2731 v180 = (int *)v188; | |
2732 v165 = _v137 - _v128; | |
2733 while ( 1 ) | |
2734 { | |
2735 v69 = _450FB1(*(_WORD *)v180); | |
2736 break; | |
2737 LABEL_126: | |
2738 v180 = (int *)((char *)v180 + 2); | |
2739 --v165; | |
2740 if ( !v165 ) | |
2741 goto LABEL_127; | |
2742 } | |
2743 LODWORD(v244) = ((unsigned int)v69 >> 24) + v244; | |
2744 a6j += BYTE2(v69); | |
2745 v256 += BYTE1(v69); | |
2746 HIDWORD(v244) += (unsigned __int8)v69; | |
2747 goto LABEL_126; | |
2748 } | |
2749 result = (int)pDst; | 2259 result = (int)pDst; |
2750 v198 = pDst; | 2260 v193 = pDst; |
2751 v236 = 0; | 2261 v231 = 0; |
2752 if ( dstHeight <= 0 ) | 2262 if ( dstHeight <= 0 ) |
2753 return result; | 2263 return result; |
2754 while ( 1 ) | 2264 while ( 1 ) |
2755 { | 2265 { |
2756 v74 = 0; | 2266 v14 = 0; |
2757 if ( dstWidth > 0 ) | 2267 if ( dstWidth > 0 ) |
2758 break; | 2268 break; |
2759 LABEL_158: | 2269 LABEL_30: |
2760 v198 = (unsigned __int16 *)((char *)v198 + dstPitch - dstWidth); | 2270 v193 = (unsigned __int16 *)((char *)v193 + dstdiffmult); |
2761 ++v236; | 2271 ++v231; |
2762 result = v236; | 2272 result = v231; |
2763 if ( v236 >= dstHeight ) | 2273 if ( v231 >= dstHeight ) |
2764 return result; | 2274 return result; |
2765 } | 2275 } |
2766 while ( 1 ) | 2276 while ( 1 ) |
2767 { | 2277 { |
2768 a6bc = (double)v74 / (double)dstWidth * (double)srcWidth; | 2278 a6s = (double)v14 / (double)dstWidth * (double)srcWidth; |
2769 v129 = a6bc + 6.7553994e15; | 2279 v151 = floorf(a6s + 0.5f);//a6s + 6.7553994e15; |
2770 a6bd = (double)(v74 + 1) / (double)dstWidth * (double)srcWidth; | 2280 a6t = (double)(v14 + 1) / (double)dstWidth * (double)srcWidth; |
2771 v138 = a6bd + 6.7553994e15; | 2281 v142 = floorf(a6t + 0.5f);//a6t + 6.7553994e15; |
2772 v77 = (double)v236 / (double)dstHeight * (double)srcHeight; | 2282 v17 = (double)v231 / (double)dstHeight * (double)srcHeight; |
2773 v147 = v77 + 6.7553994e15; | 2283 v133 = floorf(v17 + 0.5f);//v17 + 6.7553994e15; |
2774 v78 = (double)(v236 + 1) / (double)dstHeight * (double)srcHeight; | 2284 v18 = (double)(v231 + 1) / (double)dstHeight * (double)srcHeight; |
2775 v156 = v78 + 6.7553994e15; | 2285 v124 = floorf(v18 + 0.5f);//v18 + 6.7553994e15; |
2776 v257 = 0; | 2286 v19 = (LODWORD(v124) - LODWORD(v133)) * (LODWORD(v142) - LODWORD(v151)); |
2777 v79 = (LODWORD(v156) - LODWORD(v147)) * (LODWORD(v138) - LODWORD(v129)); | 2287 v252 = 0; |
2778 a6l = 0; | 2288 a6b = 0; |
2779 v245 = 0i64; | 2289 v240 = 0i64; |
2780 if ( SLODWORD(v147) < SLODWORD(v156) ) | 2290 if ( SLODWORD(v133) < SLODWORD(v124) ) |
2781 break; | 2291 break; |
2782 LABEL_153: | 2292 LABEL_25: |
2783 v82 = (unsigned int)v245 / ((LODWORD(v156) - LODWORD(v147)) * (LODWORD(v138) - LODWORD(v129))); | 2293 v22 = (unsigned int)v240 / ((LODWORD(v124) - LODWORD(v133)) * (LODWORD(v142) - LODWORD(v151))); |
2784 if ( v79 ) | 2294 if ( v19 ) |
2785 { | 2295 { |
2786 a6l /= v79; | 2296 a6b /= v19; |
2787 v257 /= v79; | 2297 v252 /= v19; |
2788 HIDWORD(v245) /= v79; | 2298 HIDWORD(v240) /= v19; |
2789 } | 2299 } |
2790 if ( v82 != 255 ) | 2300 if ( v22 != 255 ) |
2791 v82 &= 0x7FFFFFFFu; | 2301 v22 &= 0x7FFFFFFFu; |
2792 v83 = _450F55(HIDWORD(v245) | ((v257 | ((a6l | (v82 << 8)) << 8)) << 8)); | 2302 v23 = _450F55(HIDWORD(v240) | ((v252 | ((a6b | (v22 << 8)) << 8)) << 8)); |
2793 *v198 = v83; | 2303 *(_DWORD *)v193 = v23; |
2794 v198 = (unsigned __int16 *)((char *)v198 + 1); | 2304 switch(probablyBitDepth) |
2795 ++v74; | 2305 { |
2796 if ( v74 >= dstWidth ) | 2306 case 8: v193 = (unsigned __int16 *)((char *)v193 + 1); |
2797 goto LABEL_158; | 2307 break; |
2798 } | 2308 case 16: ++v193; |
2799 v174 = LODWORD(v156) - LODWORD(v147); | 2309 break; |
2800 v189 = &pSrc[LODWORD(v129) + srcPitch * LODWORD(v147)]; | 2310 case 32: v193 += 2; |
2801 while ( SLODWORD(v129) >= SLODWORD(v138) ) | 2311 break; |
2802 { | 2312 default: |
2803 LABEL_152: | 2313 assert(false); |
2804 v189 += srcPitch; | 2314 return result; |
2805 --v174; | 2315 } |
2806 if ( !v174 ) | 2316 ++v14; |
2807 goto LABEL_153; | 2317 if ( v14 >= dstWidth ) |
2808 } | 2318 goto LABEL_30; |
2809 v166 = LODWORD(v138) - LODWORD(v129); | 2319 } |
2810 v181 = (int *)v189; | 2320 v160 = LODWORD(v124) - LODWORD(v133); |
2321 v175 = &pSrc[2 * (LODWORD(v151) + srcPitch * LODWORD(v133))]; | |
2322 while ( SLODWORD(v151) >= SLODWORD(v142) ) | |
2323 { | |
2324 LABEL_24: | |
2325 v175 += 2 * srcPitch; | |
2326 --v160; | |
2327 if ( !v160 ) | |
2328 goto LABEL_25; | |
2329 } | |
2330 v176 = (int *)v175; | |
2331 v161 = LODWORD(v142) - LODWORD(v151); | |
2811 while ( 1 ) | 2332 while ( 1 ) |
2812 { | 2333 { |
2813 v81 = _450FB1(*(_WORD *)v181); | 2334 v21 = _450FB1(*v176); |
2335 break; | |
2336 LABEL_23: | |
2337 ++v176; | |
2338 --v161; | |
2339 if ( !v161 ) | |
2340 goto LABEL_24; | |
2341 } | |
2342 LODWORD(v240) = ((unsigned int)v21 >> 24) + v240; | |
2343 a6b += BYTE2(v21); | |
2344 v252 += BYTE1(v21); | |
2345 HIDWORD(v240) += (unsigned __int8)v21; | |
2346 goto LABEL_23; | |
2347 } | |
2348 | |
2349 else if ( result == 16 ) | |
2350 { | |
2351 result = (int)pDst; | |
2352 v196 = pDst; | |
2353 v234 = 0; | |
2354 if ( dstHeight <= 0 ) | |
2355 return result; | |
2356 while ( 1 ) | |
2357 { | |
2358 v50 = 0; | |
2359 if ( dstWidth > 0 ) | |
2814 break; | 2360 break; |
2815 LABEL_151: | 2361 LABEL_108: |
2816 v181 = (int *)((char *)v181 + 2); | 2362 v196 = (unsigned __int16 *)((char *)v196 + dstdiffmult); |
2817 --v166; | 2363 ++v234; |
2818 if ( !v166 ) | 2364 result = v234; |
2819 goto LABEL_152; | 2365 if ( v234 >= dstHeight ) |
2820 } | 2366 return result; |
2821 LODWORD(v245) = ((unsigned int)v81 >> 24) + v245; | 2367 } |
2822 a6l += BYTE2(v81); | 2368 while ( 1 ) |
2823 v257 += BYTE1(v81); | 2369 { |
2824 HIDWORD(v245) += (unsigned __int8)v81; | 2370 a6y = (double)v50 / (double)dstWidth * (double)srcWidth; |
2825 goto LABEL_151; | 2371 v127 = ceilf(a6y - 0.5f);//a6y + 6.7553994e15; |
2826 } | 2372 a6z = (double)(v50 + 1) / (double)dstWidth * (double)srcWidth; |
2827 | 2373 v136 = ceilf(a6z - 0.5f);//a6z + 6.7553994e15; |
2828 result = this->field_20.field_C; | 2374 v53 = (double)v234 / (double)dstHeight * (double)srcHeight; |
2829 int probablyBitDepth = this->field_20.field_C; | 2375 v145 = ceilf(v53 - 0.5f);//v53 + 6.7553994e15; |
2830 switch(result) | 2376 v54 = (double)(v234 + 1) / (double)dstHeight * (double)srcHeight; |
2831 { | 2377 v154 = ceilf(v54 - 0.5f);//v54 + 6.7553994e15; |
2832 case 8: vxx = dstPitch - dstWidth; | 2378 v55 = (v154 - v145) * (v136 - v127); |
2833 break; | 2379 v255 = 0; |
2834 case 16: vxx = 2 * (dstPitch - dstWidth); | 2380 a6h = 0; |
2835 break; | 2381 v243 = 0i64; |
2836 case 32: vxx = 4 * (dstPitch - dstWidth); | 2382 if ( v145 < v154 ) |
2837 break; | 2383 break; |
2838 default: | 2384 LABEL_103: |
2839 return result; | 2385 v58 = (unsigned int)v243 / ((v154 - v145) * (v136 - v127)); |
2840 } | 2386 if ( v55 ) |
2841 if ( result == 8 ) | 2387 { |
2388 a6h /= v55; | |
2389 v255 /= v55; | |
2390 HIDWORD(v243) /= v55; | |
2391 } | |
2392 if ( v58 != 255 ) | |
2393 v58 &= 0x7FFFFFFFu; | |
2394 v59 = _450F55(HIDWORD(v243) | ((v255 | ((a6h | (v58 << 8)) << 8)) << 8)); | |
2395 *(_DWORD *)v196 = v59; | |
2396 switch(probablyBitDepth) | |
2397 { | |
2398 case 8: v196 = (unsigned __int16 *)((char *)v196 + 1); | |
2399 break; | |
2400 case 16: ++v196; | |
2401 break; | |
2402 case 32: v196 += 2; | |
2403 break; | |
2404 default: | |
2405 assert(false); | |
2406 return result; | |
2407 } | |
2408 ++v50; | |
2409 if ( v50 >= dstWidth ) | |
2410 goto LABEL_108; | |
2411 } | |
2412 v172 = v154 - v145; | |
2413 v187 = &pSrc[v127 + srcPitch * v145]; | |
2414 while ( v127 >= v136 ) | |
2415 { | |
2416 LABEL_102: | |
2417 v187 += srcPitch; | |
2418 --v172; | |
2419 if ( !v172 ) | |
2420 goto LABEL_103; | |
2421 } | |
2422 v179 = (int *)v187; | |
2423 v164 = LODWORD(v136) - LODWORD(v127); | |
2424 while ( 1 ) | |
2425 { | |
2426 v57 = _450FB1(*(_WORD *)v179); | |
2427 break; | |
2428 LABEL_101: | |
2429 v179 = (int *)((char *)v179 + 2); | |
2430 --v164; | |
2431 if ( !v164 ) | |
2432 goto LABEL_102; | |
2433 } | |
2434 LODWORD(v243) = ((unsigned int)v57 >> 24) + v243; | |
2435 a6h += BYTE2(v57); | |
2436 v255 += BYTE1(v57); | |
2437 HIDWORD(v243) += (unsigned __int8)v57; | |
2438 goto LABEL_101; | |
2439 } | |
2440 | |
2441 else if ( result == 8 ) | |
2842 { | 2442 { |
2843 result = (int)pDst; | 2443 result = (int)pDst; |
2844 v201 = pDst; | 2444 v201 = pDst; |
2845 v239 = 0; | 2445 v239 = 0; |
2846 if ( dstHeight <= 0 ) | 2446 if ( dstHeight <= 0 ) |
2912 } | 2512 } |
2913 ++v112; | 2513 ++v112; |
2914 } | 2514 } |
2915 while ( v112 < dstWidth ); | 2515 while ( v112 < dstWidth ); |
2916 LABEL_236: | 2516 LABEL_236: |
2917 v201 = (unsigned __int16 *)((char *)v201 + vxx); | 2517 v201 = (unsigned __int16 *)((char *)v201 + dstdiffmult); |
2918 ++v239; | 2518 ++v239; |
2919 result = v239; | 2519 result = v239; |
2920 if ( v239 >= dstHeight ) | 2520 if ( v239 >= dstHeight ) |
2921 return result; | 2521 return result; |
2922 } | 2522 } |
2523 } | |
2524 else //( result != 8 && result != 16 && result != 32 ) | |
2525 { | |
2526 return result; | |
2923 } | 2527 } |
2924 } | 2528 } |
2925 | 2529 |
2926 //----- (0044E1EC) -------------------------------------------------------- | 2530 //----- (0044E1EC) -------------------------------------------------------- |
2927 int TextureFrameTable::FromFileTxt(const char *Args) | 2531 int TextureFrameTable::FromFileTxt(const char *Args) |