feat(phase-29): T0.4 harvest — 272 return-axis members banked (+26,928 ins) + the §84 recompute in family_remap

THE §85 WIDEN PAID OFF AS PREDICTED. It is a ONE-TIME fleet edit, so once committed the
`conflicting types` blocker was gone for EVERY member of both families at once:
  - sample 8 first (probe-before-scale): 8/8 banked with PLAIN harvest_verify, no ladder needed
  - full sweep: 264 banked / 0 failed across 132 overlays; 10 skipped as not-stub
  - total 272 members ~= 27k ins, ZERO agent tokens
R22 clean-fleet 140/140 BYTE-IDENTICAL; dedup 1886/0; 0 NON_MATCHING (G4).
Fleet: instr 80.6 -> 80.8% (10,589,503 -> 10,616,431, +26,928) · fn-count 89.19 -> 89.26%.
distinct-code UNCHANGED at 68.3% — propagation moves the DISPLAY metric, not the RE-completeness
one (the SESSION-19 split, reconfirmed).

§84 RECOMPUTE now implemented in tools/family_remap.py (fix_derived_offsets), wired into all three
apply_remap call sites as a PRE-pass on the exemplar body (the literal is ambiguous as a substitution
token, so it cannot be a table entry):
    correct_literal = mapped(aliased_sym) - mapped(base_sym)
