Mercurial > mm7
comparison mm7_1.cpp @ 1225:42b41aaecd87
Слияние
author | Ritor1 |
---|---|
date | Wed, 05 Jun 2013 21:00:45 +0600 |
parents | b89a20cd8a54 883eaee77094 |
children | 33b30398e286 |
comparison
equal
deleted
inserted
replaced
1224:23632c91ed0a | 1225:42b41aaecd87 |
---|---|
1 #ifdef _MSC_VER | |
2 #define _CRT_SECURE_NO_WARNINGS | |
3 #endif | |
4 | |
1 /* This file has been generated by the Hex-Rays decompiler. | 5 /* This file has been generated by the Hex-Rays decompiler. |
2 Copyright (c) 2007-2011 Hex-Rays <info@hex-rays.com> | 6 Copyright (c) 2007-2011 Hex-Rays <info@hex-rays.com> |
3 | 7 |
4 Detected compiler: Visual C++ | 8 Detected compiler: Visual C++ |
5 */ | 9 */ |
2225 } | 2229 } |
2226 | 2230 |
2227 //----- (00424829) -------------------------------------------------------- | 2231 //----- (00424829) -------------------------------------------------------- |
2228 bool sub_424829(int pNumVertices, BspRenderer_stru2 *a2, BspRenderer_stru2 *a3, int uFaceID) | 2232 bool sub_424829(int pNumVertices, BspRenderer_stru2 *a2, BspRenderer_stru2 *a3, int uFaceID) |
2229 { | 2233 { |
2234 //int v4; // edi@1 | |
2235 //BspRenderer_stru2 *v5; // ebx@1 | |
2230 int v6; // eax@3 | 2236 int v6; // eax@3 |
2231 int v7; // esi@5 | 2237 int v7; // esi@5 |
2232 int v8; // edx@5 | 2238 int v8; // edx@5 |
2239 //int v9; // ecx@6 | |
2233 int v10; // eax@12 | 2240 int v10; // eax@12 |
2234 int v11; // edi@13 | 2241 //int v11; // edi@13 |
2242 //int v12; // edx@18 | |
2235 int v13; // eax@22 | 2243 int v13; // eax@22 |
2244 //int v14; // edi@28 | |
2236 int v15; // ecx@29 | 2245 int v15; // ecx@29 |
2237 int v16; // edi@30 | 2246 //int v16; // edi@30 |
2247 //int v17; // edx@35 | |
2238 int v18; // eax@39 | 2248 int v18; // eax@39 |
2239 int v19; // eax@44 | 2249 int v19; // eax@44 |
2240 int v20; // ecx@44 | 2250 int v20; // ecx@44 |
2251 //int v21; // edi@45 | |
2241 int v22; // edi@46 | 2252 int v22; // edi@46 |
2242 __int16 *v23; // ecx@47 | 2253 //__int16 *v23; // ecx@47 |
2243 int v24; // edx@48 | 2254 int v24; // edx@48 |
2244 int v25; // eax@50 | 2255 //int v25; // eax@50 |
2245 int v26; // eax@55 | 2256 int v26; // eax@55 |
2246 signed int v27; // edi@55 | 2257 signed int v27; // edi@55 |
2258 //int v28; // edx@56 | |
2247 int v29; // edx@57 | 2259 int v29; // edx@57 |
2248 int v30; // eax@59 | 2260 //int v30; // eax@59 |
2249 int v31; // eax@64 | 2261 int v31; // eax@64 |
2250 signed int v32; // edi@64 | 2262 signed int v32; // edi@64 |
2251 __int16 *v34; // eax@66 | 2263 //int v33; // edx@65 |
2252 __int16 v35; // dx@66 | 2264 int v34; // eax@66 |
2265 int v35; // dx@66 | |
2253 __int16 v36; // dx@67 | 2266 __int16 v36; // dx@67 |
2254 __int16 v37; // di@67 | 2267 __int16 v37; // di@67 |
2255 __int16 v38; // dx@67 | 2268 __int16 v38; // dx@67 |
2256 int v40; // edx@69 | 2269 //BspRenderer_stru2 *v39; // ecx@69 |
2257 int v41; // edi@70 | 2270 //int v40; // edx@69 |
2258 __int16 *v42; // eax@76 | 2271 //int v41; // edi@70 |
2259 __int16 *v43; // eax@81 | 2272 //__int16 *v42; // eax@76 |
2260 __int16 *v45; // eax@87 | 2273 //__int16 *v43; // eax@81 |
2274 //__int16 *v45; // eax@87 | |
2261 int v46; // edx@87 | 2275 int v46; // edx@87 |
2262 __int16 v47; // cx@88 | 2276 //__int16 v47; // cx@88 |
2263 //int v48; // eax@93 | 2277 //int v48; // eax@93 |
2264 int v49; // esi@93 | 2278 int v49; // esi@93 |
2265 __int16 *v50; // ecx@94 | 2279 //__int16 *v50; // ecx@94 |
2266 int v51; // eax@95 | 2280 //int v51; // eax@95 |
2281 //int v52; // eax@97 | |
2267 int v53; // [sp+Ch] [bp-34h]@44 | 2282 int v53; // [sp+Ch] [bp-34h]@44 |
2268 int v54; // [sp+10h] [bp-30h]@0 | 2283 int v54; // [sp+10h] [bp-30h]@0 |
2269 int v55; // [sp+14h] [bp-2Ch]@12 | 2284 int v55; // [sp+14h] [bp-2Ch]@12 |
2270 __int16 *v56; // [sp+14h] [bp-2Ch]@47 | 2285 //__int16 *v56; // [sp+14h] [bp-2Ch]@47 |
2271 __int16 *v57; // [sp+14h] [bp-2Ch]@76 | 2286 //__int16 v57; // [sp+14h] [bp-2Ch]@76 |
2272 __int16 *v58; // [sp+14h] [bp-2Ch]@81 | 2287 //__int16 v58; // [sp+14h] [bp-2Ch]@81 |
2273 __int16 *v59; // [sp+14h] [bp-2Ch]@87 | 2288 int v59; // [sp+14h] [bp-2Ch]@87 |
2289 //BspRenderer_stru2 *v60; // [sp+18h] [bp-28h]@1 | |
2274 int v61; // [sp+1Ch] [bp-24h]@29 | 2290 int v61; // [sp+1Ch] [bp-24h]@29 |
2275 int v62; // [sp+20h] [bp-20h]@0 | 2291 int v62; // [sp+20h] [bp-20h]@0 |
2276 signed int v63; // [sp+24h] [bp-1Ch]@3 | 2292 signed int v63; // [sp+24h] [bp-1Ch]@3 |
2277 signed int v64; // [sp+28h] [bp-18h]@3 | 2293 signed int v64; // [sp+28h] [bp-18h]@3 |
2278 int v65; // [sp+2Ch] [bp-14h]@5 | 2294 int v65; // [sp+2Ch] [bp-14h]@5 |
2279 int v66; // [sp+2Ch] [bp-14h]@39 | 2295 //int v66; // [sp+2Ch] [bp-14h]@39 |
2280 int v67; // [sp+30h] [bp-10h]@22 | 2296 //int v67; // [sp+30h] [bp-10h]@22 |
2281 int v68; // [sp+34h] [bp-Ch]@12 | 2297 int v68; // [sp+34h] [bp-Ch]@12 |
2282 int v69; // [sp+34h] [bp-Ch]@29 | 2298 int v69; // [sp+34h] [bp-Ch]@29 |
2283 int v70; // [sp+34h] [bp-Ch]@46 | 2299 int v70; // [sp+34h] [bp-Ch]@46 |
2284 int v71; // [sp+34h] [bp-Ch]@75 | 2300 int v71; // [sp+34h] [bp-Ch]@75 |
2285 int v72; // [sp+34h] [bp-Ch]@80 | 2301 int v72; // [sp+34h] [bp-Ch]@80 |
2286 int v73; // [sp+38h] [bp-8h]@11 | 2302 //int v73; // [sp+38h] [bp-8h]@11 |
2287 int a3a; // [sp+48h] [bp+8h]@76 | 2303 //int v74; // [sp+3Ch] [bp-4h]@1 |
2288 int a3b; // [sp+48h] [bp+8h]@87 | 2304 //int a3a; // [sp+48h] [bp+8h]@76 |
2305 //int a3b; // [sp+48h] [bp+8h]@87 | |
2289 | 2306 |
2290 //try graphic engine with function returning 1 always, and without | 2307 //try graphic engine with function returning 1 always, and without |
2291 //return true; | 2308 //return true; |
2292 if ( !pNumVertices ) | 2309 if ( !pNumVertices ) |
2293 return false; | 2310 return false; |
2317 { | 2334 { |
2318 v65 = v6; | 2335 v65 = v6; |
2319 v7 = stru_50B700._screen_space_y[v6]; | 2336 v7 = stru_50B700._screen_space_y[v6]; |
2320 } | 2337 } |
2321 } | 2338 } |
2322 v73 = v8; | |
2323 if ( v8 == v7 ) | 2339 if ( v8 == v7 ) |
2324 return false; | 2340 return false; |
2325 v10 = v65; | 2341 v10 = v65; |
2326 a2->_viewport_space_y = v7; | 2342 a2->_viewport_space_y = v7; |
2327 a2->_viewport_space_w = v8; | 2343 a2->_viewport_space_w = v8; |
2328 v55 = v65; | 2344 v55 = v65; |
2329 if ( pNumVertices > 0 ) | 2345 if ( pNumVertices > 0 ) |
2330 { | 2346 { |
2331 v11 = v65; | 2347 //v11 = v65; |
2332 for ( v68 = 0; v68 < pNumVertices; ++v68 ) | 2348 for ( v68 = 0; v68 < pNumVertices; ++v68 ) |
2333 { | 2349 { |
2334 v10 += v64; | 2350 v10 += v64; |
2335 if ( v10 < pNumVertices ) | 2351 if ( v10 < pNumVertices ) |
2336 { | 2352 { |
2339 } | 2355 } |
2340 else | 2356 else |
2341 { | 2357 { |
2342 v10 -= pNumVertices; | 2358 v10 -= pNumVertices; |
2343 } | 2359 } |
2344 if ( stru_50B700._screen_space_y[v10] <= stru_50B700._screen_space_y[v11] ) | 2360 if ( stru_50B700._screen_space_y[v10] <= stru_50B700._screen_space_y[v65] ) |
2345 { | 2361 { |
2346 v55 = v10; | 2362 v55 = v10; |
2347 v11 = v10; | 2363 v65 = v10; |
2348 } | 2364 } |
2349 if ( stru_50B700._screen_space_y[v10] == v73 ) | 2365 if ( stru_50B700._screen_space_y[v10] == v8 ) |
2350 break; | 2366 break; |
2351 } | 2367 } |
2352 } | 2368 } |
2353 v13 = v55 + v64; | 2369 v13 = v55 + v64; |
2354 v67 = v55 + v64; | 2370 if ( v13 < pNumVertices ) |
2355 if ( v55 + v64 < pNumVertices ) | 2371 { |
2356 { | 2372 if ( v13 < 0 ) |
2357 if ( v13 >= 0 ) | 2373 v13 += pNumVertices; |
2358 goto LABEL_27; | |
2359 v13 += pNumVertices; | |
2360 } | 2374 } |
2361 else | 2375 else |
2362 { | 2376 { |
2363 v13 -= pNumVertices; | 2377 v13 -= pNumVertices; |
2364 } | 2378 } |
2365 v67 = v13; | |
2366 LABEL_27: | |
2367 if ( stru_50B700._screen_space_y[v13] != stru_50B700._screen_space_y[v55] ) | 2379 if ( stru_50B700._screen_space_y[v13] != stru_50B700._screen_space_y[v55] ) |
2368 { | 2380 { |
2369 v62 = stru_50B700._screen_space_x[v55] << 16; | 2381 v62 = stru_50B700._screen_space_x[v55] << 16; |
2370 v54 = ((stru_50B700._screen_space_x[v13] - stru_50B700._screen_space_x[v55]) << 16) / (stru_50B700._screen_space_y[v13] - stru_50B700._screen_space_y[v55]); | 2382 v54 = ((stru_50B700._screen_space_x[v13] - stru_50B700._screen_space_x[v55]) << 16) / (stru_50B700._screen_space_y[v13] - stru_50B700._screen_space_y[v55]); |
2371 a2->array_18[v7] = LOWORD(stru_50B700._screen_space_x[v55]); | 2383 a2->array_18[v7] = LOWORD(stru_50B700._screen_space_x[v55]); |
2372 } | 2384 } |
2373 v15 = v65; | 2385 v15 = v65; |
2374 v61 = v65; | 2386 v61 = v65; |
2375 if ( pNumVertices > 0 ) | 2387 if ( pNumVertices > 0 ) |
2376 { | 2388 { |
2377 v16 = v65; | 2389 //v16 = v65; |
2378 for ( v69 = 0; v69 < pNumVertices; ++v69 ) | 2390 for ( v69 = 0; v69 < pNumVertices; ++v69 ) |
2379 { | 2391 { |
2380 v15 += v63; | 2392 v15 += v63; |
2381 if ( v15 < pNumVertices ) | 2393 if ( v15 < pNumVertices ) |
2382 { | 2394 { |
2385 } | 2397 } |
2386 else | 2398 else |
2387 { | 2399 { |
2388 v15 -= pNumVertices; | 2400 v15 -= pNumVertices; |
2389 } | 2401 } |
2390 if ( stru_50B700._screen_space_y[v15] <= stru_50B700._screen_space_y[v16] ) | 2402 if ( stru_50B700._screen_space_y[v15] <= stru_50B700._screen_space_y[v65] ) |
2391 { | 2403 { |
2392 v61 = v15; | 2404 v61 = v15; |
2393 v16 = v15; | 2405 v65 = v15; |
2394 } | 2406 } |
2395 if ( stru_50B700._screen_space_y[v15] == v73 ) | 2407 if ( stru_50B700._screen_space_y[v15] == v8 ) |
2396 break; | 2408 break; |
2397 } | 2409 } |
2398 } | 2410 } |
2399 v18 = v63 + v61; | 2411 v18 = v63 + v61; |
2400 v66 = v63 + v61; | 2412 if ( v18 < pNumVertices ) |
2401 if ( v63 + v61 < pNumVertices ) | 2413 { |
2402 { | 2414 if ( v18 < 0 ) |
2403 if ( v18 >= 0 ) | 2415 v18 += pNumVertices; |
2404 goto LABEL_44; | |
2405 v18 += pNumVertices; | |
2406 } | 2416 } |
2407 else | 2417 else |
2408 { | 2418 { |
2409 v18 -= pNumVertices; | 2419 v18 -= pNumVertices; |
2410 } | 2420 } |
2411 v66 = v18; | |
2412 LABEL_44: | |
2413 v19 = v18; | 2421 v19 = v18; |
2414 v20 = v61; | 2422 v20 = v61; |
2415 if ( stru_50B700._screen_space_y[v19] != stru_50B700._screen_space_y[v61] ) | 2423 if ( stru_50B700._screen_space_y[v19] != stru_50B700._screen_space_y[v61] ) |
2416 { | 2424 { |
2417 v61 = stru_50B700._screen_space_x[v20] << 16; | 2425 v61 = stru_50B700._screen_space_x[v20] << 16; |
2418 v53 = ((stru_50B700._screen_space_x[v19] - stru_50B700._screen_space_x[v20]) << 16) / stru_50B700._screen_space_y[v19] - stru_50B700._screen_space_y[v20]; | 2426 v53 = ((stru_50B700._screen_space_x[v19] - stru_50B700._screen_space_x[v20]) << 16) / stru_50B700._screen_space_y[v19] - stru_50B700._screen_space_y[v20]; |
2419 a2->array_3D8[v73] = LOWORD(stru_50B700._screen_space_x[v20]); | 2427 a2->array_3D8[v8] = LOWORD(stru_50B700._screen_space_x[v20]); |
2420 } | 2428 } |
2421 v22 = v7; | 2429 v22 = v7; |
2422 if ( v7 <= v73 ) | 2430 if ( v7 <= v8 ) |
2423 { | 2431 { |
2424 v56 = &a2->array_3D8[v7]; | 2432 //v56 = &a2->array_3D8[v7]; |
2425 v23 = &a2->array_18[v7]; | 2433 //v23 = &a2->array_18[v7]; |
2426 for ( v70 = v7; v70 <= v73; ++v70 ) | 2434 for ( v70 = v7; v70 <= v8; ++v70 ) |
2427 { | 2435 { |
2428 v24 = v67; | 2436 v24 = v13; |
2429 if ( v22 < stru_50B700._screen_space_y[v67] || v22 == v73 ) | 2437 if ( v22 >= stru_50B700._screen_space_y[v13] && v22 != v8 ) |
2430 goto LABEL_57; | 2438 { |
2431 v25 = v64 + v67; | 2439 v13 = v64 + v13; |
2432 v67 = v25; | 2440 if ( v13 < pNumVertices ) |
2433 if ( v25 < pNumVertices ) | 2441 { |
2434 { | 2442 if ( v13 < 0 ) |
2435 if ( v25 >= 0 ) | 2443 v13 += pNumVertices; |
2436 goto LABEL_55; | 2444 } |
2437 v25 += pNumVertices; | 2445 else |
2438 } | 2446 { |
2439 else | 2447 v13 -= pNumVertices; |
2440 { | 2448 } |
2441 v25 -= pNumVertices; | 2449 v26 = v13; |
2442 } | 2450 //v27 = stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24]; |
2443 v67 = v25; | 2451 if ( stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24] > 0 ) |
2444 LABEL_55: | 2452 { |
2445 v26 = v25; | 2453 v54 = ((stru_50B700._screen_space_x[v26] - stru_50B700._screen_space_x[v24]) << 16) / stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24]; |
2446 //v27 = stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24]; | 2454 v62 = stru_50B700._screen_space_x[v24] << 16; |
2447 if ( stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24] > 0 ) | 2455 } |
2448 { | 2456 } |
2449 v54 = ((stru_50B700._screen_space_x[v26] - stru_50B700._screen_space_x[v24]) << 16) / stru_50B700._screen_space_y[v26] - stru_50B700._screen_space_y[v24]; | 2457 v29 = v18; |
2450 v62 = stru_50B700._screen_space_x[v24] << 16; | 2458 if ( v70 >= stru_50B700._screen_space_y[v18] && v70 != v8 ) |
2451 } | 2459 { |
2452 LABEL_57: | 2460 v18 += v63; |
2453 v29 = v66; | 2461 if ( v18 < pNumVertices ) |
2454 if ( v70 >= stru_50B700._screen_space_y[v66] && v70 != v73 ) | 2462 { |
2455 { | 2463 if ( v18 < 0 ) |
2456 v30 = v63 + v66; | 2464 v18 += pNumVertices; |
2457 v66 += v63; | 2465 } |
2458 if ( v66 >= pNumVertices ) | 2466 else |
2459 { | 2467 { |
2460 v30 -= pNumVertices; | 2468 v18 -= pNumVertices; |
2461 goto LABEL_63; | 2469 } |
2462 } | 2470 v31 = v18; |
2463 if ( v30 < 0 ) | |
2464 { | |
2465 v30 += pNumVertices; | |
2466 LABEL_63: | |
2467 v66 = v30; | |
2468 } | |
2469 v31 = v30; | |
2470 //v32 = stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29]; | 2471 //v32 = stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29]; |
2471 if ( stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29] > 0 ) | 2472 if ( stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29] > 0 ) |
2472 { | 2473 { |
2473 v53 = ((stru_50B700._screen_space_x[v31] - stru_50B700._screen_space_x[v29]) << 16) / stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29]; | 2474 v53 = ((stru_50B700._screen_space_x[v31] - stru_50B700._screen_space_x[v29]) << 16) / stru_50B700._screen_space_y[v31] - stru_50B700._screen_space_y[v29]; |
2474 v61 = stru_50B700._screen_space_x[v29] << 16; | 2475 v61 = stru_50B700._screen_space_x[v29] << 16; |
2475 } | 2476 } |
2476 } | 2477 } |
2477 *(__int16 *)((char *)v56 + (int)(char *)a2->array_18 - (char *)a2->array_3D8) = HIWORD(v62); | 2478 //v34 = (char *)a2->array_18 - (char *)a2->array_3D8; |
2478 *v56 = HIWORD(v61); | 2479 //v35 = *(__int16 *)((char *)&a2->array_3D8[v70] + v34); |
2479 v34 = v23 + 480; | 2480 //v35 = HIWORD(v62); |
2480 v35 = v23[480]; | 2481 a2->array_18[v70] = HIWORD(v62); |
2481 if ( *v23 > v35 ) | 2482 a2->array_3D8[v70] = HIWORD(v61); |
2482 { | 2483 //v34 = &a2->array_3D8[v70]; |
2483 v36 = *v23 ^ v35; | 2484 //v35 = a2->array_3D8[v70]; |
2484 v37 = *v34; | 2485 if ( a2->array_18[v70] > a2->array_3D8[v70] ) |
2485 *v23 = v36; | 2486 { |
2487 v36 = a2->array_18[v70] ^ a2->array_3D8[v70]; | |
2488 v37 = a2->array_3D8[v70]; | |
2489 a2->array_18[v70] = v36; | |
2486 v38 = v37 ^ v36; | 2490 v38 = v37 ^ v36; |
2487 *v23 ^= v38; | 2491 a2->array_18[v70] ^= v38; |
2488 *v34 = v38; | 2492 a2->array_3D8[v70] = v38; |
2489 } | 2493 } |
2490 ++v56; | 2494 //++v56; |
2491 v62 += v54; | 2495 v62 += v54; |
2492 v22 = v70 + 1; | 2496 v22 = v70 + 1; |
2493 v61 += v53; | 2497 v61 += v53; |
2494 ++v23; | 2498 //++v23; |
2495 } | 2499 } |
2496 } | 2500 } |
2497 v40 = v73; | 2501 if ( v8 < a3->_viewport_space_y ) |
2498 if ( v73 < a3->_viewport_space_y || (v41 = a3->_viewport_space_w, v7 > v41) ) | 2502 return false; |
2503 if ( v7 > a3->_viewport_space_w ) | |
2499 return false; | 2504 return false; |
2500 if ( v7 < a3->_viewport_space_y ) | 2505 if ( v7 < a3->_viewport_space_y ) |
2501 v7 = a3->_viewport_space_y; | 2506 v7 = a3->_viewport_space_y; |
2502 if ( v73 > v41 ) | 2507 if ( v8 > a3->_viewport_space_w ) |
2503 { | 2508 v8 = a3->_viewport_space_w; |
2504 v40 = a3->_viewport_space_w; | 2509 if ( v7 <= v8 ) |
2505 v73 = a3->_viewport_space_w; | 2510 { |
2506 } | 2511 //a3a = (char *)a2 - (char *)a3; |
2507 if ( v7 <= v40 ) | 2512 //v42 = &a3->array_3D8[v7]; |
2508 { | 2513 //v57 = *(__int16 *)((char *)v42 + a3a); |
2509 a3a = (char *)a2 - (char *)a3; | 2514 for ( v71 = v7; v71 <= v8; ++v71 ) |
2510 v57 = &a2->array_18[v7]; | 2515 { |
2511 v42 = &a3->array_3D8[v7]; | 2516 if ( a2->array_18[v71] >= a3->array_18[v71] && a2->array_18[v71] <= a3->array_3D8[v71] ) |
2512 for ( v71 = v7; v71 <= v40; ++v71 ) | |
2513 { | |
2514 if ( *(__int16 *)((char *)v42 + a3a) >= *(v42 - 480) && a2->array_18[v71] <= a3->array_3D8[v71] ) | |
2515 break; | 2517 break; |
2516 ++v57; | 2518 //++v57; |
2517 ++v7; | 2519 ++v7; |
2518 ++v42; | 2520 //++v42; |
2519 } | 2521 } |
2520 } | 2522 } |
2521 if ( v40 < v7 ) | 2523 if ( v8 < v7 ) |
2522 return false; | 2524 return false; |
2523 v58 = &a2->array_18[v40]; | 2525 //a3a = (char *)a2 - (char *)a3; |
2524 v43 = &a3->array_3D8[v40]; | 2526 //v43 = &a3->array_3D8[v8]; |
2525 for ( v72 = v40; v72 >= v7; --v72 ) | 2527 //v58 = *(__int16 *)((char *)v43 + a3a); |
2526 { | 2528 for ( v72 = v8; v72 >= v7; --v72 ) |
2527 if ( *(__int16 *)((char *)v43 + (int)(char *)a2 - (char *)a3) >= *(v43 - 480) && *v58 <= a3->array_3D8[v72] ) | 2529 { |
2530 if ( a2->array_3D8[v72] >= a3->array_18[v72] && a2->array_18[v72] <= a3->array_3D8[v72] ) | |
2528 break; | 2531 break; |
2529 --v58; | 2532 //--v58; |
2530 --v40; | 2533 --v8; |
2531 --v43; | 2534 //--v43; |
2532 v73 = v40; | 2535 //v8 = v8; |
2533 } | 2536 } |
2534 if ( v7 >= v40 ) | 2537 if ( v7 >= v8 ) |
2535 return false; | 2538 return false; |
2536 a3b = (char *)a3 - (char *)a2; | 2539 //a3b = (char *)a3 - (char *)a2; |
2537 v59 = &a3->array_3D8[v7]; | 2540 v59 = v7; |
2538 v45 = &a2->array_18[v7]; | 2541 //v45 = &a2->array_18[v7]; |
2539 | 2542 |
2540 for ( v46 = v73 - v7 + 1; v46; --v46 ) | 2543 for ( v46 = v8 - v7 + 1; v46; --v46 ) |
2541 { | 2544 { |
2542 v47 = *(__int16 *)((char *)v45 + a3b); | 2545 //v47 = *(__int16 *)((char *)v45 + a3b); |
2543 if ( *v45 < v47 ) | 2546 if ( a2->array_18[v59] < a3->array_18[v59] ) |
2544 *v45 = v47; | 2547 a2->array_18[v59] = a3->array_18[v59]; |
2545 if ( v45[480] > *v59 ) | 2548 if ( a2->array_3D8[v59] > a3->array_3D8[v59] ) |
2546 v45[480] = *v59; | 2549 a2->array_3D8[v59] = a3->array_3D8[v59]; |
2547 ++v59; | 2550 ++v59; |
2548 ++v45; | 2551 //++v45; |
2549 } | 2552 } |
2550 a2->_viewport_space_y = v7; | 2553 a2->_viewport_space_y = v7; |
2551 a2->_viewport_space_w = v73; | 2554 a2->_viewport_space_w = v8; |
2552 a2->field_8 = a2->array_18[v7]; | 2555 a2->field_8 = a2->array_18[v7]; |
2553 a2->field_C = a2->array_3D8[v7]; | 2556 //v48 = a2->array_3D8[v7]; |
2554 a2->field_10 = v7; | 2557 a2->field_10 = v7; |
2555 a2->field_14 = v7; | 2558 a2->field_14 = v7; |
2559 a2->field_C = a2->array_3D8[v7]; | |
2556 v49 = v7 + 1; | 2560 v49 = v7 + 1; |
2557 if ( v49 <= v73 ) | 2561 if ( v49 <= v8 ) |
2558 { | 2562 { |
2559 v50 = &a2->array_3D8[v49]; | 2563 //v50 = &a2->array_3D8[v49]; |
2560 for ( v49; v49 <= v73; ++v49 ) | 2564 for ( v49; v49 <= v8; ++v49 ) |
2561 { | 2565 { |
2562 v51 = *(v50 - 480); | 2566 //v51 = a2->array_18[v49]; |
2563 if ( v51 < a2->field_8 ) | 2567 if ( a2->array_18[v49] < a2->field_8 ) |
2564 { | 2568 { |
2565 a2->field_8 = v51; | 2569 a2->field_8 = a2->array_18[v49]; |
2566 a2->field_10 = v49; | 2570 a2->field_10 = v49; |
2567 } | 2571 } |
2568 if ( a2->array_3D8[v49] > a2->field_C ) | 2572 if ( a2->array_3D8[v49] > a2->field_C ) |
2569 { | 2573 { |
2570 a2->field_C = a2->array_3D8[v49]; | 2574 a2->field_C = a2->array_3D8[v49]; |
2571 a2->field_14 = v49; | 2575 a2->field_14 = v49; |
2572 } | 2576 } |
2573 ++v50; | 2577 //++v50; |
2574 } | 2578 } |
2575 } | 2579 } |
2576 return true; | 2580 return true; |
2577 } | 2581 } |
2578 // 50B700: using guessed type int stru_50B700.field_0; | 2582 // 50B700: using guessed type int stru_50B700.field_0; |