Add BETA10 for Vector2

This commit is contained in:
jonschz 2025-02-09 21:37:58 +01:00
parent 82453f62d8
commit 57a685f8ab

View File

@ -7,6 +7,7 @@
#include <memory.h>
// FUNCTION: LEGO1 0x10001f80
// FUNCTION: BETA10 0x10010a20
void Vector2::AddImpl(const float* p_value)
{
m_data[0] += p_value[0];
@ -14,6 +15,7 @@ void Vector2::AddImpl(const float* p_value)
}
// FUNCTION: LEGO1 0x10001fa0
// FUNCTION: BETA10 0x10010a80
void Vector2::AddImpl(float p_value)
{
m_data[0] += p_value;
@ -21,6 +23,7 @@ void Vector2::AddImpl(float p_value)
}
// FUNCTION: LEGO1 0x10001fc0
// FUNCTION: BETA10 0x10010ad0
void Vector2::SubImpl(const float* p_value)
{
m_data[0] -= p_value[0];
@ -28,6 +31,7 @@ void Vector2::SubImpl(const float* p_value)
}
// FUNCTION: LEGO1 0x10001fe0
// FUNCTION: BETA10 0x10010b30
void Vector2::MulImpl(const float* p_value)
{
m_data[0] *= p_value[0];
@ -35,6 +39,7 @@ void Vector2::MulImpl(const float* p_value)
}
// FUNCTION: LEGO1 0x10002000
// FUNCTION: BETA10 0x10010b90
void Vector2::MulImpl(const float& p_value)
{
m_data[0] *= p_value;
@ -42,6 +47,7 @@ void Vector2::MulImpl(const float& p_value)
}
// FUNCTION: LEGO1 0x10002020
// FUNCTION: BETA10 0x10010bf0
void Vector2::DivImpl(const float& p_value)
{
m_data[0] /= p_value;
@ -49,6 +55,7 @@ void Vector2::DivImpl(const float& p_value)
}
// FUNCTION: LEGO1 0x10002040
// FUNCTION: BETA10 0x10010c50
float Vector2::DotImpl(const float* p_a, const float* p_b) const
{
return p_b[0] * p_a[0] + p_b[1] * p_a[1];
@ -62,30 +69,35 @@ void Vector2::SetData(float* p_data)
}
// FUNCTION: LEGO1 0x10002070
// FUNCTION: BETA10 0x10010cc0
void Vector2::EqualsImpl(const float* p_data)
{
memcpy(m_data, p_data, sizeof(float) * 2);
}
// FUNCTION: LEGO1 0x10002090
// FUNCTION: BETA10 0x10010d00
float* Vector2::GetData()
{
return m_data;
}
// FUNCTION: LEGO1 0x100020a0
// FUNCTION: BETA10 0x10010d30
const float* Vector2::GetData() const
{
return m_data;
}
// FUNCTION: LEGO1 0x100020b0
// FUNCTION: BETA10 0x10010d60
void Vector2::Clear()
{
memset(m_data, 0, sizeof(float) * 2);
}
// FUNCTION: LEGO1 0x100020d0
// FUNCTION: BETA10 0x10010da0
float Vector2::Dot(const float* p_a, const float* p_b) const
{
return DotImpl(p_a, p_b);
@ -99,18 +111,21 @@ float Vector2::Dot(const Vector2& p_a, const Vector2& p_b) const
}
// FUNCTION: LEGO1 0x10002110
// FUNCTION: BETA10 0x10010de0
float Vector2::Dot(const float* p_a, const Vector2& p_b) const
{
return DotImpl(p_a, p_b.m_data);
}
// FUNCTION: LEGO1 0x10002130
// FUNCTION: BETA10 0x10010e20
float Vector2::Dot(const Vector2& p_a, const float* p_b) const
{
return DotImpl(p_a.m_data, p_b);
}
// FUNCTION: LEGO1 0x10002150
// FUNCTION: BETA10 0x10010e60
float Vector2::LenSquared() const
{
return m_data[0] * m_data[0] + m_data[1] * m_data[1];
@ -134,60 +149,70 @@ int Vector2::Unitize()
}
// FUNCTION: LEGO1 0x100021c0
// FUNCTION: BETA10 0x10010eb0
void Vector2::operator+=(float p_value)
{
AddImpl(p_value);
}
// FUNCTION: LEGO1 0x100021d0
// FUNCTION: BETA10 0x10010ee0
void Vector2::operator+=(const float* p_other)
{
AddImpl(p_other);
}
// FUNCTION: LEGO1 0x100021e0
// FUNCTION: BETA10 0x10010f10
void Vector2::operator+=(const Vector2& p_other)
{
AddImpl(p_other.m_data);
}
// FUNCTION: LEGO1 0x100021f0
// FUNCTION: BETA10 0x10010f50
void Vector2::operator-=(const float* p_other)
{
SubImpl(p_other);
}
// FUNCTION: LEGO1 0x10002200
// FUNCTION: BETA10 0x10010f80
void Vector2::operator-=(const Vector2& p_other)
{
SubImpl(p_other.m_data);
}
// FUNCTION: LEGO1 0x10002210
// FUNCTION: BETA10 0x10010fc0
void Vector2::operator*=(const float* p_other)
{
MulImpl(p_other);
}
// FUNCTION: LEGO1 0x10002220
// FUNCTION: BETA10 0x10010ff0
void Vector2::operator*=(const Vector2& p_other)
{
MulImpl(p_other.m_data);
}
// FUNCTION: LEGO1 0x10002230
// FUNCTION: BETA10 0x10011030
void Vector2::operator*=(const float& p_value)
{
MulImpl(p_value);
}
// FUNCTION: LEGO1 0x10002240
// FUNCTION: BETA10 0x10011060
void Vector2::operator/=(const float& p_value)
{
DivImpl(p_value);
}
// FUNCTION: LEGO1 0x10002250
// FUNCTION: BETA10 0x10011090
void Vector2::operator=(const float* p_other)
{
EqualsImpl(p_other);