Skip to content

Enemy/feetinv: bring FeetInvCalc closer to the original - #409

Open
Raamia wants to merge 1 commit into
doldecomp:mainfrom
Raamia:enemy-feetinv
Open

Raamia wants to merge 1 commit into
doldecomp:mainfrom
Raamia:enemy-feetinv

Conversation

@Raamia

@Raamia Raamia commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Restore the fabs on the thigh-to-foot angle, normalize then scale the leg vectors instead of calling setLength, and compute the matrix column lengths as TMtxTimeLag::calc does.
MsAsin and MsAcos keep the frsqrte result in a volatile like TSpineEnemy::calcTurnSpeedToReach, since the original stores and reloads it before matan.
FeetInvCalc isn't 100% yet: the frame is 0x88 bytes short and some float registers are allocated differently.

@decomp-dev

decomp-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown

Report for GMSE01 (4b5027a - 931c89b)

📈 1 improvement in an unmatched item
Unit Item Bytes Before After
mario/Enemy/feetinv FeetInvCalc(J3DModel*, unsigned short, unsigned short, unsigned short, float) +472 79.14% 97.57%

Report for GMSP01_NX (4b5027a - 931c89b)

No changes

Report for GMSP01 (4b5027a - 931c89b)

No changes

Report for GMSJ01_01 (4b5027a - 931c89b)

No changes

Report for GMSJ01 (4b5027a - 931c89b)

📈 1 improvement in an unmatched item
Unit Item Bytes Before After
mario/Enemy/feetinv FeetInvCalc(J3DModel*, unsigned short, unsigned short, unsigned short, float) +472 79.14% 97.57%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant