feat(R2-Q3): verbatim MotionTableManager — the pending-animation queue (closes H3, H15-core)
Ports retail's MotionTableManager (0x0051bxxx; r2-motiontable-decomp.md §11) above the Q2 CMotionTable: add_to_queue 0x0051bfe0 (append + immediate collapse), remove_redundant_links 0x0051bf20 (TAIL-ANCHORED single scan, NOT ACE's restructured loop — cycle-tail block mask 0xb0000000 = STYLE|MODIFIER|ACTION, style-tail 0x70000000 = CYCLE|MODIFIER|ACTION; the decomp's prose gloss of those masks was imprecise, the literal constants are ported), truncate_animation_list 0x0051bca0 (zero NumAnims IN PLACE from the tail through the matched node's successor + CSequence.RemoveLinkAnimations), AnimationDone 0x0051bce0 (counter-driven countdown chain: one call can pop MULTIPLE entries; action-class pops MotionState's action FIFO; drained-list counter reset), CheckForCompletedMotions 0x0051be00 / UseTime (zero-tick sweep, success hardcoded true), initialize_state 0x0051c030 (0x41000003 sentinel), HandleEnterWorld/HandleExitWorld drains (MotionDone success:false; enter also strips link anims), PerformMovement 0x0051c0b0 (error codes 7 / 0x43 / 0; StopCompletely queues the Ready sentinel UNCONDITIONALLY). IMotionDoneSink is the R2 seam standing in for CPhysicsObj::MotionDone — R3 binds MotionInterpreter.MotionDone (r2-port-plan.md §4 contract). This queue + remove_redundant_links IS the retail mechanism our old 'Fix B' rapid-motion collapse approximated — Q4 deletes Fix B and routes SetCycle/PlayAction through PerformMovement. 47 conformance tests: countdown-chain tables, truncate blocked/allowed matrices for both masks, zero-tick vs counter sweep, world drains, the walk-run-walk-run collapse trace, the 2026-05-03 walk-to-run golden (both nodes queued, truncate not firing), PerformMovement error matrix. Register: AD-34 extended (pending_animations managed LinkedList); AD-35 added (NotHandled sentinel vs retail's dead-code pointer-leak default case). Implemented by a dedicated agent against the committed Q3 spec; diff scope, mask semantics, truncation range, counter reset, and PerformMovement paths independently verified against the decomp raw text before commit. Build + full suite green (3,447 passed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
8eff397801
commit
aa65990a1d
3 changed files with 1528 additions and 1 deletions
1018
tests/AcDream.Core.Tests/Physics/Motion/MotionTableManagerTests.cs
Normal file
1018
tests/AcDream.Core.Tests/Physics/Motion/MotionTableManagerTests.cs
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue