mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-15 10:23:33 +00:00
(Proposal) Introduce arithmetic operators to Vector2 (#1193)
This commit is contained in:
committed by
GitHub
parent
4d8098a6c2
commit
94ce89cbaa
@@ -84,7 +84,7 @@ MxU32 LegoRaceActor::VTable0x90(float p_float, Matrix4& p_transform)
|
||||
m_state = 0;
|
||||
m_unk0x08 = 0;
|
||||
|
||||
((Vector3&) positionRef).Sub(g_unk0x10102b08);
|
||||
positionRef -= g_unk0x10102b08;
|
||||
m_roi->FUN_100a58f0(p_transform);
|
||||
return 1;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ MxResult LegoRaceActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||
MxMatrix matr;
|
||||
matr = roi->GetLocal2World();
|
||||
|
||||
Vector3(matr[3]).Add(g_unk0x10102b08);
|
||||
Vector3(matr[3]) += g_unk0x10102b08;
|
||||
|
||||
roi->FUN_100a58f0(matr);
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ MxResult LegoRaceCar::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||
MxMatrix matr;
|
||||
matr = roi->GetLocal2World();
|
||||
|
||||
Vector3(matr[3]).Add(g_unk0x10102af0);
|
||||
Vector3(matr[3]) += g_unk0x10102af0;
|
||||
roi->FUN_100a58f0(matr);
|
||||
|
||||
p_actor->SetState(2);
|
||||
|
||||
@@ -172,11 +172,11 @@ MxS32 LegoCarRaceActor::VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edg
|
||||
Mx3DPointFloat worldDirection(Vector3(m_roi->GetWorldDirection()));
|
||||
|
||||
if (!m_userNavFlag) {
|
||||
((Vector3*) &worldDirection)->Mul(-1.0f);
|
||||
worldDirection *= -1.0f;
|
||||
}
|
||||
|
||||
((Vector3*) &worldDirection)->Mul(5.0f);
|
||||
((Vector3*) &crossProduct)->Mul(5.0f);
|
||||
worldDirection *= 5.0f;
|
||||
crossProduct *= 5.0f;
|
||||
|
||||
MxResult callResult =
|
||||
VTable0x80(Vector3(m_roi->GetWorldPosition()), worldDirection, pointUnknown, crossProduct);
|
||||
@@ -266,8 +266,8 @@ MxResult LegoCarRaceActor::VTable0x9c()
|
||||
point4.Unitize();
|
||||
point5.Unitize();
|
||||
|
||||
((Vector3*) &point4)->Mul(5.0f);
|
||||
((Vector3*) &point5)->Mul(5.0f);
|
||||
point4 *= 5.0f;
|
||||
point5 *= 5.0f;
|
||||
|
||||
MxResult res = VTable0x80(m_roi->GetWorldPosition(), point4, point1, point5);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user