Verified by negative control: the hand-solved case recomputes 0x20 -> 0x18 exactly, and a site whose
target endpoint is NOT a mapped symbol is left byte-for-byte alone AND REPORTED in info
["derived_offsets"] (R32 — a silent skip is a defect, and a silent skip is how this bug survived).
This commit is contained in:
Drew T
2026-07-26 15:36:06 -06:00
parent c6b17f3056
commit 9d9cd58028
274 changed files with 12018 additions and 415 deletions
+141 -141
View File
@@ -4,16 +4,16 @@
# cross-binary collapsible-byte leverage: docs/duplicates.cross.md.
# THREE progress metrics (all matter — see the labels):
FLEET fn-count byte-ident: 315470 / 353719 = 89.19% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay)
FLEET instr-weighted : 10589503 / 13141652 = 80.6% (shipped .text across main + resident + 138 overlays; the decomp.dev-DISPLAY number)
FLEET fn-count byte-ident: 315742 / 353719 = 89.26% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay)
FLEET instr-weighted : 10616431 / 13141652 = 80.8% (shipped .text across main + resident + 138 overlays; the decomp.dev-DISPLAY number)
FLEET distinct-code(uniq): 3846656 / 5634875 = 68.3% (64912/87459 unique fns; the DISTINCT-RE number)
MAIN game-code weighted : 436 / 60201 = 0.7% (INCLUDED in the fleet numbers above since 2026-07-22 — roadmap §1 metrics contract; LINKED-excluding Ghidra sig dated 2026-06-14; caveat is R34: no independent second oracle for a PS-X EXE, NOT drift)
(fleet EXCLUDING main, for continuity with pre-2026-07-22 readings: 10589067 / 13081451 = 80.9%)
(fleet EXCLUDING main, for continuity with pre-2026-07-22 readings: 10615995 / 13081451 = 81.2%)
FLEET REAL substantive : 313615 (of which dedup-shared 239530 via 1886 groups / 239604 instances)
FLEET REAL substantive : 313887 (of which dedup-shared 239530 via 1886 groups / 239604 instances)
FLEET LINKED PsyQ objs : 959
FLEET NON_MATCHING : 7 (0 in any default build — G4)
FLEET INCLUDE_ASM stubs : 38242
FLEET INCLUDE_ASM stubs : 37970
FLEET matchable : 353719
| binary | REAL | shared | LINKED | byte-ident | matchable | byte-ident % |
@@ -21,140 +21,140 @@ FLEET matchable : 353719
| main | 54 | 2 | 959 | 1055 | 2096 | 50.3% |
| resident | 129 | 0 | 0 | 131 | 145 | 90.3% |
| ov_SC01_000 | 2253 | 1742 | 0 | 2253 | 2403 | 93.8% |
| ov_SC01_001 | 2253 | 1743 | 0 | 2255 | 2466 | 91.4% |
| ov_SC01_004 | 2242 | 1734 | 0 | 2243 | 2414 | 92.9% |
| ov_SC01_005 | 2272 | 1757 | 0 | 2272 | 2503 | 90.8% |
| ov_SC01_006 | 2272 | 1757 | 0 | 2272 | 2503 | 90.8% |
| ov_SC01_008 | 2242 | 1734 | 0 | 2244 | 2426 | 92.5% |
| ov_SC01_009 | 2268 | 1735 | 0 | 2269 | 2507 | 90.5% |
| ov_SC01_074 | 2246 | 1735 | 0 | 2248 | 2425 | 92.7% |
| ov_SC01_077 | 2428 | 1702 | 0 | 2430 | 2585 | 94.0% |
| ov_SC01_080 | 2284 | 1738 | 0 | 2284 | 2512 | 90.9% |
| ov_SC01_084 | 2291 | 1738 | 0 | 2296 | 2579 | 89.0% |
| ov_SC02_000 | 2344 | 1773 | 0 | 2344 | 2683 | 87.4% |
| ov_SC02_003 | 2344 | 1773 | 0 | 2344 | 2683 | 87.4% |
| ov_SC02_004 | 2250 | 1738 | 0 | 2250 | 2401 | 93.7% |
| ov_SC02_005 | 2358 | 1734 | 0 | 2368 | 2927 | 80.9% |
| ov_SC02_011 | 2370 | 1741 | 0 | 2381 | 2893 | 82.3% |
| ov_SC02_015 | 2251 | 1740 | 0 | 2251 | 2414 | 93.2% |
| ov_SC02_016 | 2285 | 1740 | 0 | 2288 | 2545 | 89.9% |
| ov_SC02_017 | 2328 | 1740 | 0 | 2336 | 2732 | 85.5% |
| ov_SC02_021 | 2257 | 1740 | 0 | 2257 | 2437 | 92.6% |
| ov_SC02_026 | 2273 | 1738 | 0 | 2279 | 2572 | 88.6% |
| ov_SC02_027 | 2296 | 1738 | 0 | 2305 | 2692 | 85.6% |
| ov_SC02_028 | 2298 | 1738 | 0 | 2308 | 2701 | 85.4% |
| ov_SC02_031 | 2284 | 1739 | 0 | 2289 | 2562 | 89.3% |
| ov_SC02_035 | 2259 | 1738 | 0 | 2262 | 2520 | 89.8% |
| ov_SC02_039 | 2243 | 1738 | 0 | 2243 | 2416 | 92.8% |
| ov_SC02_041 | 2281 | 1738 | 0 | 2284 | 2561 | 89.2% |
| ov_SC03_001 | 2379 | 1739 | 0 | 2396 | 2869 | 83.5% |
| ov_SC03_002 | 2305 | 1743 | 0 | 2320 | 2631 | 88.2% |
| ov_SC03_003 | 2253 | 1738 | 0 | 2254 | 2423 | 93.0% |
| ov_SC03_006 | 2319 | 1744 | 0 | 2328 | 2767 | 84.1% |
| ov_SC03_007 | 2298 | 1738 | 0 | 2302 | 2623 | 87.8% |
| ov_SC03_010 | 2261 | 1738 | 0 | 2261 | 2471 | 91.5% |
| ov_SC03_011 | 2267 | 1738 | 0 | 2273 | 2527 | 89.9% |
| ov_SC03_012 | 2245 | 1738 | 0 | 2246 | 2406 | 93.3% |
| ov_SC03_013 | 2266 | 1738 | 0 | 2266 | 2493 | 90.9% |
| ov_SC03_014 | 2324 | 1763 | 0 | 2324 | 2685 | 86.6% |
| ov_SC03_015 | 2324 | 1763 | 0 | 2324 | 2685 | 86.6% |
| ov_SC03_023 | 2252 | 1738 | 0 | 2253 | 2435 | 92.5% |
| ov_SC03_024 | 2312 | 1743 | 0 | 2319 | 2641 | 87.8% |
| ov_SC03_028 | 2292 | 1738 | 0 | 2296 | 2664 | 86.2% |
| ov_SC03_029 | 2293 | 1740 | 0 | 2303 | 2644 | 87.1% |
| ov_SC03_030 | 2266 | 1743 | 0 | 2268 | 2495 | 90.9% |
| ov_SC03_031 | 2263 | 1738 | 0 | 2266 | 2514 | 90.1% |
| ov_SC03_089 | 2280 | 1738 | 0 | 2287 | 2581 | 88.6% |
| ov_SC03_090 | 2281 | 1738 | 0 | 2289 | 2625 | 87.2% |
| ov_SC03_091 | 2284 | 1738 | 0 | 2292 | 2640 | 86.8% |
| ov_SC03_092 | 2294 | 1738 | 0 | 2306 | 2587 | 89.1% |
| ov_SC03_093 | 2270 | 1738 | 0 | 2274 | 2563 | 88.7% |
| ov_SC03_094 | 2265 | 1738 | 0 | 2271 | 2577 | 88.1% |
| ov_SC03_095 | 2255 | 1738 | 0 | 2258 | 2474 | 91.3% |
| ov_SC03_096 | 2255 | 1738 | 0 | 2258 | 2465 | 91.6% |
| ov_SC03_097 | 2285 | 1738 | 0 | 2292 | 2603 | 88.1% |
| ov_SC03_098 | 2263 | 1738 | 0 | 2266 | 2541 | 89.2% |
| ov_SC03_099 | 2256 | 1738 | 0 | 2259 | 2504 | 90.2% |
| ov_SC03_100 | 2266 | 1738 | 0 | 2270 | 2539 | 89.4% |
| ov_SC03_101 | 2266 | 1738 | 0 | 2270 | 2528 | 89.8% |
| ov_SC03_102 | 2259 | 1738 | 0 | 2262 | 2492 | 90.8% |
| ov_SC03_103 | 2261 | 1740 | 0 | 2264 | 2510 | 90.2% |
| ov_SC03_104 | 2288 | 1738 | 0 | 2295 | 2616 | 87.7% |
| ov_SC03_105 | 2280 | 1738 | 0 | 2287 | 2597 | 88.1% |
| ov_SC03_108 | 2247 | 1738 | 0 | 2247 | 2443 | 92.0% |
| ov_SC03_109 | 2250 | 1738 | 0 | 2252 | 2424 | 92.9% |
| ov_SC03_110 | 2254 | 1738 | 0 | 2254 | 2468 | 91.3% |
| ov_SC03_111 | 2265 | 1738 | 0 | 2268 | 2510 | 90.4% |
| ov_SC03_112 | 2259 | 1740 | 0 | 2261 | 2526 | 89.5% |
| ov_SC03_113 | 2252 | 1740 | 0 | 2255 | 2468 | 91.4% |
| ov_SC03_114 | 2242 | 1738 | 0 | 2244 | 2415 | 92.9% |
| ov_SC03_115 | 2259 | 1738 | 0 | 2261 | 2472 | 91.5% |
| ov_SC03_116 | 2250 | 1738 | 0 | 2253 | 2438 | 92.4% |
| ov_SC03_117 | 2277 | 1738 | 0 | 2283 | 2557 | 89.3% |
| ov_SC03_118 | 2323 | 1762 | 0 | 2324 | 2685 | 86.6% |
| ov_SC03_119 | 2322 | 1762 | 0 | 2323 | 2685 | 86.5% |
| ov_SC03_121 | 2257 | 1738 | 0 | 2260 | 2459 | 91.9% |
| ov_SC03_124 | 2336 | 1734 | 0 | 2356 | 2741 | 86.0% |
| ov_SC03_125 | 2292 | 1738 | 0 | 2304 | 2588 | 89.0% |
| ov_SC03_126 | 2254 | 1740 | 0 | 2254 | 2423 | 93.0% |
| ov_SC04_000 | 2270 | 1742 | 0 | 2279 | 2546 | 89.5% |
| ov_SC04_002 | 2289 | 1738 | 0 | 2293 | 2636 | 87.0% |
| ov_SC04_003 | 2265 | 1738 | 0 | 2269 | 2502 | 90.7% |
| ov_SC04_004 | 2274 | 1738 | 0 | 2276 | 2558 | 89.0% |
| ov_SC04_005 | 2284 | 1738 | 0 | 2290 | 2612 | 87.7% |
| ov_SC04_006 | 2254 | 1738 | 0 | 2256 | 2454 | 91.9% |
| ov_SC04_007 | 2278 | 1738 | 0 | 2282 | 2569 | 88.8% |
| ov_SC04_008 | 2246 | 1738 | 0 | 2246 | 2415 | 93.0% |
| ov_SC04_009 | 2261 | 1738 | 0 | 2264 | 2441 | 92.7% |
| ov_SC04_010 | 2251 | 1738 | 0 | 2252 | 2419 | 93.1% |
| ov_SC04_011 | 2309 | 1738 | 0 | 2315 | 2803 | 82.6% |
| ov_SC04_012 | 2248 | 1738 | 0 | 2249 | 2420 | 92.9% |
| ov_SC04_015 | 2314 | 1739 | 0 | 2325 | 2611 | 89.0% |
| ov_SC04_016 | 2251 | 1738 | 0 | 2253 | 2440 | 92.3% |
| ov_SC04_018 | 2362 | 1773 | 0 | 2362 | 2857 | 82.7% |
| ov_SC04_019 | 2368 | 1773 | 0 | 2368 | 2857 | 82.9% |
| ov_SC04_020 | 2279 | 1738 | 0 | 2291 | 2567 | 89.2% |
| ov_SC04_021 | 2255 | 1740 | 0 | 2255 | 2423 | 93.1% |
| ov_SC05_000 | 2252 | 1742 | 0 | 2255 | 2422 | 93.1% |
| ov_SC05_001 | 2274 | 1738 | 0 | 2279 | 2574 | 88.5% |
| ov_SC05_002 | 2257 | 1738 | 0 | 2260 | 2442 | 92.5% |
| ov_SC05_003 | 2254 | 1738 | 0 | 2255 | 2481 | 90.9% |
| ov_SC05_004 | 2250 | 1738 | 0 | 2252 | 2464 | 91.4% |
| ov_SC05_005 | 2255 | 1738 | 0 | 2256 | 2491 | 90.6% |
| ov_SC05_006 | 2248 | 1738 | 0 | 2248 | 2430 | 92.5% |
| ov_SC05_007 | 2258 | 1738 | 0 | 2263 | 2482 | 91.2% |
| ov_SC05_008 | 2275 | 1738 | 0 | 2277 | 2543 | 89.5% |
| ov_SC05_009 | 2254 | 1738 | 0 | 2258 | 2438 | 92.6% |
| ov_SC05_010 | 2281 | 1738 | 0 | 2285 | 2588 | 88.3% |
| ov_SC05_011 | 2250 | 1738 | 0 | 2251 | 2409 | 93.4% |
| ov_SC05_017 | 2358 | 1735 | 0 | 2369 | 2842 | 83.4% |
| ov_SC05_018 | 2305 | 1738 | 0 | 2318 | 2673 | 86.7% |
| ov_SC05_019 | 2255 | 1740 | 0 | 2255 | 2423 | 93.1% |
| ov_SC06_000 | 2319 | 1747 | 0 | 2322 | 2691 | 86.3% |
| ov_SC06_006 | 2271 | 1738 | 0 | 2272 | 2511 | 90.5% |
| ov_SC06_008 | 2290 | 1740 | 0 | 2296 | 2542 | 90.3% |
| ov_SC06_010 | 2271 | 1738 | 0 | 2276 | 2517 | 90.4% |
| ov_SC06_011 | 2260 | 1738 | 0 | 2264 | 2468 | 91.7% |
| ov_SC06_013 | 2253 | 1738 | 0 | 2254 | 2425 | 92.9% |
| ov_SC06_014 | 2259 | 1738 | 0 | 2261 | 2453 | 92.2% |
| ov_SC06_015 | 2256 | 1738 | 0 | 2256 | 2421 | 93.2% |
| ov_SC06_016 | 2274 | 1738 | 0 | 2276 | 2549 | 89.3% |
| ov_SC06_018 | 2286 | 1740 | 0 | 2293 | 2665 | 86.0% |
| ov_SC06_020 | 2263 | 1740 | 0 | 2264 | 2518 | 89.9% |
| ov_SC06_022 | 2282 | 1738 | 0 | 2290 | 2642 | 86.7% |
| ov_SC06_024 | 2292 | 1738 | 0 | 2298 | 2667 | 86.2% |
| ov_SC06_025 | 2276 | 1738 | 0 | 2281 | 2572 | 88.7% |
| ov_SC06_027 | 2241 | 1738 | 0 | 2242 | 2408 | 93.1% |
| ov_SC06_029 | 2302 | 1738 | 0 | 2314 | 2662 | 86.9% |
| ov_SC06_030 | 2255 | 1738 | 0 | 2255 | 2456 | 91.8% |
| ov_SC06_032 | 2277 | 1739 | 0 | 2284 | 2658 | 85.9% |
| ov_SC06_033 | 2279 | 1739 | 0 | 2286 | 2631 | 86.9% |
| ov_SC07_000 | 2271 | 1742 | 0 | 2273 | 2521 | 90.2% |
| ov_SC07_001 | 2254 | 1738 | 0 | 2256 | 2454 | 91.9% |
| ov_SC07_002 | 2282 | 1738 | 0 | 2286 | 2579 | 88.6% |
| ov_SC01_001 | 2255 | 1743 | 0 | 2257 | 2466 | 91.5% |
| ov_SC01_004 | 2244 | 1734 | 0 | 2245 | 2414 | 93.0% |
| ov_SC01_005 | 2274 | 1757 | 0 | 2274 | 2503 | 90.9% |
| ov_SC01_006 | 2274 | 1757 | 0 | 2274 | 2503 | 90.9% |
| ov_SC01_008 | 2244 | 1734 | 0 | 2246 | 2426 | 92.6% |
| ov_SC01_009 | 2270 | 1735 | 0 | 2271 | 2507 | 90.6% |
| ov_SC01_074 | 2248 | 1735 | 0 | 2250 | 2425 | 92.8% |
| ov_SC01_077 | 2430 | 1702 | 0 | 2432 | 2585 | 94.1% |
| ov_SC01_080 | 2286 | 1738 | 0 | 2286 | 2512 | 91.0% |
| ov_SC01_084 | 2293 | 1738 | 0 | 2298 | 2579 | 89.1% |
| ov_SC02_000 | 2346 | 1773 | 0 | 2346 | 2683 | 87.4% |
| ov_SC02_003 | 2346 | 1773 | 0 | 2346 | 2683 | 87.4% |
| ov_SC02_004 | 2252 | 1738 | 0 | 2252 | 2401 | 93.8% |
| ov_SC02_005 | 2360 | 1734 | 0 | 2370 | 2927 | 81.0% |
| ov_SC02_011 | 2372 | 1741 | 0 | 2383 | 2893 | 82.4% |
| ov_SC02_015 | 2253 | 1740 | 0 | 2253 | 2414 | 93.3% |
| ov_SC02_016 | 2287 | 1740 | 0 | 2290 | 2545 | 90.0% |
| ov_SC02_017 | 2330 | 1740 | 0 | 2338 | 2732 | 85.6% |
| ov_SC02_021 | 2259 | 1740 | 0 | 2259 | 2437 | 92.7% |
| ov_SC02_026 | 2275 | 1738 | 0 | 2281 | 2572 | 88.7% |
| ov_SC02_027 | 2298 | 1738 | 0 | 2307 | 2692 | 85.7% |
| ov_SC02_028 | 2300 | 1738 | 0 | 2310 | 2701 | 85.5% |
| ov_SC02_031 | 2286 | 1739 | 0 | 2291 | 2562 | 89.4% |
| ov_SC02_035 | 2261 | 1738 | 0 | 2264 | 2520 | 89.8% |
| ov_SC02_039 | 2245 | 1738 | 0 | 2245 | 2416 | 92.9% |
| ov_SC02_041 | 2283 | 1738 | 0 | 2286 | 2561 | 89.3% |
| ov_SC03_001 | 2381 | 1739 | 0 | 2398 | 2869 | 83.6% |
| ov_SC03_002 | 2307 | 1743 | 0 | 2322 | 2631 | 88.3% |
| ov_SC03_003 | 2255 | 1738 | 0 | 2256 | 2423 | 93.1% |
| ov_SC03_006 | 2321 | 1744 | 0 | 2330 | 2767 | 84.2% |
| ov_SC03_007 | 2300 | 1738 | 0 | 2304 | 2623 | 87.8% |
| ov_SC03_010 | 2263 | 1738 | 0 | 2263 | 2471 | 91.6% |
| ov_SC03_011 | 2269 | 1738 | 0 | 2275 | 2527 | 90.0% |
| ov_SC03_012 | 2247 | 1738 | 0 | 2248 | 2406 | 93.4% |
| ov_SC03_013 | 2268 | 1738 | 0 | 2268 | 2493 | 91.0% |
| ov_SC03_014 | 2326 | 1763 | 0 | 2326 | 2685 | 86.6% |
| ov_SC03_015 | 2326 | 1763 | 0 | 2326 | 2685 | 86.6% |
| ov_SC03_023 | 2254 | 1738 | 0 | 2255 | 2435 | 92.6% |
| ov_SC03_024 | 2314 | 1743 | 0 | 2321 | 2641 | 87.9% |
| ov_SC03_028 | 2294 | 1738 | 0 | 2298 | 2664 | 86.3% |
| ov_SC03_029 | 2295 | 1740 | 0 | 2305 | 2644 | 87.2% |
| ov_SC03_030 | 2268 | 1743 | 0 | 2270 | 2495 | 91.0% |
| ov_SC03_031 | 2265 | 1738 | 0 | 2268 | 2514 | 90.2% |
| ov_SC03_089 | 2282 | 1738 | 0 | 2289 | 2581 | 88.7% |
| ov_SC03_090 | 2283 | 1738 | 0 | 2291 | 2625 | 87.3% |
| ov_SC03_091 | 2286 | 1738 | 0 | 2294 | 2640 | 86.9% |
| ov_SC03_092 | 2296 | 1738 | 0 | 2308 | 2587 | 89.2% |
| ov_SC03_093 | 2272 | 1738 | 0 | 2276 | 2563 | 88.8% |
| ov_SC03_094 | 2267 | 1738 | 0 | 2273 | 2577 | 88.2% |
| ov_SC03_095 | 2257 | 1738 | 0 | 2260 | 2474 | 91.4% |
| ov_SC03_096 | 2257 | 1738 | 0 | 2260 | 2465 | 91.7% |
| ov_SC03_097 | 2287 | 1738 | 0 | 2294 | 2603 | 88.1% |
| ov_SC03_098 | 2265 | 1738 | 0 | 2268 | 2541 | 89.3% |
| ov_SC03_099 | 2258 | 1738 | 0 | 2261 | 2504 | 90.3% |
| ov_SC03_100 | 2268 | 1738 | 0 | 2272 | 2539 | 89.5% |
| ov_SC03_101 | 2268 | 1738 | 0 | 2272 | 2528 | 89.9% |
| ov_SC03_102 | 2261 | 1738 | 0 | 2264 | 2492 | 90.9% |
| ov_SC03_103 | 2263 | 1740 | 0 | 2266 | 2510 | 90.3% |
| ov_SC03_104 | 2290 | 1738 | 0 | 2297 | 2616 | 87.8% |
| ov_SC03_105 | 2282 | 1738 | 0 | 2289 | 2597 | 88.1% |
| ov_SC03_108 | 2249 | 1738 | 0 | 2249 | 2443 | 92.1% |
| ov_SC03_109 | 2252 | 1738 | 0 | 2254 | 2424 | 93.0% |
| ov_SC03_110 | 2256 | 1738 | 0 | 2256 | 2468 | 91.4% |
| ov_SC03_111 | 2267 | 1738 | 0 | 2270 | 2510 | 90.4% |
| ov_SC03_112 | 2261 | 1740 | 0 | 2263 | 2526 | 89.6% |
| ov_SC03_113 | 2254 | 1740 | 0 | 2257 | 2468 | 91.5% |
| ov_SC03_114 | 2244 | 1738 | 0 | 2246 | 2415 | 93.0% |
| ov_SC03_115 | 2261 | 1738 | 0 | 2263 | 2472 | 91.5% |
| ov_SC03_116 | 2252 | 1738 | 0 | 2255 | 2438 | 92.5% |
| ov_SC03_117 | 2279 | 1738 | 0 | 2285 | 2557 | 89.4% |
| ov_SC03_118 | 2325 | 1762 | 0 | 2326 | 2685 | 86.6% |
| ov_SC03_119 | 2324 | 1762 | 0 | 2325 | 2685 | 86.6% |
| ov_SC03_121 | 2259 | 1738 | 0 | 2262 | 2459 | 92.0% |
| ov_SC03_124 | 2338 | 1734 | 0 | 2358 | 2741 | 86.0% |
| ov_SC03_125 | 2294 | 1738 | 0 | 2306 | 2588 | 89.1% |
| ov_SC03_126 | 2256 | 1740 | 0 | 2256 | 2423 | 93.1% |
| ov_SC04_000 | 2272 | 1742 | 0 | 2281 | 2546 | 89.6% |
| ov_SC04_002 | 2291 | 1738 | 0 | 2295 | 2636 | 87.1% |
| ov_SC04_003 | 2267 | 1738 | 0 | 2271 | 2502 | 90.8% |
| ov_SC04_004 | 2276 | 1738 | 0 | 2278 | 2558 | 89.1% |
| ov_SC04_005 | 2286 | 1738 | 0 | 2292 | 2612 | 87.7% |
| ov_SC04_006 | 2256 | 1738 | 0 | 2258 | 2454 | 92.0% |
| ov_SC04_007 | 2280 | 1738 | 0 | 2284 | 2569 | 88.9% |
| ov_SC04_008 | 2248 | 1738 | 0 | 2248 | 2415 | 93.1% |
| ov_SC04_009 | 2263 | 1738 | 0 | 2266 | 2441 | 92.8% |
| ov_SC04_010 | 2253 | 1738 | 0 | 2254 | 2419 | 93.2% |
| ov_SC04_011 | 2311 | 1738 | 0 | 2317 | 2803 | 82.7% |
| ov_SC04_012 | 2250 | 1738 | 0 | 2251 | 2420 | 93.0% |
| ov_SC04_015 | 2316 | 1739 | 0 | 2327 | 2611 | 89.1% |
| ov_SC04_016 | 2253 | 1738 | 0 | 2255 | 2440 | 92.4% |
| ov_SC04_018 | 2364 | 1773 | 0 | 2364 | 2857 | 82.7% |
| ov_SC04_019 | 2370 | 1773 | 0 | 2370 | 2857 | 83.0% |
| ov_SC04_020 | 2281 | 1738 | 0 | 2293 | 2567 | 89.3% |
| ov_SC04_021 | 2257 | 1740 | 0 | 2257 | 2423 | 93.1% |
| ov_SC05_000 | 2254 | 1742 | 0 | 2257 | 2422 | 93.2% |
| ov_SC05_001 | 2276 | 1738 | 0 | 2281 | 2574 | 88.6% |
| ov_SC05_002 | 2259 | 1738 | 0 | 2262 | 2442 | 92.6% |
| ov_SC05_003 | 2256 | 1738 | 0 | 2257 | 2481 | 91.0% |
| ov_SC05_004 | 2252 | 1738 | 0 | 2254 | 2464 | 91.5% |
| ov_SC05_005 | 2257 | 1738 | 0 | 2258 | 2491 | 90.6% |
| ov_SC05_006 | 2250 | 1738 | 0 | 2250 | 2430 | 92.6% |
| ov_SC05_007 | 2260 | 1738 | 0 | 2265 | 2482 | 91.3% |
| ov_SC05_008 | 2277 | 1738 | 0 | 2279 | 2543 | 89.6% |
| ov_SC05_009 | 2256 | 1738 | 0 | 2260 | 2438 | 92.7% |
| ov_SC05_010 | 2283 | 1738 | 0 | 2287 | 2588 | 88.4% |
| ov_SC05_011 | 2252 | 1738 | 0 | 2253 | 2409 | 93.5% |
| ov_SC05_017 | 2360 | 1735 | 0 | 2371 | 2842 | 83.4% |
| ov_SC05_018 | 2307 | 1738 | 0 | 2320 | 2673 | 86.8% |
| ov_SC05_019 | 2257 | 1740 | 0 | 2257 | 2423 | 93.1% |
| ov_SC06_000 | 2321 | 1747 | 0 | 2324 | 2691 | 86.4% |
| ov_SC06_006 | 2273 | 1738 | 0 | 2274 | 2511 | 90.6% |
| ov_SC06_008 | 2292 | 1740 | 0 | 2298 | 2542 | 90.4% |
| ov_SC06_010 | 2273 | 1738 | 0 | 2278 | 2517 | 90.5% |
| ov_SC06_011 | 2262 | 1738 | 0 | 2266 | 2468 | 91.8% |
| ov_SC06_013 | 2255 | 1738 | 0 | 2256 | 2425 | 93.0% |
| ov_SC06_014 | 2261 | 1738 | 0 | 2263 | 2453 | 92.3% |
| ov_SC06_015 | 2258 | 1738 | 0 | 2258 | 2421 | 93.3% |
| ov_SC06_016 | 2276 | 1738 | 0 | 2278 | 2549 | 89.4% |
| ov_SC06_018 | 2288 | 1740 | 0 | 2295 | 2665 | 86.1% |
| ov_SC06_020 | 2265 | 1740 | 0 | 2266 | 2518 | 90.0% |
| ov_SC06_022 | 2284 | 1738 | 0 | 2292 | 2642 | 86.8% |
| ov_SC06_024 | 2294 | 1738 | 0 | 2300 | 2667 | 86.2% |
| ov_SC06_025 | 2278 | 1738 | 0 | 2283 | 2572 | 88.8% |
| ov_SC06_027 | 2243 | 1738 | 0 | 2244 | 2408 | 93.2% |
| ov_SC06_029 | 2304 | 1738 | 0 | 2316 | 2662 | 87.0% |
| ov_SC06_030 | 2257 | 1738 | 0 | 2257 | 2456 | 91.9% |
| ov_SC06_032 | 2279 | 1739 | 0 | 2286 | 2658 | 86.0% |
| ov_SC06_033 | 2281 | 1739 | 0 | 2288 | 2631 | 87.0% |
| ov_SC07_000 | 2273 | 1742 | 0 | 2275 | 2521 | 90.2% |
| ov_SC07_001 | 2256 | 1738 | 0 | 2258 | 2454 | 92.0% |
| ov_SC07_002 | 2284 | 1738 | 0 | 2288 | 2579 | 88.7% |
| ov_SC07_006 | 2051 | 1555 | 0 | 2131 | 2455 | 86.8% |
| ov_SC07_007 | 2043 | 1586 | 0 | 2127 | 2613 | 81.4% |
| ov_SC07_008 | 2239 | 1738 | 0 | 2239 | 2386 | 93.8% |
| ov_SC07_009 | 2248 | 1738 | 0 | 2250 | 2430 | 92.6% |
| ov_SC07_010 | 2074 | 1608 | 0 | 2157 | 2524 | 85.5% |
| ov_SC07_011 | 2042 | 1585 | 0 | 2122 | 2449 | 86.6% |
| ov_SC07_007 | 2045 | 1586 | 0 | 2129 | 2613 | 81.5% |
| ov_SC07_008 | 2241 | 1738 | 0 | 2241 | 2386 | 93.9% |
| ov_SC07_009 | 2250 | 1738 | 0 | 2252 | 2430 | 92.7% |
| ov_SC07_010 | 2076 | 1608 | 0 | 2159 | 2524 | 85.5% |
| ov_SC07_011 | 2044 | 1585 | 0 | 2124 | 2449 | 86.7% |
+39 -1
View File
@@ -1371,7 +1371,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_001/nonmatchings/ov_SC01_001_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_001/nonmatchings/ov_SC01_001_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_001/nonmatchings/ov_SC01_001_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_004/nonmatchings/ov_SC01_004_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_004/nonmatchings/ov_SC01_004_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_004/nonmatchings/ov_SC01_004_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1306,7 +1306,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005_after", func_8014D2A0);
+48 -1
View File
@@ -528,7 +528,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1306,7 +1306,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006_after", func_8014D2A0);
+48 -1
View File
@@ -528,7 +528,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_008/nonmatchings/ov_SC01_008_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_008/nonmatchings/ov_SC01_008_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_008/nonmatchings/ov_SC01_008_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_009/nonmatchings/ov_SC01_009_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_009/nonmatchings/ov_SC01_009_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_009/nonmatchings/ov_SC01_009_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_074/nonmatchings/ov_SC01_074_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_074/nonmatchings/ov_SC01_074_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_074/nonmatchings/ov_SC01_074_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1497,7 +1497,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_8014D2A0);
+48 -1
View File
@@ -652,7 +652,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_080/nonmatchings/ov_SC01_080_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_080/nonmatchings/ov_SC01_080_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_080/nonmatchings/ov_SC01_080_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_084/nonmatchings/ov_SC01_084_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC01_084/nonmatchings/ov_SC01_084_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_084/nonmatchings/ov_SC01_084_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_000/nonmatchings/ov_SC02_000_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_000/nonmatchings/ov_SC02_000_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_000/nonmatchings/ov_SC02_000_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_003/nonmatchings/ov_SC02_003_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_003/nonmatchings/ov_SC02_003_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_003/nonmatchings/ov_SC02_003_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_004/nonmatchings/ov_SC02_004_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_004/nonmatchings/ov_SC02_004_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_004/nonmatchings/ov_SC02_004_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_015/nonmatchings/ov_SC02_015_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_015/nonmatchings/ov_SC02_015_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_015/nonmatchings/ov_SC02_015_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_016/nonmatchings/ov_SC02_016_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_016/nonmatchings/ov_SC02_016_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_016/nonmatchings/ov_SC02_016_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_021/nonmatchings/ov_SC02_021_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_021/nonmatchings/ov_SC02_021_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_021/nonmatchings/ov_SC02_021_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_026/nonmatchings/ov_SC02_026_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_026/nonmatchings/ov_SC02_026_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_026/nonmatchings/ov_SC02_026_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_027/nonmatchings/ov_SC02_027_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_027/nonmatchings/ov_SC02_027_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_027/nonmatchings/ov_SC02_027_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_028/nonmatchings/ov_SC02_028_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_028/nonmatchings/ov_SC02_028_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_028/nonmatchings/ov_SC02_028_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_031/nonmatchings/ov_SC02_031_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_031/nonmatchings/ov_SC02_031_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_031/nonmatchings/ov_SC02_031_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_035/nonmatchings/ov_SC02_035_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_035/nonmatchings/ov_SC02_035_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_035/nonmatchings/ov_SC02_035_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_039/nonmatchings/ov_SC02_039_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_039/nonmatchings/ov_SC02_039_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_039/nonmatchings/ov_SC02_039_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001_after", func_8014D2A0);
+48 -1
View File
@@ -533,7 +533,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002_after", func_8014D2A0);
+48 -1
View File
@@ -536,7 +536,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_003/nonmatchings/ov_SC03_003_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_003/nonmatchings/ov_SC03_003_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_003/nonmatchings/ov_SC03_003_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006_after", func_8014D2A0);
+48 -1
View File
@@ -536,7 +536,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_007/nonmatchings/ov_SC03_007_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_007/nonmatchings/ov_SC03_007_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_007/nonmatchings/ov_SC03_007_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_010/nonmatchings/ov_SC03_010_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_010/nonmatchings/ov_SC03_010_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_010/nonmatchings/ov_SC03_010_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_012/nonmatchings/ov_SC03_012_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_012/nonmatchings/ov_SC03_012_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_012/nonmatchings/ov_SC03_012_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_013/nonmatchings/ov_SC03_013_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_013/nonmatchings/ov_SC03_013_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_013/nonmatchings/ov_SC03_013_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_023/nonmatchings/ov_SC03_023_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_023/nonmatchings/ov_SC03_023_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_023/nonmatchings/ov_SC03_023_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_029/nonmatchings/ov_SC03_029_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_029/nonmatchings/ov_SC03_029_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_029/nonmatchings/ov_SC03_029_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_030/nonmatchings/ov_SC03_030_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_030/nonmatchings/ov_SC03_030_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_030/nonmatchings/ov_SC03_030_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_031/nonmatchings/ov_SC03_031_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_031/nonmatchings/ov_SC03_031_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_031/nonmatchings/ov_SC03_031_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094_after", func_8014D2A0);
+48 -1
View File
@@ -534,7 +534,54 @@ DEFINE_func_8012CC40() /* dedup: shared engine-core @0x8012CC40 (src/shared) */
DEFINE_func_8012CC64() /* dedup: shared engine-core @0x8012CC64 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094_jr_8012ACE0", func_8012CC88);
extern s32 func_8012CEB0(s32 a0, s32 a1, s32 a2);
/* a0 = actor/entity base, a1 = mode passed through to func_8012CEB0, a2 = s16[3] offset vector.
* Two 8-byte s16 vectors live at sp+0x10 and sp+0x18 and are passed by address; the second one
* is written back to the entity's hi-16 fixed-point position after the offset is removed. */
s32 func_8012CC88(s32 a0, s32 a1, s32 a2) {
typedef struct { s16 vx, vy, vz, pad; } SV3_8012CC88;
SV3_8012CC88 sp10;
SV3_8012CC88 sp18;
s32 v0;
sp10.vx = *(u16*)(a0 + 0x3A);
sp10.vy = *(u16*)(a0 + 0x3E);
sp10.vz = *(u16*)(a0 + 0x42);
sp10.vx += *(u16*)(a2 + 0);
sp10.vy += *(u16*)(a2 + 2);
sp10.vz += *(u16*)(a2 + 4);
*(s32*)(a0 + 0x10) += *(s32*)(a0 + 0x44);
*(s32*)(a0 + 0x14) += *(s32*)(a0 + 0x48);
*(s32*)(a0 + 0x18) += *(s32*)(a0 + 0x4C);
*(s32*)(a0 + 0x04) += *(s32*)(a0 + 0x10);
*(s32*)(a0 + 0x08) += *(s32*)(a0 + 0x14);
*(s32*)(a0 + 0x0C) += *(s32*)(a0 + 0x18);
sp18.vx = *(u16*)(a0 + 0x06);
sp18.vy = *(u16*)(a0 + 0x0A);
sp18.vz = *(u16*)(a0 + 0x0E);
sp18.vx += *(u16*)(a2 + 0);
sp18.vy += *(u16*)(a2 + 2);
sp18.vz += *(u16*)(a2 + 4);
v0 = func_8012CEB0((s32)&sp10, (s32)&sp18, a1);
sp18.vx -= *(u16*)(a2 + 0);
sp18.vy -= *(u16*)(a2 + 2);
sp18.vz -= *(u16*)(a2 + 4);
*(s16*)(a0 + 0x06) = sp18.vx;
*(s16*)(a0 + 0x0A) = sp18.vy;
*(s16*)(a0 + 0x0E) = sp18.vz;
if (v0 & 0x6000) {
*(s32*)(a0 + 0x14) = 0;
}
return v0;
}
DEFINE_func_8012CE2C() /* dedup: shared engine-core @0x8012CE2C (src/shared) */
+39 -1
View File
@@ -1305,7 +1305,45 @@ void func_8014D04C(void)
DEFINE_func_8014D0A4() /* dedup: shared engine-core @0x8014D0A4 (src/shared) */
INCLUDE_ASM("asm/ov_SC03_095/nonmatchings/ov_SC03_095_after", func_8014D12C);
extern s32 func_80135A4C(s32 a0, s32 a1, s32 *a2, s32 a3);
extern s32 func_8014C918(s32 a0, s32 a1);
s32 func_8014D12C(s32 arg0, void *a1, void *a2)
{
u16 *arg1 = (u16 *)a1;
u16 *arg2 = (u16 *)a2;
s32 e;
arg1[1] -= 3;
arg2[1] += 8;
e = *(s32 *)(arg0 + 0x174);
if ((*(u16 *)e == 0) || ((*(u16 *)(e + 0x5C) & 0x400) == 0) || (*(s32 *)(e + 0x58) == 0) ||
(*(s16 *)(e + 0xA) < *(s16 *)(arg0 + 0xA))) {
if (*(u16 *)e != 0) {
*(u8 *)(e + 0x74) = 0;
}
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
arg1[0] = *(u16 *)(arg0 + 0x98);
arg1[1] = *(u16 *)(arg0 + 0x9A) - 3;
arg1[2] = *(u16 *)(arg0 + 0x9C);
if ((*(u16 *)(e + 0x5C) & 8) != 0) {
arg2[1] = arg1[1] + 0x18;
}
if (func_80135A4C(*(s32 *)(e + 0x20), *(s32 *)(e + 0x58), (s32 *)arg1, (s32)arg2) != 0) {
*(u16 *)(arg0 + 6) = arg2[0];
*(u16 *)(arg0 + 0xA) = arg2[1];
*(u16 *)(arg0 + 0xE) = arg2[2];
*(u16 *)(arg0 + 0x16E) = func_8014C918(arg0, *(u8 *)(e + 0x75)) & 0xFF;
return 1;
}
*(u8 *)(e + 0x74) = 0;
*(s32 *)(arg0 + 0x174) = 0;
return 0;
}
INCLUDE_ASM("asm/ov_SC03_095/nonmatchings/ov_SC03_095_after", func_8014D2A0);

Some files were not shown because too many files have changed in this diff Show More