Fix Vector2/Vector3 order (#1272)

* Fix Vector2/Vector3 order

* Refactor vector classes to be const and reference param consistent

* Add BETA10 annotations and fixes
This commit is contained in:
Christian Semmler
2024-12-24 14:21:26 -07:00
committed by GitHub
parent 7c41ff4569
commit c2c9c75f1a
26 changed files with 223 additions and 217 deletions

View File

@@ -1596,7 +1596,7 @@ MxU16 LegoAnimationManager::FUN_10062110(
if (GetViewManager()->IsBoundingBoxInFrustum(p_roi->GetWorldBoundingBox())) {
Mx3DPointFloat direction(p_roi->GetWorldDirection());
if (direction.Dot(&direction, &p_direction) > 0.707) {
if (direction.Dot(direction, p_direction) > 0.707) {
Mx3DPointFloat position(p_roi->GetWorldPosition());
position -= p_position;
@@ -2525,7 +2525,7 @@ MxBool LegoAnimationManager::FUN_10064120(LegoLocation::Boundary* p_boundary, Mx
for (i = 0; i < numEdges; i++) {
e = (LegoUnknown100db7f4*) boundary->GetEdges()[i];
e->FUN_1002ddc0(*boundary, vec);
float dot = vec.Dot(&direction, &vec);
float dot = vec.Dot(direction, vec);
if (dot > local4c) {
local50 = e;

View File

@@ -809,7 +809,7 @@ MxResult LegoBuildingManager::FUN_10030630()
for (MxS32 j = 0; j < boundary->GetNumEdges(); j++) {
Mx4DPointFloat* normal = boundary->GetEdgeNormal(j);
if (position.Dot(normal, &position) + (*normal).index_operator(3) < -0.001) {
if (position.Dot(*normal, position) + (*normal).index_operator(3) < -0.001) {
MxTrace(
"Building %d shot location (%g, %g, %g) is not in boundary %s.\n",
i,
@@ -826,8 +826,8 @@ MxResult LegoBuildingManager::FUN_10030630()
if (g_buildingInfo[i].m_boundary != NULL) {
Mx4DPointFloat& unk0x14 = *g_buildingInfo[i].m_boundary->GetUnknown0x14();
if (position.Dot(&position, &unk0x14) + unk0x14.index_operator(3) > 0.001 ||
position.Dot(&position, &unk0x14) + unk0x14.index_operator(3) < -0.001) {
if (position.Dot(position, unk0x14) + unk0x14.index_operator(3) > 0.001 ||
position.Dot(position, unk0x14) + unk0x14.index_operator(3) < -0.001) {
g_buildingInfo[i].m_y =
-((position[0] * unk0x14.index_operator(0) + unk0x14.index_operator(3) +

View File

@@ -145,7 +145,7 @@ MxResult LegoPlantManager::FUN_10026410()
for (MxS32 j = 0; j < boundary->GetNumEdges(); j++) {
Mx4DPointFloat* normal = boundary->GetEdgeNormal(j);
if (position.Dot(normal, &position) + (*normal).index_operator(3) < -0.001) {
if (position.Dot(*normal, position) + (*normal).index_operator(3) < -0.001) {
MxTrace(
"Plant %d shot location (%g, %g, %g) is not in boundary %s.\n",
i,
@@ -162,8 +162,8 @@ MxResult LegoPlantManager::FUN_10026410()
if (g_plantInfo[i].m_boundary != NULL) {
Mx4DPointFloat& unk0x14 = *g_plantInfo[i].m_boundary->GetUnknown0x14();
if (position.Dot(&position, &unk0x14) + unk0x14.index_operator(3) > 0.001 ||
position.Dot(&position, &unk0x14) + unk0x14.index_operator(3) < -0.001) {
if (position.Dot(position, unk0x14) + unk0x14.index_operator(3) > 0.001 ||
position.Dot(position, unk0x14) + unk0x14.index_operator(3) < -0.001) {
g_plantInfo[i].m_y =
-((position[0] * unk0x14.index_operator(0) + unk0x14.index_operator(3) +