Skip to content

Link TurningPlatform.cpp - #2

Open
boebie-dev wants to merge 2 commits into
1superchip:mainfrom
boebie-dev:turning-platform
Open

boebie-dev wants to merge 2 commits into
1superchip:mainfrom
boebie-dev:turning-platform

Conversation

@boebie-dev

@boebie-dev boebie-dev commented Oct 11, 2026 •

Copy link
Copy Markdown

Decompiles and links TurningPlatform.cpp (Matching).

TurningPlatform::Update needed GetSmallestAngle in StdMath.h to assign NormaliseAngle(ang1) back into the parameter before subtracting; otherwise MWCC loads angles[targetAngle] ahead of angles[currAngle] and the registers swap. The only other user, Tools_TurnToAngle, still matches and the DOL sha1 check passes.

Names not taken from symbols or ini keys are marked "Unofficial".

Match TurningPlatform::Update by normalising ang1 into the parameter in
GetSmallestAngle (Tools_TurnToAngle still matches).
@boebie-dev boebie-dev changed the title Decompile TurningPlatform.cpp Link TurningPlatform.cpp Oct 11, 2026
@boebie-dev
boebie-dev marked this pull request as ready for review October 11, 2026 13:51
Comment thread include/common/StdMath.h
inline float GetSmallestAngle(float ang1, float ang2) {
float ang = NormaliseAngle(ang2) - NormaliseAngle(ang1);
ang1 = NormaliseAngle(ang1);
float ang = NormaliseAngle(ang2) - ang1;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be verified

@1superchip

Copy link
Copy Markdown
Owner

Is there a reason to mark all names with "Unofficial"? if this was done consistently, "Unofficial" would be everywhere in the decomp.

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.

2 participants