mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-27 02:14:18 +00:00
(Proposal) Introduce arithmetic operators to Vector2 (#1193)
This commit is contained in:
committed by
GitHub
parent
4d8098a6c2
commit
94ce89cbaa
@@ -52,7 +52,7 @@ MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform)
|
||||
m_state = 0;
|
||||
m_unk0x1c = 0;
|
||||
|
||||
((Vector3&) positionRef).Sub(g_unk0x10104ef0);
|
||||
positionRef -= g_unk0x10104ef0;
|
||||
m_roi->FUN_100a58f0(p_transform);
|
||||
m_roi->VTable0x14();
|
||||
return TRUE;
|
||||
@@ -75,7 +75,7 @@ MxResult Act3Actor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||
MxMatrix local2world;
|
||||
local2world = roi->GetLocal2World();
|
||||
|
||||
Vector3(local2world[3]).Add(g_unk0x10104ef0);
|
||||
Vector3(local2world[3]) += g_unk0x10104ef0;
|
||||
|
||||
roi->FUN_100a58f0(local2world);
|
||||
roi->VTable0x14();
|
||||
|
||||
@@ -226,8 +226,8 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
dir = m_world->GetCamera()->GetWorldDirection();
|
||||
lookat = dir;
|
||||
float scale = 3;
|
||||
lookat.Mul(scale);
|
||||
lookat.Add(loc);
|
||||
lookat *= scale;
|
||||
lookat += loc;
|
||||
Mx3DPointFloat v68, v7c, v90(0, 1, 0), va4;
|
||||
v68 = m_world->GetCamera()->GetWorldUp();
|
||||
va4.EqualsCross(&v68, &dir);
|
||||
@@ -379,9 +379,9 @@ void Helicopter::VTable0x70(float p_float)
|
||||
mat.SetIdentity();
|
||||
m_unk0x1f4.Unknown6(mat, f2);
|
||||
v2.SetVector(loc);
|
||||
v2.Sub(v);
|
||||
v2.Mul(f2);
|
||||
v2.Add(v);
|
||||
v2 -= v;
|
||||
v2 *= f2;
|
||||
v2 += v;
|
||||
m_world->GetCamera()->FUN_100123e0(mat, 0);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -126,8 +126,8 @@ void IslePathActor::Exit()
|
||||
Mx3DPointFloat local20;
|
||||
e->FUN_1002ddc0(*m_boundary, local20);
|
||||
|
||||
((Vector3&) local20).Mul(m_roi->GetWorldBoundingSphere().Radius());
|
||||
((Vector3&) local20).Add(GetWorldPosition());
|
||||
local20 *= m_roi->GetWorldBoundingSphere().Radius();
|
||||
local20 += GetWorldPosition();
|
||||
|
||||
MxS32 j;
|
||||
for (j = 0; j < m_boundary->GetNumEdges(); j++) {
|
||||
@@ -643,7 +643,7 @@ void IslePathActor::FUN_1001b660()
|
||||
Vector3 direction(transform[1]);
|
||||
Vector3 up(transform[2]);
|
||||
|
||||
((Vector3&) up).Mul(-1.0f);
|
||||
up *= -1.0f;
|
||||
position.EqualsCross(&direction, &up);
|
||||
m_roi->FUN_100a58f0(transform);
|
||||
m_roi->VTable0x14();
|
||||
|
||||
Reference in New Issue
Block a user