Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Vector2/Vector3 order #1272

Merged
merged 3 commits into from
Dec 24, 2024
Merged

Fix Vector2/Vector3 order #1272

merged 3 commits into from
Dec 24, 2024

Conversation

foxtacles
Copy link
Member

@foxtacles foxtacles commented Dec 24, 2024

The overload mechanism for the multiplication implementation is in all likelihood a reference vs pointer. roadmap results for the beginning of Helicopter and subsequent vector functions:

0001:00000e60   0001:00000e60          0  fun  259     Helicopter::Helicopter
0001:00000f70   0001:00000f70          0  fun  3       MxCore::Tickle
0001:00000f80   0001:00000f80          0  fun  29      Vector2::AddImpl
0001:00000fa0   0001:00000fa0          0  fun  28      Vector2::AddImpl
0001:00000fc0   0001:00000fc0          0  fun  29      Vector2::SubImpl
0001:00000fe0   0001:00000fe0          0  fun  29      Vector2::MulImpl
0001:00001000   0001:00001000          0  fun  28      Vector2::MulImpl
0001:00001020   0001:00001020          0  fun  28      Vector2::DivImpl
0001:00001040   0001:00001040          0  fun  23      Vector2::DotImpl
0001:00001060   0001:00001060          0  fun  10      Vector2::SetData
0001:00001070   0001:00001070          0  fun  20      Vector2::EqualsImpl
0001:00001090   0001:00001090          0  fun  4       Vector2::GetData
0001:000010a0   0001:000010a0          0  fun  4       Vector2::GetData
0001:000010b0   0001:000010b0          0  fun  17      Vector2::Clear
0001:000010d0   0001:000010d0          0  fun  18      Vector2::Dot
0001:000010f0   0001:000010f0          0  fun  24      Vector2::Dot
0001:00001110   0001:00001110          0  fun  21      Vector2::Dot
0001:00001130   0001:00001130          0  fun  21      Vector2::Dot
0001:00001150   0001:00001150          0  fun  16      Vector2::LenSquared
0001:00001160   0001:00001160          0  fun  81      Vector2::Unitize
0001:000011c0   0001:000011c0          0  fun  12      Vector2::Add
0001:000011d0   0001:000011d0          0  fun  13      Vector2::Add
0001:000011e0   0001:000011e0          0  fun  16      Vector2::Add
0001:000011f0   0001:000011f0          0  fun  13      Vector2::Sub
0001:00001200   0001:00001200          0  fun  16      Vector2::Sub
0001:00001210   0001:00001210          0  fun  13      Vector2::Mul
0001:00001220   0001:00001220          0  fun  16      Vector2::Mul
0001:00001230   0001:00001230          0  fun  13      Vector2::Mul
0001:00001240   0001:00001240          0  fun  13      Vector2::Div
0001:00001250   0001:00001250          0  fun  13      Vector2::SetVector
0001:00001260   0001:00001260          0  fun  16      Vector2::SetVector
0001:00001270   0001:00001270          0  fun  68      Vector3::EqualsCrossImpl
0001:000012c0   0001:000012c0          0  fun  24      Vector3::EqualsCross
0001:000012e0   0001:000012e0          0  fun  21      Vector3::EqualsCross
0001:00001300   0001:00001300          0  fun  21      Vector3::EqualsCross

Vector4 and Matrix4 functions appear in odd order after that - still trying to figure that out.

@foxtacles
Copy link
Member Author

foxtacles commented Dec 24, 2024

Unfortunately there is a regression mainly on LegoExtraActor::HitActor, with two functions disappearing because of that. I've matched it to the BETA version but it won't go back to 100%. I couldn't figure out which change to vector.h causes this regression exactly, but I still think the current version is more correct since it fixes various awkward casts like

MulScalarImpl((float*) &p_value);

which we've had before.

@foxtacles foxtacles merged commit c2c9c75 into isledecomp:master Dec 24, 2024
12 checks passed
@foxtacles foxtacles deleted the vec-order branch December 24, 2024 21:21
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